Subject: Re: [xsl] How to check if document(file) was able to find and read the file? From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 9 Apr 2003 12:24:46 +0100 |
> How can I check that? It's actually an error to refer to a document that is not there. Your XSLT system may just give up at that point and stop. If so there is nothing you can do from within the stylesheet. However the XSLT spec does say what the processor must do if it does not die at that point: it has to return an empty node set, in which case <xsl:when test="$Descriptions"> <xsl:when test="count($Descriptions)>0"> both of those should work and be true if the document is there and false otherwise. $Descriptions will either be an empty node set or a set consisting of a single / node, depending on whether the document is there or not. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to check if document(file, r . devries | Thread | [xsl] Parameterizing an XML using a, Scott H Snyder |
RE: [xsl] xsl templates, Removing s, Tim Wilkins | Date | Re: [xsl] xsl templates, Removing s, David Carlisle |
Month |