RE: [xsl] Re: Key and/or grouping questions.

Subject: RE: [xsl] Re: Key and/or grouping questions.
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 6 Dec 2002 09:42:56 -0000
> > I think a better approach would be to restructure your code 
> to use the
> > usual:
> > 
> > <xsl:for-each select="xx[position() mod $size = 1]">
> >   ..
> >   <xsl:for-each select=".|following-sibling[position() 
> &lt;= $size]">
> 
> Trying something similar to the nested for-each, excpet my 
> outer for-each is somthing similar to the following: 
> 
>    <xsl:for-each select="xx[position() = $startPos]">
> 
> I get the line at the starting postion just fine, but I get 
> none of the following-sibling elements.  If the outer loop 
> selects one element (or even every nth element), are the 
> elements selected by the outer loop going to have siblings 
> other than those selected by the outer loop; I'm guessing 
> not.  I suspect the inner loop in the algorithm above is 
> going to process a number nodes equal to $size, but those 
> nodes will be every nth element from the xx where n = $size.

I was guessing at you input document structure, because I don't think
you showed us what it looked like. Perhaps the elements you are looking
for are not actually siblings of each other.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


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


Current Thread