Subject: Re: XSLT wish list From: Duane Nickull <webmaster@xxxxxxxxxxxxxxxxx> Date: Thu, 20 May 1999 19:37:22 -0700 |
> - 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> > <xsl:functions> <any scripting language can accomplish that> </xsl:functions> > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XSLT wish list, Robert C. Lyons | Thread | Re: XSLT wish list, Paul Prescod |
XSLT wish list, Robert C. Lyons | Date | Re: XSLT wish list, Paul Prescod |
Month |