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

Re: Appending to existing file

Subject: Re: Appending to existing file
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 17 Jul 2007 16:54:56 +0200
Re:  Appending to existing file
Michael Kay wrote:
According to the spec, you're not allowed to execute two xsl:result-document
instructions using the same URI. This is because of the theory that
everything in XSLT is done in an undefined order, perhaps even in parallel.

However, there's nothing that stops you writing to different URIs and then
capturing the output and sending it all to the same file. In the Saxon API
you can set an OutputURIResolver, and it's this that determines where the
data ends up. There's nothing to stop you for example writing to URIs
file:///c:/temp.xml#1, file:///c:/temp.xml#2 and so on, and having all the
data end up in c:/temp.xml.

Michael, I would find that a tempting approach, however, in your first paragraph, you state that everything can be executed in an undefined order. I assume that means, in theory *and* in practice, that the order in which the OutputURIResolver is called is undefined and hence, the order of the snippets that you are writing to the same target.


Obviously, by collecting the data before writing it, you can order it by means of some sort of identifier of course.

-- Abel

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.