Subject: Re: [xsl] Fallback from document() error From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 3 Jan 2001 14:17:26 GMT |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Fallback from document() , Miloslav Nic | Thread | RE: [xsl] Fallback from document() , Kay Michael |
RE: [xsl] xslT - Tutorial, Chris Bayes | Date | Re: [xsl] Fallback from document() , David Carlisle |
Month |