xsl-list
[Top] [All Lists]

RE: [xsl] following-sibling help please.

2006-10-10 09:57:28
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(_at_)nag(_dot_)co(_dot_)uk]
Sent: Tuesday, October 10, 2006 12:32 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--