cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conal Tuohy" <>
Subject RE: Recursive Pipeline
Date Tue, 16 Mar 2004 03:57:02 GMT
Ack! Fingers slipped! Here's what I meant to write:

> I did something like this once, to aggregate a list of html 
> pages together. Each page had a [next] link at the bottom, 
> and my pipeline basically followed these links. I think you 
> want something similar. I don't have the code still, but from 
> memory, something like this:

<map:match pattern="page/*">
	<map:generate type="html" src=""{1}"/>
	<map:transform src="check-if-found-or-keep-looking.xsl">
		<map:parameter name="current-page" value="{1}"/>
	<map:transform type="xinclude"/>
	<map:serialize type="xml"/>

Call the pipeline first with "page/1". 

The XSL check-if-found-or-keep-looking.xsl should check if the record is in the page: if so
it should return the contents of the page (i.e. an identity transform). If not found, it should
return only an xinclude statement. So the entire output document would be just the single

	xmlns:xi="I-don't-remember-the-xinclude-namespace-uri :-)" 

Then the xinclude transformer handles the rest. If the record was found then the xinclude
transformer does nothing, and the page is serialized. If the record was not found then the
xinclude transformer will make the recursive sitemap call.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message