[Home] [By Thread] [By Date] [Recent Entries]
Vaduvoiu Tiberiu wrote:
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 What you need is two things: one, an understanding of how Cocoon can help you building your web application and how it links your XML sources together and two, how XSLT can help you with it. To get what you want, I think a parameter is in order, which gives you the "from": <!-- place this where you need it --> <xsl:apply-templates select="news[position() > $from and position() < $from + 10]" /> <a href="link-to-previous?from={$from - 10}">Previous</a> <a href="link-to-next?from={$from + 10}">Next</a> <!-- match the news items -->
<xsl:template match="news">
<a href="link-to-news-item?id={$id}">
<xsl:value-of select="name" />
</a>
</xsl:template>How you use this code and how you create your links and how this maps to your actions in Cocoon is, of course, totally up to you. Cocoon is not an easy framework and it requires quite some understanding of different techniques before you can master it. 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. Google gave me these: * ISBN 0764543555 * ISBN 0672322579 * ISBN 0735712352. The last one is also available as ebook: http://safari.oreilly.com/0735712352 (not sure of the others). plus more... Cheers, -- Abel
|

Cart



