P
patrik.nyman
Hi!
I have elements like these:
<name style="it">SomeData</name>
<otherName style="it">SomeOtherData</otherName>
and tries to transform these with the following:
<xsl:template match="*[@rend='it']">
<i><xsl:apply-templates/></i>
</xsl:template>
<xsl:template match="name">
... do something ...
</xsl:template>
<xsl:template match="otherName">
... do something ...
</xsl:template>
But as you might guess, it does not work, because only
the first template matches. That is, after the first
template there is
<i>SomeData</i>
but I would like to have
<name><i>SomeData</i></name>
Could someone please telle me how?
/Patrik
I have elements like these:
<name style="it">SomeData</name>
<otherName style="it">SomeOtherData</otherName>
and tries to transform these with the following:
<xsl:template match="*[@rend='it']">
<i><xsl:apply-templates/></i>
</xsl:template>
<xsl:template match="name">
... do something ...
</xsl:template>
<xsl:template match="otherName">
... do something ...
</xsl:template>
But as you might guess, it does not work, because only
the first template matches. That is, after the first
template there is
<i>SomeData</i>
but I would like to have
<name><i>SomeData</i></name>
Could someone please telle me how?
/Patrik