|
Subject: [xsl] xsl:document problem From: "Khalid"<k_ali@xxxxxxxxxxxxxxx> Date: Tue, 5 Feb 2002 17:02:50 GMT |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] MS XSLISAPI filter 2.1, Chen, Zhongqing | Thread | Re: [xsl] xsl:document problem, Oleg Tkachenko |
| [xsl] MS XSLISAPI filter 2.1, Chen, Zhongqing | Date | Re: [xsl] few question regarding th, Joerg Heinicke |
| Month |