|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:document problem
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








