nice one Askild, couldnt have put it better myself :)

Askild Aaberg Olsen wrote:
Yeah Jorg did suggest to use Directory generator. But what should the logic be. For eg: - the code in sitemap for getting directory contents list is


<map:match pattern="downloadMain">
<map:generate type="directory" src=".">
<map:parameter name="depth" value="5"/>
</map:generate>
<map:transform src="stylesheets/dir2html.xsl"/>


       <map:serialize/>
   </map:match>



And the xml file for zipping a file is


<zip-archive:archive xmlns:zip-archive="http://apache.org/cocoon/zip-archive/1.0";>


<zip-archive:entry name = "a.txt" src="C:\jboss-3.2.1\server\im\deploy\cocoon.war\mointest\a.txt"/>

</zip-archive:archive>

How do I combine both the entities to zip an entire directory with appropriate file names.


You seem to miss one of the basic concepts about pipelines:

Generate -> Transform -> Serialize
(http://cocoon.apache.org/2.1/userdocs/concepts/index.html#Pipeline+Processi
ng)

You should apply a transformer-step after the directorygenerator,
transforming it's output the the input required by the
ziparchive-serializer.

http://cocoon.apache.org/2.1/userdocs/transformers/xslt-transformer.html

You also need to get some basic knowledge about XSLT:
http://wiki.cocoondev.org/Wiki.jsp?page=XSLT

Hope this helps to get you on the right track...

Askild
-


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to