Subject: Re: [xsl] sliding window of depth 2 From: Antonio Fiol Bonnín <fiol@xxxxxxxxxx> Date: Thu, 01 Aug 2002 21:50:17 +0200 |
So the nodes you are selecting on are: node/book[position() >= $start and position() < ($qty + $start)]
<xsl:template match="book" mode="group"> <table> <xsl:apply-templates select=". | following-sibling::book" /> </table> </xsl:template>
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()<$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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] sliding window of depth 2, Américo Albuquerque | Thread | RE: [xsl] sliding window of depth 2, Américo Albuquerque |
Re: [xsl] how to get total string-l, J.Pietschmann | Date | RE: [xsl] XML to html, Falls, Travis D (CAS |
Month |