[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.... :) 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|