|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Fallback from document() error
I can have:
document('foo.xml')//aaa
with foo.xml:
<bbb/>
this bit will return empty node-set but I cannot
find out that the document exists.
Yes but if the spec was changed to make returning an empty node set
mandatory rather than just an option, then you could go
<xsl:if test="document('foo.xml')">
<xsl:apply-templates select="document('foo.xml')//aaa"/>
</xsl:if>
(which would look nicer if xpath had an if expression)
> 1.1 I will not have problems with restrictions
> result tree fragment use, so I can reuse the part from case 2)
You could do that anyway, even under xslt 1.0, if you go
<xsl:variable name="x select="document('foo.xml')"/>
then $ is a node set not an rtf.
David
_____________________________________________________________________
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
|

Cart








