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

RE: Following-sibling axis - original tree or current result

Subject: RE: Following-sibling axis - original tree or current result-set?
From: Jeff Saylor <JSaylor@xxxxxxxxxxxxxxxxx>
Date: Mon, 6 Nov 2000 10:30:07 -0500
saylor mon
David,

Thanks!  That works but I hate the idea of having the criteria for selecting
"small" ( contains(@name, 'small') ) in multiple places - since if I decided
to now get "big" instead of small, I have to change every occurence.
Instead I'd rather get the proper set and then work within that without
duplicating the set requirements...  

Cheers,

Jeff

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Friday, November 03, 2000 4:56 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Following-sibling axis - original tree or current
result-set?



what you said:

> And given the following XSL which is attempting to output only the "small
> items" elements (elements with "small" in the name) in rows of 3 columns
> each:

what you did
And given the following XSL which is attempting to output elements which
are in positions 1 mod 3 and contain small in the name.

    <xsl:for-each select="//items/item[ (position() mod 3= 1) and
contains(@name, 'small') ]">

That filters out every third element, and then selects from those
ones that are small.

You want, I think to filter out the small  ones, then select every third
of those

    <xsl:for-each select="//items/item[contains(@name, 'small') ]
                                             [ position() mod 3= 1 ]      ">


and here you want

        <xsl:for-each select=". |
following-sibling::image[contains(@name,'small')[position() &lt; 3

David


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


 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.