[xsl] grouping and sorting milestone elements

Subject: [xsl] grouping and sorting milestone elements
From: Fred Boon <fredboon@xxxxxxxxx>
Date: Mon, 22 Jan 2001 11:55:08 -0800 (PST)
Can anyone help with the following transformation,
please?

input:
<text>
 <chapter>
  <page n="1"/>
  page1Text
  <page n="2"/>
  page2Text
  <page n="3"/>
  page3Text
  <page n="4"/>
  page4Text
 </chapter>
</text>

desired output:

<pageLayout>
 <pageGroup n="1">
  <page n="1">page1Text</page>
  <page n="2">page2Text</page>
 </pageGroup>

 <pageGroup n="2">
  <page n="3">page3Text</page>
  <page n="4">page4Text</page>
 </pageGroup>
</pageLayout>

There should never be an odd number of <page> elements
so not catching the exception is not necessary.
Desireable, yes, but not necessary.

I tried modifing the XSLT code from a previous post by
Jeni Tennison 010119 in reply to changing <br/>s to
<p>...</p>, but to no avail.

thanks,

fred

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

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


Current Thread