[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|