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

Re: __LINE__ equivalent in XSTL

Subject: Re: __LINE__ equivalent in XSTL
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Fri, 02 Dec 2011 15:26:22 +0100
Re:  __LINE__ equivalent in XSTL
On 2011-12-02 14:38, Emma Burrows wrote:
From: Andrew Welch [mailto:andrew.j.welch@xxxxxxxxx]
Sometimes I use the advanced technique of temporarily adding XX, YY,
ZZ to various places....  :)

I'm glad to know I'm not the only one who uses such sophisticated debugging methods. :)

Were using essentially the same technique, but less ad hoc, more institutionalized.


In complex conversion pipelines with lots of template rules and lots of passes in different modes, we sometimes add template identifier attributes to some of the generated elements. Then we are able to track which template in which mode was responsible for a certain transformation.

For example, <idml2xml:genSpan idml2xml:reason="autocorrect-08" aid:cstyle="..."> indicates that a generated span has been introduced by template #08 in the pass that takes place in mode="autocorrect".
'autocorrect-08' is the templates ID that it will add to its offspring, so to say.


Sophistication goes on: In addition, each pass's result will be written into a file, such as debug/pass-50-autocorrect.xml

The debug files will be written by an xsl:result-document with a dedicated format that indents for legibility.

'pass-50' should not indicate that there are 50 or more passes. Wed like to number the passes in ascending order, so that we can see more easily, by inspecting adjacent files in the debug directory, how the data changed from pass to pass. And wed like to keep unused number ranges between the passes, so that we dont have to renumber them whenever we need to introduce an intermediate pass.

Gerrit

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.