Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Matching twice

Thread Tools

Matching twice
Posts: n/a

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']">

<xsl:template match="name">
... do something ...

<xsl:template match="otherName">
... do something ...

But as you might guess, it does not work, because only
the first template matches. That is, after the first
template there is


but I would like to have


Could someone please telle me how?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Pattern matching. Matching multiple lines from while reading from a file. Bobby Chamness Perl Misc 2 05-03-2007 06:02 PM
Matching twice XML 4 12-13-2006 02:11 PM
[rake] rule with regex executed twice for same matching string Joel VanderWerf Ruby 1 11-10-2006 08:33 PM
twice(twice(x)) Kiuhnm C++ 2 04-01-2006 04:41 PM
Pattern matching : not matching problem Marc Bissonnette Perl Misc 9 01-13-2004 05:52 PM