B
bbembi_de
Hello everyone,
I have a problem with a xsl transformation.
I have a input file like this:
<root>
<element name="element1">
<group name="111" />
<group name="222" />
</element>
<element name="element2">
<group name="111" />
<group name="333" />
<group name="444" />
</element>
</root>
Now I want a output file for every group. the output file should be
like this:
111.txt:
element1
element2
222.txt
element1
element2
333.txt
element3
and so on...
I use xslt 2.0 with saxon.
I know I have to write every output file at once. But how?
In my current solution I only get one output line each file:
....
<xsl:template match="/">
<xsl:for-each-group select="root/element/group" group-by="name">
<xsl:result-document href="{name}.xml">
<xsl:call-template name="CodeImplTemp"/>
</xsl:result-document>
</xsl:for-each-group>
....
<xsl:template name="CodeImplTemp">
<xsl:value-of select="../name"/>
</xsl:template>
Thanks
bye bembi
I have a problem with a xsl transformation.
I have a input file like this:
<root>
<element name="element1">
<group name="111" />
<group name="222" />
</element>
<element name="element2">
<group name="111" />
<group name="333" />
<group name="444" />
</element>
</root>
Now I want a output file for every group. the output file should be
like this:
111.txt:
element1
element2
222.txt
element1
element2
333.txt
element3
and so on...
I use xslt 2.0 with saxon.
I know I have to write every output file at once. But how?
In my current solution I only get one output line each file:
....
<xsl:template match="/">
<xsl:for-each-group select="root/element/group" group-by="name">
<xsl:result-document href="{name}.xml">
<xsl:call-template name="CodeImplTemp"/>
</xsl:result-document>
</xsl:for-each-group>
....
<xsl:template name="CodeImplTemp">
<xsl:value-of select="../name"/>
</xsl:template>
Thanks
bye bembi