Vassilis Koutavas wrote:
What is the right way to create one aggregated xml file from all the
xml files in a directory?
Take a look at the resume input plugin in the whiteboard in SVN head [1]
In particular:
<map:match pattern="team/all.source.xml">
<map:generate type="directory"
src="{properties:content.xdocs}/team/resume">
<map:parameter name="include" value=".*.xml$"/>
</map:generate>
<map:transform src="resources/stylesheets/directory2resumes.xsl"/>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
This uses CInclude to create the aggregate document, this utilises
Cocoons caching to its fullest extent. It can be done with xinclude, but
Cocoon can't cache this since the inclusion is done in the XSLT parser.
You could also do it with the XSLT document() function, but again this
means Cocoon can't cache it.
Ross