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

RE: Displaying only a subset of tags

Subject: RE: Displaying only a subset of tags
From: "Jaime A Stuardo Bahamondes" <jstuardo@xxxxxxxxxxx>
Date: Tue, 11 Nov 2003 11:39:03 -0400
xsl paginacion
The first problem is with this:

<xsl:apply-templates select="ROW[(@id &gt;= ((../paginacion/current - 1) * ../paginacion/window + 1)) and (@id &lt;=  ((../paginacion/current - 1) * ../paginacion/window + ../paginacion/window))]" />

the XML is something like this:

<SEARCH>
  <ROWSET>
    <ROW id="1">
....
    </ROW>
    <ROW id="2">
....
    </ROW>
  </ROWSET>
  <PAGING>" & _
    <WINDOW>10</window>
    <CURRENT>1</current>
  </PAGING>
</SEARCH>

Although ((../paginacion/current - 1) * ../paginacion/window + 1) and ((../paginacion/current - 1) * ../paginacion/window + ../paginacion/window) returns 1 and 10 respectively, nothing is shown in the page.

When I write 1 and 10 directly on that apply-templates, it works.

And if I have to use XSLT to make what I explained, you mean that I have to include page numbers in XML? I know how to use XSLT to display the numbers if they are contained in XML, but for that I need to return from database the total number of records existing in the database, and that was what I was trying to avoid.

Thanks
Jaime



> -----Mensaje original-----
> De: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]En nombre de
> Jarno.Elovirta@xxxxxxxxx
> Enviado el: Martes, 11 de Noviembre de 2003 10:26
> Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Asunto: RE:  Displaying only a subset of tags
> 
> 
> Hi,
> 
> > For example, if I need to display 10 records per page, and 
> > I'm at page 15, I need to display this:
> > 
> > prev 11 12 13 14 15 16 17 18 19 20 next
> > 
> > I can carry page numbers from XML ready to display, but I'm 
> > wondering if it's possible to do it directly using XPATH.
> 
> You need XSLT, a single XPath statement will not get you 
> there. Show us what you have so far and tell us what sort of 
> problem you have.
> 
> Cheers,
> 
> Jarno - Funker Vogt: Nothing to Include
>  
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

 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.