cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: [jira] Closed: (COCOON-649) [PATCH] Made SQLTransformer paginatable
Date Thu, 02 Mar 2006 21:51:57 GMT
It looks like the patch was made against the old CVS for Cocoon.

My did you Close, rather than just ask for a new patch?

-David

> Jean-Baptiste Quenot closed COCOON-649:
> ---------------------------------------
> 
>     Resolution: Invalid
> 
> This is a good idea.  However patch does not apply.  Feel free to reopen if you can provide
an updated patch.
> 
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java
> |===================================================================
> |RCS file: /home/cvspublic/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java,v
> |retrieving revision 1.6
> |diff -u -r1.6 SQLTransformer.java
> |--- src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java 
   11 Jun 2003 00:28:31 -0000      1.6
> |+++ src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java 
   11 Jun 2003 15:35:17 -0000
> --------------------------
> Patching file SQLTransformer.java using Plan A...
> Hunk #1 failed at 52.
> Hunk #2 failed at 87.
> Hunk #3 failed at 178.
> Hunk #4 failed at 186.
> Hunk #5 failed at 231.
> Hunk #6 failed at 251.
> Hunk #7 failed at 304.
> Hunk #8 failed at 333.
> Hunk #9 failed at 348.
> Hunk #10 failed at 361.
> Hunk #11 failed at 390.
> Hunk #12 failed at 407.
> Hunk #13 failed at 461.
> Hunk #14 failed at 480.
> Hunk #15 failed at 499.
> Hunk #16 failed at 518.
> Hunk #17 failed at 562.
> Hunk #18 failed at 601.
> Hunk #19 failed at 627.
> Hunk #20 failed at 669.
> Hunk #21 failed at 696.
> Hunk #22 failed at 720.
> Hunk #23 succeeded at 747 with fuzz 2 (offset 15 lines).
> Hunk #24 failed at 766.
> Hunk #25 failed at 817.
> Hunk #26 failed at 848.
> Hunk #27 failed at 922.
> 26 out of 27 hunks failed--saving rejects to SQLTransformer.java.rej
> done
> 
> 
> > [PATCH] Made SQLTransformer paginatable
> > ---------------------------------------
> >
> >          Key: COCOON-649
> >          URL: http://issues.apache.org/jira/browse/COCOON-649
> >      Project: Cocoon
> >         Type: Improvement
> >   Components: - Components: Avalon
> >     Versions: 2.1.8
> >  Environment: Operating System: All
> > Platform: All
> >     Reporter: Boon Hian Tek
> >     Assignee: Jean-Baptiste Quenot
> >     Priority: Minor
> >  Attachments: contrib-2003_37_11.tar.gz, sql_transformer_2003_04_28.tar.gz, sqlpatch.tar,
sqltransformer.patch.tar.gz
> >
> > Hi,
> > Thanks to idea and code from Irv Salisbury III, I made some
> > changes to src/blocks/database/.../transformation/SQLTransformer
> > and made it "Paginator"able.
> > With this patch, you can set page-size and current-page via
> > the sitemap and have paging done via result set controls rather
> > than filtering through a Paginator Transformer.
> > While that transformer works, in the case of a database query,
> > it just seemed a tad wasteful not to do the paging at a lower
> > level.
> > I have made some changes to the Paginator code as well to allow
> > calls from PagingSQLTransformer to spit out paging related tags.
> > This will ease any transition of switching from using the
> > paginator transformer to using this PagingSQLTransformer.
> > Before using PagingSQLTransformer,
> >   <map:match pattern="{1}/view/Show[:punct:]*([0-9]*)[:punct:]*" type="regexp">
> >     <map:generate src="xsp/view/display-all.xsp"/>
> >     <map:transform type="sql">
> >       <map:parameter name="use-connection" value="photo"/>
> >       <map:parameter name="show-nr-of-rows" value="true"/>
> >     </map:transform>
> >     <map:transform type="paginator" src="pagesheets/display.xml"/>
> >     <map:transform src="stylesheets/view/display-all.xsl"/>
> >     <map:act type="request">
> >     <map:transform src="stylesheets/page/simple-page2html.xsl">
> >       <map:parameter name="app-context" value="{context}"/>
> >       <map:parameter name="requestURI" value="{requestURI}"/>
> >     </map:transform>
> >     </map:act>
> >     <map:transform src="stylesheets/page/simple-pagination.xsl"/>
> >     <map:serialize/>
> >   </map:match>
> >   
> > Using PagingSQLTransformer,
> >   <map:match pattern="{1}/view/Show[:punct:]*([0-9]*)[:punct:]*" type="regexp">
> >     <map:generate src="xsp/view/display-all.xsp"/>
> >     <map:transform type="sql">
> >       <map:parameter name="use-connection" value="photo"/>
> >       <map:parameter name="show-nr-of-rows" value="true"/>
> >       <map:parameter name="page-size" value="10"/>
> >       <map:parameter name="current-page" value="{1}"/>
> >       <map:parameter name="pagesheet-source" value="pagesheets/display.xml"/>
> >     </map:transform>
> >     <map:transform src="stylesheets/view/display-all.xsl"/>
> >     <map:act type="request">
> >     <map:transform src="stylesheets/page/simple-page2html.xsl">
> >       <map:parameter name="app-context" value="{context}"/>
> >       <map:parameter name="requestURI" value="{requestURI}"/>
> >     </map:transform>
> >     </map:act>
> >     <map:transform src="stylesheets/page/simple-pagination.xsl"/>
> >     <map:serialize/>
> >   </map:match>
> > I made some patch to the Paginator code that should fix bug
> > #13865.
> > Further changes to the Paginator code now allows, multiple
> > range-links too.
> > One of the inconsistency (maybe) from all these changes is that
> > I make it so that "page-size" is configured for the SQLTransformer
> > and the pagesheet/rules/count/num is ignored. I have not figure
> > out a way to use both easily. I will have to do some more thinking
> > on that. What is easier to understand? Comments?
> > This is my first time contributing in a "patch" sort of way to
> > any open source project, so excuse me if I get any procedure
> > wrong.
> > Boon
> 
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira

Mime
View raw message