Luca Morandini wrote:
I see. So when I want to separate navigation and content (having menu.xml and books.xml) and join them using aggregate, *but* use different xsl files for them I can write something like this:Piotr,the "cocoon:" pseudo-protocol doesn't search for files, but for pipelines. With this pseudo-protocol you can build pipelines and call them (more or less as subroutines) from any aggregation.
<map:pipeline>
<map:match pattern="">
<map:aggregate element="site">
<map:part src="cocoon:/menu.xml"/>
<map:part src="cocoon:/books.xml"/>
</map:aggregate>
<map:transform src="styles/menuandbook2html.xsl"/>
<map:serialize/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="menu.xml">
<map:read src="content/menu.xml"/>
<map:transform src="styles/menu.xsl"/>
<map:serialize/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="books.xml">
<map:read src="content/books.xml"/>
<map:transform src="styles/books.xsl"/>
<map:serialize/>
</map:match>
</map:pipeline>
Right? Hm. I'm not sure about it. What happens when line
<map:part src="cocoon:/menu.xml"/>
is executed? Cocoon jumps directly to pipeline which matches the pattern, makes something there (ie *map:read* (or should I use map:generate?) source xml, *transform* using xsl, *serialize* (is this neccessery here?)) and returns to second map:part.
So the joined parts are not xml files anymore but html files? So I can't use
<map:transform src="styles/menuandbook2html.xsl"/>
on them anymore and I can't also use
<map:serialize/>
Is it the right way to use aggregate or I have simply missused this feature?
And when use separate <map:pipeline> for matches and when to group this matches under one <map:pipeline>? I know it looks like completely another question;-)
Regards
Piotr Legiecki
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>