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

RE: Debugging XSL using Saxon

Subject: RE: Debugging XSL using Saxon
From: "Shailesh Shinde" <shailesh@xxxxxxxxxxxx>
Date: Mon, 19 Jun 2006 11:05:36 +0530
xsl message saxon
Thanks Michael,

This gives what I want after debugging....

Thanks,
Shailesh

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
Sent: Saturday, June 17, 2006 6:59 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Debugging XSL using Saxon

In XSLT 2.0 you can do

<xsl:message use-when="system-property('debug')='yes')">...

where debug is a Java system property. This gives you a compile-time test
rather than run-time. The only drawback is that access to system properties
might vary between processors. 

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: Hood, Earl [mailto:earl.hood@xxxxxx] 
> Sent: 16 June 2006 19:29
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Debugging XSL using Saxon
> 
> > Alternatively you can simply use xsl:message or the trace() 
> function.
> > (Sometimes rather than xsl:message I use xsl:comment, which inserts 
> > the diagnostic output into the result document).
> 
> The drawback with xsl:message is what to do with them after debugging.
> 
> What I've started to do is use a global debug parameter that 
> can be checked so your debugging xsl:messages can be turned 
> on or off when needed.  For example:
> 
>   <xsl:if test="$debug > 0">
>     <xsl:message>...</xsl:message>
>   </xsl:if>
> 
> The parameter is an integer.  You can conditionalize your 
> statements to only print out if $debug is set to a larger 
> number, allowing different levels of debugging output.
> 
> Have the default value for $debug be 0 and then you can 
> override it on the command-line when debugging is needed.
> 
> I'm not sure if this is good style, but it works for me.  If 
> there are better options, please pass them along.
> 
> --ewh
> --
> Earl Hood
> Software Engineer
> HP/ATCL
> earl.hood@xxxxxx 

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.