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

result-document overwrites previous result

Subject: result-document overwrites previous result
From: "Dilip Jain" <djain@xxxxxxxxxxxxxxx>
Date: Wed, 2 Jun 2004 16:01:07 -0400
dilip jain
Unlike the output file, the result-document file contains only the last
"Address" processed. My goal is to output addresses in a file other than
the "output file". Can I achieve this using result-document or should I
use a different approach?
To top this, I would like to append to the file if "addressfilename"
exists. Please help this newbie. Thanks.

I am using Saxon 7.9.1 and JDK 1.4.2
The xslt file is-
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:param name="addressfilename"/>

	<xsl:output method="text"/>

	<xsl:template match="/">
		<xsl:apply-templates select="Organization/Member"/>
	</xsl:template>

	<xsl:template match="Member">
		<xsl:value-of select="@FirstName"/>
		<xsl:text>|</xsl:text>
		<xsl:value-of select="@LastName"/>
		<xsl:text>
</xsl:text>

		<xsl:if test="$addressfilename">
			<xsl:result-document
href="file:///{$addressfilename}">
				<xsl:value-of select="concat(@ZipCode,
'|', @Street, '|', @City, '|', @State)"/>
		<xsl:text>
</xsl:text>
			</xsl:result-document>
		</xsl:if>
	</xsl:template>

</xsl:stylesheet>


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.