cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LEUZINGER Claude (DSIT-EX)" <claude.leuzin...@sncf.fr>
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="http://www.w3.org/1999/XML/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" /> 
  </news-collection> 

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

Claude.

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

-----Message d'origine-----
De : Michael Hartle [mailto:mhartle@hartle-klug.com]
Envoyé : dimanche 29 juillet 2001 00:18
À : cocoon-dev@xml.apache.org
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 -->
>>  ....
>></map:match>
>>
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:generate>
    <map:transform src="stylesheets/directory-to-xinclude.xsl"/>
    <map:transform type="xinclude"/>
    <map:serialize type="xml"/>
   </map:match>

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,

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message