Hi all.
I've got some problem with <xsl:apply templates instruction.
I use xalan to parse xml via xsl stylesheet.
Here's my xml :
<spec>
<header>
<authlist>
<author>
<affiliation>IBM</affiliation>
<email href="mailtosca@us.ibm.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">sca@us.ibm.com</email>
</author>
<author>
<name>Anders Berglund</name>
<affiliation>IBM</affiliation>
<email href="mailtoalrb@us.ibm.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">alrb@us.ibm.com</email>
</author>
<author>
<name>Jeff Caruso</name>
<affiliation>Pageflex</affiliation>
<email href="mailtojcaruso@pageflexinc.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">jcaruso@pageflexinc.com</email>
</author>
<author>
<name>Stephen Deach</name>
<affiliation>Adobe</affiliation>
<email href="mailtosdeach@adobe.com" show="new" actuate="user" xmlns:xlink="http://www.w3.org/TR/WD-xlink">sdeach@adobe.com</email>
</author>
</authlist>
<header>
</spec> and here's my xsl :
<xsl:template match="/">
<xsl:apply-templates select="spec/header/authlist/author/email"/>
</xsl:template>
<!-- template 1 -->
<xsl:template match="spec/header/authlist/author/email">
<br>some words....</br>
</xsl:template>
<!-- template 2 -->
<xsl:template match="spec/header/authlist/author/email[@href='mailtosca@us.ibm.com']">
<br>some other words....</br>
</xsl:template>
When i try to parse my xml with xsl stylesheet, the output is the execution of template 2 and the repeated execution of template 1.
When i put template 2 before template 1 in xsl, the output is the execution of only template 1.
Why this happens?
Accordingly to w3 rules :
http://www.w3.org/TR/xslt20/#conflict The execution of this xsl generates the running of only one template (template1), not both two templates (template one and two)
Any suggest will be apreciated.