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

RE: XSL: Error Detection?

Subject: RE: XSL: Error Detection?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 11 Mar 2003 15:51:05 -0000
xsl error undetermined string
You can write a new stylesheet module which imports the current one, and
contains a single template rule of the form:

<xsl:template match="*">
<xsl:choose>
  <xsl:when test=".... node is in error subtree ...">
     ..do something.
  </xsl:when>
  <xsl:otherwise>
     <xsl:apply-imports/>
  </xsl:otherwise>
</xsl:choose>
</xsl:template>

The only caveat is that this assumes you are not using apply-templates
with parameters.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Bhandari, Ashish
> Sent: 11 March 2003 14:23
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  XSL: Error Detection?
> 
> 
> 
> Hi,
> 
> I have an input XML of which I am interested only in a subset 
> of the nodes for transalting into another XML doc. 
> 
> I have written stylesheets ( and these are substantially 
> large ones ) for the translation.
> 
> Now the problem is the input XML is generated automatically 
> in which case there might be errors ( in generation )  and 
> some nodes that I am interested in translating may not be 
> generated. However, the input XML will have an "ERROR" 
> subtree as a decendant of the root indicating a failure and 
> detailing the node name, context and error string.
> 
> Now: I have these constraints:
> 	- The Stylesheet is already done and it is an overkill 
> for each node translation to check for the node in the 
> "ERROR" subtree.
> 	- Since I am translating only a subset , I will not be 
> interested in the "ERROR" subtree if the nodes that I am 
> translating are not specified in the subtree.
> 	- NOTE: It IS possible to change the way,means and mode 
> the input XML reports the error.
> 
> Goal:
> 	 Is it possible , with minimum invasion, to make the 
> styleesheet capable of such error detection ?. 
> 	
> 
> Thanks,
> Ashish.
> 
> 
> 
> 
>  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.