This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Following-sibling axis - original tree or current result-set?
- To: xsl-list at mulberrytech dot com
- Subject: Re: Following-sibling axis - original tree or current result-set?
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Fri, 3 Nov 2000 21:56:16 GMT
- References: <14851.6167.294000.54336@menteith.com>
- Reply-To: xsl-list at mulberrytech dot com
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() < 3
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list