cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Franz <afra...@optushome.com.au>
Subject Re: Pagination with dynamic XML (Was How-to CForms with Pagination)
Date Fri, 10 Jun 2005 22:04:08 GMT
Options:
#1: Use PaginatorTransformer: (dataset from XSP cached)
http://cocoon.apache.org/2.0/howto/howto-paginator-transformer.html

#2: Use XLST (dataset from XSP cached)
    <xsl:for-each select="dataset/row">
    <xsl:if test="(position() &gt;= $lineNumber1) and (position() &lt; 
($lineNumer1 + $linesPerPage))">
    <tr>
        <xsl:apply-templates select="(.)" >
            <xsl:with-param name="pos" select="position()"/>
        </xsl:apply-templates>
    </tr>
    </xsl:if>
    </xsl:for-each>

#3: Use SQL  ....where recnum....
(and let the database handle the caching)



Chris Marasti-Georg wrote:

>I have a project where the searches can sometimes take a few seconds,
>and are run as Xqueries in an eXist database.  Since the search returns
>all of the results, it doesn't make sense to hit the database with the
>same search each time the user wants to view the next page of results.
>If you have control over the users setup, and can afford a
>css/javascript solution, I'd just make each "page" of results a div, set
>them all to display:none, and use js to show/hide the page the users
>wants.
> 
>Chris
>
>  
>
>>-----Original Message-----
>>From: Dustin N. Jenkins [mailto:djenkins@invoqsystems.com] 
>>Sent: Wednesday, June 08, 2005 4:47 PM
>>To: Cocoon Users Group
>>Subject: Pagination with dynamic XML (Was How-to CForms with 
>>Pagination)
>>
>>Sorry for reposting like this, but I wanted to simplify it a 
>>bit as my frustration is growing fast and I wanted to try and 
>>get feedback faster.
>>
>>In all the examples of Pagination I've seen, there's always 
>>been a static file to refer to as the source, but in my case 
>>my paginated list will vary.  So I guess my question now is, 
>>has anybody gotten the Pagination to work as expected?  I 
>>suppose writing my own wouldn't be all that hard, but I don't 
>>like rewriting something that exists already.
>>
>>Many thanks again,
>>Dustin
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message