This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Are these two the equivalent?


Hello All,
I have two ways of what I think should achieve the same result

Example 1 gives me what I want, Example 2 does not. To me they are the
same...If they are different, could someone explain to me why the second
does not give me what I want.

Thanks in advance,
Nicholas Waltham




Example 1:
<xsl:template
match="p[@style='L1'][preceding-sibling::p[last()][@style='L1']|preceding-si
bling::p[last()][@style='L2']|preceding-sibling::p[last()][@style='L3']]">
<xsl:apply-templates/>
</xsl:template>

Example 2:
<xsl:template
match="p[@style='L1'][preceding-sibling::p[last()][@style='L1'|@style='L2'|@
style='L3']]">
<xsl:apply-templates/>
</xsl:template>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]