[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Help needed to make XSL for my XML

Subject: Help needed to make XSL for my XML
From: "Lim Siew Yin" <limsy@xxxxxxxxxxxxxxxxxx>
Date: Sat, 6 Nov 2004 13:46:52 +0800
how to make xsl
Hi ppl,

I have an XML file with multiple groupings of data I needed to process.
eg.
<tag1>
   <tag11>
     <tagXX>
       <DATA1>
       <DATA2>
     <tagXX>
       <DATA1>
       <DATA2>
<tag2>
   <tag21>
     <tagXX>
       <DATA1>
       <DATA2>

To me, I am only interested to group all the tagXX and process their data.  I need to group all occurances of tagXX, and to print out their data.  So far, I can do this using...
 <xsl:apply-templates select="//tagXX"/>

However, I also need to do paging.  I added 2 parameters (Start and PageSize) to control the retrieval and ended up with...
 <xsl:apply-templates select="//tagXX[position() &gt;= $pStartRecord  and position() &lt; ($pStartRecord + $pDataPageSize)]"/>

Problem is, the above treats different occurances of tagXX separately.
Which means, it is applied repeatly for each occurance.
eg.
1st grouping of tagXX contains 10 instance.
2nd grouping of tagXX contains 3 instance.
3rd grouping of tagXX contains 5 instance.

If my Start is 1 and my pagesize is 5,  (1st page)

I ended up with 5 + 3 + 5 records.

And if my Start is 6 and my pagesize is 5, (2nd page)

I ended up with 5 + 0 + 0 records.


Can someone help me? I have already wasted 3 days at this but with no avail.  Any info/help is greatly appreciated.  Thank you for your time.


SY Lim.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.