cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LEUZINGER Claude (DSIT-EX)" <>
Subject RE: [c2 proposal] map:aggregate
Date Tue, 30 Oct 2001 15:18:04 GMT
I tried to aggregate xml files from a directory 'fichprod' using this way
and i have this result in cocoon2.0rc1a , NT4 and Tomcat 3.2.2 :

  <?xml version="1.0" encoding="UTF-8" ?> 
- <news-collection xmlns:xinclude="">
  <xinclude:include parse="xml" href="file:fichprod/SDT_Prod_001.xml" /> 
  <xinclude:include parse="xml" href="file:fichprod/SDT_Prod_002.xml" /> 
  <xinclude:include parse="xml" href="file:fichprod/SDT_Prod_003.xml" /> 

I would like to have the aggregation (the content) of this files.


PS  sitemap description
     <map:match pattern="xaggr.xml">
      <map:generate type="directory" src="docs/fichprod">
     	 <map:parameter name="include" value="SDT_Prod_"/>
  	<map:transform src="stylesheets/directory-to-xinclude.xsl"/>
	<map:transform type="xinclude"/>
    	<map:serialize type ="xml"/>

-----Message d'origine-----
De : Michael Hartle []
Envoyé : dimanche 29 juillet 2001 00:18
À :
Objet : Re: [c2 proposal] map:aggregate

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,


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

View raw message