This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
grouping and sorting milestone elements
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] grouping and sorting milestone elements
- From: Fred Boon <fredboon at yahoo dot com>
- Date: Mon, 22 Jan 2001 11:55:08 -0800 (PST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
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