cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Hartle <>
Subject Re: [c2 proposal] map:aggregate
Date Sat, 28 Jul 2001 22:17:57 GMT
Vadim Gritsenko wrote:

>>But - hopefully - we have other solution: X/Cinclude mechanism
>>which is perfectly suitable in this case:
>><map:match pattern="documents_pdf/documentation.pdf">
>>  <map:generate type="directory" src="docs/xdocs"/>
>>  <map:transform src="filter-xml-files.xsl"/>
>>  <map:transform src="xml-file-to-xinclude.xsl"/>
>>  <map:transform type="xinclude"/>
>>  <!-- here you have all xdocs in one stream -->
>>  ....
This way worked perfectly for aggregating XML news articles in a 
directory subtree, I used

   <map:match pattern="collection/news-overview.xml">
    <map:generate type="directory" src="repository/news/current">
     <map:parameter name="root" value="repository"/>
     <map:parameter name="depth" value="2"/>
    <map:transform src="stylesheets/directory-to-xinclude.xsl"/>
    <map:transform type="xinclude"/>
    <map:serialize type="xml"/>

for generating a collection document containing all current news in the 
repository which in turn can then be aggregated to the pages in need for 
news. I attached the directory-to-xinclude.xsl I wrote; a drawback of 
this solution is that the DirectoryGenerator does not provide caching of 
its results.

Best regards,


View raw message