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

Re: Best approach for writing an XML log whilst proce

Subject: Re: Best approach for writing an XML log whilst processing/writing other XML documents?
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Fri, 13 Aug 2010 14:35:55 +0100
Re:  Best approach for writing an XML log whilst  proce
> Now comes the problem.  As I do this processing, I need to collect
> some information that allow me to report on the process,
...
> Unfortunately, I cannot find a way to generate the 2 in parallel (ie.
> the copies of original files and the report), since creation of new
> nodes in the mode='replace' templates would obviously go into the
> copied files, not the report.
> The only way I can think of doing is in a 2-pass algorithm, first
> doing all the copying (more=replace), then going through it all again
> and produce the report (mode=report), but I hope there is another way
> (particularly one that avoids having to go through all dependency
> files twice)

There are a few ways, the usual is to use xsl:message to output the
information as rootless xml, then hand-convert that afterwards into
well-formed XML and then process that.

Alternatively, you may be able to add the information to your result
documents (say in your own namespace) and post-process those files to
extract it, then use a final pass to remove it  (if needed).


--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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.