Re: [xsl] Fallback from document() error

Subject: Re: [xsl] Fallback from document() error
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 3 Jan 2001 14:33:44 GMT

> 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

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

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"

(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

 XSL-List info and archive:

Current Thread