Joseph McGarvey
12-31-2003, 10:11 PM
Is it possible to capture an XSLT error, much like a TRY/CATCH in Javascript? I have an xsl template that is looking at an XML file for a node value. If the XML file being requested does not exist, the page errors, since it cannot find the needed node. I want to capture this error and have the page do something else.
Example:
<xsl:value-of select='document(concat($global.path,@site,"/",@loc,"/",@page,".xml"))/page/Target'/>
If this XML file is found... no problem. If the XML file does not exist, write:
<xsl:value-of select='//errorText'/>
Thanks in advance!
Example:
<xsl:value-of select='document(concat($global.path,@site,"/",@loc,"/",@page,".xml"))/page/Target'/>
If this XML file is found... no problem. If the XML file does not exist, write:
<xsl:value-of select='//errorText'/>
Thanks in advance!