|
Subject: RE: [xsl] Displaying only a subset of tags From: "Jaime A Stuardo Bahamondes" <jstuardo@xxxxxxxxxxx> Date: Tue, 11 Nov 2003 11:39:03 -0400 |
The first problem is with this:
<xsl:apply-templates select="ROW[(@id >= ((../paginacion/current - 1) * ../paginacion/window + 1)) and (@id <= ((../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: [xsl] 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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Displaying only a subset , Mukul Gandhi | Thread | [xsl] Doubt using xsl:message in xs, ARULRAJ |
| RE: [xsl] Search engine, SHEIKH Sajjad | Date | Re: [xsl] converting XML to XML pro, Abhijit Junnare |
| Month |