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

sliding window of depth 2

Subject: sliding window of depth 2
From: "Américo Albuquerque" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Thu, 1 Aug 2002 18:17:40 +0100
sliding window
Hi!

I have a xml file with this structure:
<doc>
 <node>
  <book/>
  <book/>
  ...
 </node>
 <node>
  <book>
  ...
 </node>
 ...
</doc>
I aplly to it this stylesheet

<xsl:template match="doc">
 <xsl:apply-templates select="node[position()>=$start and
position()&lt;$start+$QNT]"/>
</xsl:template>

<xsl:template match="node">
 <table>
  <xsl:apply-templates/>
 </table>
</xsl:template>

<xsl:template match="book">
 <tr>
  <td>(some text here) </td>
 </tr>
</xsl:template>

and I want to make a sliding window, i.e., I want to show $QNT nodes
each time strating at $start. this stylesheet does that but only to the
node nodes, i.e., it shows up to $QNT node, starting at $start, but I
also want to include the books on that count.

for example:
if start= 5 and QNT=10 then I want to apply the templates to the 10
(node|node/book) after the first 5 (node|node/book)

thanks in advance.

Américo Albuquerque






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


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.