RE: XSLT wish list

Subject: RE: XSLT wish list
From: "Robert C. Lyons" <boblyons@xxxxxxxxxx>
Date: Fri, 21 May 1999 09:59:14 -0400
Duane wrote:
       >   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.  

I was not referring to XML syntax errors (e.g., the source doc is not well-formed)
or XSL syntax errors (e.g., the stylesheet contains an invalid instruction).
Instead, I was referring to application-level errors (e.g., a person's birth date
is greater than the current date).

Duane wrote:
       > - 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.

Again, I'm referring to application-level errors, not XML syntax errors or
XSLT syntax errors.

Duane wrote:
       >     <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>

An extension function can be used to perform application-level
validations. However, I don't see how an extension function can 
be used to cause the XSLT processor to abort processing.
The XSLT spec does not discuss the handling of exceptions
that are thrown by an extension function.

Bob

------
Bob Lyons
EC Consultant
Unidex Inc.
1-732-975-9877
boblyons@xxxxxxxxxx
http://www.unidex.com/

<<application/ms-tnef>>

Current Thread