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

Re: Appending output to multiple documents

Subject: Re: Appending output to multiple documents
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 12 Jun 2001 09:30:17 +0100
xslt multi output
Hi Rafael,

> Been playing a bit with Saxon and its partial implementation of the
> XSLT 1.1 draft. here. I've been wondering if there is a way for
> multiple <xsl:document/> constructions that reference the same file
> to *append* their outputs to the file instead of truncating the
> original file and replacing its contents. Useful for the case where
> I had two different templates that had to spew their output to the
> same file, in the order they were matched. Is there something in the
> standard I missed, or is this currently impossible and I would need
> to hack my XSLT processor and then propose to the W3C a mode
> attribute to <xsl:document/> that would control whether output to
> files that already exist should be appended or overwritten?

There isn't a way to do that. You could propose it to W3C, but I doubt
that they would adopt it. The way that xsl:document works is
complicated by the fact that it's designed to maintain the same kind
of basic XSLT processing model as the rest of XSLT.  This means that
the order in which things are actually processed shouldn't matter -
you're building a tree, which is then serialised, not writing to an
output sequentially.  You will be able to create the secondary output
in just the same way as you are able to create the primary output -
think of them as two completely separate processes.

Alternatively, the redirect:write extension element in Xalan does
allow you to append a document, if you open it first with
redirect:open.  So if you are desperate for that functionality, then
you could use that.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.