RE: [xsl] following-sibling help please.

Subject: RE: [xsl] following-sibling help please.
From: "Danny Leblanc" <leblancd@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Oct 2006 12:57:11 -0400
Hello all,

  That is exactly what I need, thank you both. What I did not know was how to
get the name it (the self::header part). This worked like a charm.

  David, I actually do not want to group them together as I need everything on
the second level even though logically their should be a parent for each
"set".

Thanks again.

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Tuesday, October 10, 2006 12:32 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] following-sibling help please.



the direct answer to your question is

test="following-sibling::*[1][self::header]"
which is true just if the immediately following sibling is header, but
it sounds  lie wha you really want is to group the child elements of
root, with each group starting with a header, so that's

<xsl:for-each-group select="*" group-starting-with="header">
  ... something ...

David

Current Thread