This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fallback from document() error




> One problem is where document() is used to retrieve a set of documents, e.g.
> document(//a/@href). What happens if some of them exist and some don't?

er, pass;-)

But what would happen in Miloslav's xsl:fallback version in that case as
well?


I don't think I would mind if document(//a/@href) returned a node set
consisting of the root nodes of any documents returned, so it could be
empty and if count(document(//a/@href)) != count(//a/@href) then
either some of the hrefs point to the same document, or some or to a missing
document.

An alternative would be to make document() return a text node with a
possible error message if there is no document returned.
then you could test each node in the returned node set:
If it matches / then you have a document, if it matches text()
you could look and see
"404: no such document"
"403: there is a document, but go away"
etc

David
(This proposal hasn't been extensively researched:-)

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]