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

RE: appending output to file using saxon

Subject: RE: appending output to file using saxon
From: "Bryan Rasmussen" <bry@xxxxxxxxxx>
Date: Tue, 30 Apr 2002 09:18:27 +0200
xsl document append
Jakob Fix wrote: Is there a way to append content to an existing file using
Saxon?  Or any other

hmm, not sure if I get the whole question here, but the above is clear
enough, I gave a solution that allowed one to append content to a file
several months ago, it can be found at:
http://www.biglist.com/lists/xsl-list/archives/200201/msg01251.html but note
the following posts to that and the controversy that ensued to see that,
although this in fact worked it was a bad thing.

here's the xslt again:
<?xml version='1.0' encoding="utf-16"?>

<xsl:stylesheet version='1.1'

<xsl:template match="/">

<xsl:template match="output">
<xsl:variable name="href"><xsl:value-of select="@file"/></xsl:variable>
<xsl:param name="input" select="document($href)"/>
<xsl:document href="{$href}" method="xml">
<xsl:copy-of select="$input"/>

<xsl:template match="p">
<para><xsl:value-of select="."/></para>


Actually I'm glad that this came up because I wanted to take the subject up
again and was contemplating a post. Given that the above solution is
bad(side effects I take it being possible because $input which selects
document($href) is output inside an xsl:document which generates $href,
although I'd thought that as $input came before the xsl:document element it
should be read in and side-effects be impossible), is there a possible
solution whereby one can 'append' to a document in the way the one above

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

Current Thread


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.
First Name
Last Name
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.