This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

grouping and sorting milestone elements


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]