[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT wish list

Subject: Re: XSLT wish list
From: Duane Nickull <webmaster@xxxxxxxxxxxxxxxxx>
Date: Thu, 20 May 1999 19:37:22 -0700
xslt abort
> - Write an error message to standard error (rather than to the result tree).

Wouldn't it be nice to have an <xsl:cgi> to be able to send this to the
server via perl and write it to the error_log (or STANDARD OUT).

>   The error message should include the line number within the source
>   document of the invalid data.

IE 5.0 does this right now.  In fact, it pukes on anything which does
not conform to the proper XML syntax (as it should).  A good parser
should do this.  

> - Abort the processing of the stylesheet and specify the exit code
>   that the XSLT processor will return.

What application or user would use this information?  If it chokes
because it is not valid XML or the XSLT instructions have not been
written in proper XML syntax, that is the correct thing to do.

> I'm hoping that a future version of XSLT will let me use
> the xsl:message instruction to write an error message
> to standard error.
> It would also be nice if XSLT provided a function that returned
> the line number for a node in the source document.
> Lastly, I'd like to see an "xsl:exit" instruction added to XSLT.
> For example:
>     <xsl:if test="not(element='valid_value')">
>         <xsl:message>Error: element contains invalid value</xsl:message>
>         <!-- Abort stylesheet and cause the XSLT processor to exit with
>              an exit code of 2. -->
>         <xsl:exit code="2"/>
>     </xsl:if>
 <any scripting language can accomplish that>

> With the current version of XSLT, the stylesheet can abort
> processing by invoking an illegal instruction (e.g., xsl:abort-stylesheet).
> For example:
>     <xsl:if test="not(element='valid_value')">
>         <xsl:message>Error: element contains invalid value</xsl:message>
>         <!-- Abort stylesheet by invoking an illegal instruction. -->
>         <xsl:abort-stylesheet/>
>     </xsl:if>
> However, this is a little kludgey and it doesn't allow you specify an exit code.
> Also, there may be cases where you want the stylesheet to force an early,
> successful exit.

Shouldn't that be the parser's job??   

Duane Nickull

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.