RE: [xsl] [XSLT 2] rescue

Subject: RE: [xsl] [XSLT 2] rescue
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sun, 15 Jun 2003 21:10:49 +0100
Unfortunately there is no try-catch in XPath 2 or XSLT 2.

We debated putting one in, but people felt it was a bridge too far.
People were particularly concerned about defining exactly what state the
system was in if an error was trapped and ignored, for example, should
it effectively be required to do a "rollback" of the result tree.

Michael Kay


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Tobias Reif
> Sent: 14 June 2003 17:28
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] [XSLT 2] rescue
> 
> 
> Hi
> 
> In Ruby I can do
> 
>    begin
>      # do something
>    rescue
>      # do something else if the above failed
>    end
> 
> How to do that in XSLT 2? (or XPath 2)
> 
> For example when the path in unparsed-text($path) does not 
> point to anything, I'd like to print a message and generate a 
> comment, and I want the transformation to be continued, not aborted.
> 
> Tobi
> 
> -- 
> http://www.pinkjuice.com/
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread