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

xsl:result-document

Subject: xsl:result-document
From: "Els Maes" <elsmaes@xxxxxxxxxxx>
Date: Thu, 21 Oct 2004 14:58:34 +0200
xsl result document
Hello all,

I'm creating a stylesheet, which should give me multiple output files. For this feature, XSLT2.0 provides xsl:result-document. Unfortunately, the wished output is not provided.

My input file looks like this (simplified version):
--------------------------------------------------------------
<?xml version="1.0" encoding="UTF-16"?>
<sourceroot>
<class name="Input1" id="a123">
<contains value="input1"/>
</class>
<class name="Input2" id="b456">
<contains value="input2"/>
</class>
<class name="Input3" id="c789">
<contains value="input3"/>
</class>
</sourceroot>
--------------------------------------------------------------

My stylesheet looks like this (also simplified):
--------------------------------------------------------------
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes"/>


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

 <xsl:template match="sourceroot">
     <xsl:for-each select="//class">
         <xsl:result-document href="{@name}.java">
             <xsl:value-of select="@name"/>
         </xsl:result-document>
     </xsl:for-each>
 </xsl:template>

</xsl:stylesheet>
--------------------------------------------------------------

The output I get, is Input1.java; but I want to get Input1.java; Input2.java; Input3.java.

To convert, I use the Altova XSLT 2.0 Engine.

Can somebody tell me what's wrong with my code. I've searched the web for problems with xsl:result-document and xsl:for-each used together, but I cannot find anything. I've seen examples in which they are used in the same way as I do...

Thanks in advance.

Kind regards,

Els Maes

_________________________________________________________________
Volg Expeditie Robinson op de voet! http://www.expeditierobinson.vt4.be/

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.