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

xsl:document problem

Subject: xsl:document problem
From: "Khalid"<k_ali@xxxxxxxxxxxxxxx>
Date: Tue, 5 Feb 2002 17:02:50 GMT
xsl document
Hello,I am trying to create multiple out put files(xml).
Can some on elet me know whats wrong with my code,cus it seem to go to otherwise
element everytime I run it.
XSLT processor I am using is xalan.Here is the code

<xsl:template match = "address">
<xsl:variable name = "file" select = "concat('address',position(),'.xml')"/>

		<address number = "{position()}" href = "{$file}"/>
<xsl:choose>
<xsl:when test = "element-available('xsl:document')">
<xsl:document href = "{$file}">
<xsl:copy-of select = "."/>
</xsl:document>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate = "yes">Sorry, can not write to multiple outputs.</xsl:message>

</xsl:otherwise>
</xsl:choose>
</xsl:template>
below is the xml file I am using

<?xml version='1.0'?>
<root>
	<sub-root>
		<address>
			<street>400,703 6th Ave SW</street>
		</address>
		<address>
			<street>176 Martinvalley Crescent NE</street>
		</address>
	</sub-root>
</root>

Thanks for help

 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.