RE: [xsl] "re-calling" a template from <a> anchor

Subject: RE: [xsl] "re-calling" a template from <a> anchor
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 10 May 2007 08:47:04 +0100
> I tried it but I get an Http error 500. So I'm trying to 
> display a fixed number(e.g. 5) of elements and have a link 
> wich when clicked displays the next 5 elements let's say. The 
> only way I figured to do it was to call the same template but 
> I can't make it work. Anyone have any solution? 10x

You haven't understood the processing model. You run an XSLT transformation,
it produces an HTML document, the browser renders the document, the user
clicks on a link. By that time the XSLT processor has long ago finished its
job and gone back to bed. It's not going to suddenly execute the next
instruction after the one that generated the link that the user clicked on.
You need to arrange for the user action to trigger a new transformation that
generates a new HTML document that refreshes the display in the browser.

How this works in detail depends on your application environment - I don't
know much about Cocoon.

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

Current Thread