Matching twice

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top