xsl-list
[Top] [All Lists]

?simple position grouping problem

2004-07-03 00:51:34
I think must be simple, but I'm struggling..

<x>
<y id="1"/>
  <b id="1"/>
  <b id="2"/>
<y id="2"/>
  <b id="3"/>
<y id="3"/>
  <b id="4"/>
  <b id="5"/>
  <b id="6"/>
</x>

how do I select only <b>'s that follow particular <y>'s; to then create

<x>
<y id="1"><b id="1"/><b id="2"/></y>
<y id="2"><b id="3"/></y>
<y id="3"><b id="4"/><b id="5"/><b id="6"/></y>
</x>

There's no known relationship between the elements but for their position.
using XSLT 2.0.

Thanks and regards
davidpbrown



<Prev in Thread] Current Thread [Next in Thread>