RE: [xsl] "re-calling" template part 2

Subject: RE: [xsl] "re-calling" template part 2
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 10 May 2007 11:15:28 +0100
You're doing the transformation server-side. So when you generate the HTML
code for the "next" button you need to include a URL which causes the next
page to be requested. This will tend to look something like this:

href="http://my.site.com/x/y/z?start=20&count=10

where start is the first record you want displayed and count is the number
of records to display. These will be values that you compute in your XSLT
code.

When this URL arrives at the server it needs to trigger execution of some
kind of servlet/script which runs an XSLT transformation (passing start=20
and count=10 as parameters), where the output of the XSLT transformation is
an HTML page displaying the required records, and containing a next button
with the associated URL href="http://my.site.com/x/y/z?start=30&count=10 

I'm afraid I've no idea how to translate that into Cocoon language.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Vaduvoiu Tiberiu [mailto:vaduvoiutibi@xxxxxxxxx] 
> Sent: 10 May 2007 10:50
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] "re-calling" template part 2
> 
> Ok, I'm going to try to explain what I need to do, hopeflly 
> someone can give me at least a starting point or clue on how 
> to do it. 
> I have an xml like
> 
> <newslist>
>        <news>
>             <name>news1</name>
>             <location>/folder/news1.xml</location>
>         </news>
>        <news>
>             <name>news2</name>
>             <location>/folder/news2.xml</location>
>         </news>
> 
> ...and so on up to news100 let's say.
> 
> I need to display the news names on a page 10 at the 
> times(because there are to many and there are other issues 
> that kind of force me to display only like 9 or 10). So when 
> someone loads the page it sees just 10 news, like
> news1
> news2
> ...
> news10
> 
> Under the div or table where the news names are displayed I 
> should have 2 buttons or anchors "previous" and "next" and 
> when the user clicks on the them, he sees the next 10 
> entries(news11,news12,etc) or the previous 10 on the page. 
> Hope you see the picture. I'm thinking is not such a hard 
> thing to achieve but so far I can't manage to make it work. 
> Anyone can give me a clue on how this problem should be 
> approched. 10x a lot
> 
> P.S If anyone knows some documentation/tutorial/e-books on 
> cocoon please give me a link cause I've been looking on 
> google for tutorials/ebooks on cocoon and haven't found 
> almost anything.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 

Current Thread