P
patrik.nyman
Suppose I have the following xml-text:
Some text before.<A/>
<B>Text in the B-element.</B>
Some text after.
And I want:
Some text before.
<C>Text in the B-element.</C>
Some text after
I have tried something like:
<xsl:template match="A">
<C><xsl:apply-templates select="B"/></C>
</xsl:template>
<xsl:template match="B">
<xsl:apply-templates/>
</xsl:template>
But that results in:
Some text before.
<C>Text in the B-element.</C>
Text in the B-element.
Some text after
So basically, how can I call template B from
within template A, and then not having B match
again?
Some text before.<A/>
<B>Text in the B-element.</B>
Some text after.
And I want:
Some text before.
<C>Text in the B-element.</C>
Some text after
I have tried something like:
<xsl:template match="A">
<C><xsl:apply-templates select="B"/></C>
</xsl:template>
<xsl:template match="B">
<xsl:apply-templates/>
</xsl:template>
But that results in:
Some text before.
<C>Text in the B-element.</C>
Text in the B-element.
Some text after
So basically, how can I call template B from
within template A, and then not having B match
again?