[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Are these two the equivalent?

Subject: Re: Are these two the equivalent?
From: Jörg Heinicke <joerg.heinicke@xxxxxx>
Date: Sun, 14 Oct 2001 16:18:05 +0200
Re:  Are these two the equivalent?
Hi Nicholas,

you must divide the "@style"s in the second example not by '|' but by 'or'.

Joerg

> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.