I have to insert some complete nodes with child nodes an all the attributes of these nodes from an XML file into a second XSLT Stylesheet, I want to create with the first one.
This is an example for the XML:
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns:xsl="http://ift.tt/tCZ8VR" version="1.0"
xmlns:fo="http://ift.tt/vyPH5E"
xmlns:xslout="it's replaced to xmlns:xsl within the transformation">
<text-german>
<fo:block font-weight="bold" space-after.optimum="10mm">
Ihr Coupon
</fo:block>
<fo:block space-after.optimum="10mm">
<xsl:text>Guten Tag </xsl:text>
<xslout:value-of select="givenname"/>
<xslout:text> </xslout:text>
<xslout:value-of select="surname" />
<xslout:text>,</xslout:text>
</fo:block>
<fo:block space-after.optimum="5mm">
<xslout:text>Some text...</xslout:text>
<xslout:value-of select="issuerLong" />
<xslout:text>Here more text...</xslout:text>
</fo:block>
<fo:block>
<fo:inline font-style="italic">
<xslout:text>Coupon: </xslout:text>
</fo:inline>
<fo:inline font-weight="bold">
<xslout:value-of select="code" />
</fo:inline>
</fo:block>
</text-german>
</data>
I want to insert all the content of the node <text-german> into the Output. Before, I have tried to do this with the command <xsl:value of select="text-german"/>, but this does only affect the content of this specific node, not the inherited child nodes with their content and thier attributes.
How do I insert all the content of the node in my output file?
For better understanding here the text i want to have in my output:
<fo:block font-weight="bold" space-after.optimum="10mm">
Ihr Coupon
</fo:block>
<fo:block space-after.optimum="10mm">
<xsl:text>Guten Tag </xsl:text>
<xslout:value-of select="givenname"/>
<xslout:text> </xslout:text>
<xslout:value-of select="surname" />
<xslout:text>,</xslout:text>
</fo:block>
<fo:block space-after.optimum="5mm">
<xslout:text>Some text...</xslout:text>
<xslout:value-of select="issuerLong" />
<xslout:text>Here more text...</xslout:text>
</fo:block>
<fo:block>
<fo:inline font-style="italic">
<xslout:text>Coupon: </xslout:text>
</fo:inline>
<fo:inline font-weight="bold">
<xslout:value-of select="code" />
</fo:inline>
</fo:block>
No comments:
Post a Comment