> From: Jeremy Quinn [mailto:[EMAIL PROTECTED]]
ing
>
> Hi All,
>
> Can anyone give me an example of aggregating with the
DirectoryGenerator?
>
> I know how to do it for assets that come from the FileGenerator but
not
> anything else.
What's the difference?
<map:aggregate element="page" ns="http://foo.bar.com/myspace">
<!--
Aggregation is a very powerful concept that allows a document
be generated from several other documents. Strictly speaking,
all parts are just concatenated in this order to a new
document.
Several things to note here:
"cocoon:" is a pseudo protocol and refers to another
pipeline. "cocoon:/" refers to a pipeline from the current
sitemap while "cocoon://" refers to a pipeline from the root
sitemap.
Other pseudo protocols exist:
"context:" is another pseudo protocol, "context://" is
refering to a resource using the servlet context.
"resource:" is yet another pseudo protocol, "resource://" is
refering to a resource from the context classloader.
These pseudo protocols are declared in cocoon.xconf
Thus the parts refer to the pipeline fragments above.
The element attribute places the content in a new root element
named as specified, using the namespace provided by the ns
attribute.
Please see docs for further explanations.
-->
<map:part src="cocoon:/path/to/my/directory/" element="dir"
ns="http://foo.bar.com/xmlhack"/>
</map:aggregate>
Provided that directory "path/to/my/directory/" is created under cocoon
webapp, it should work.
(map:part will be processed by pipeline
<map:match pattern="**/">
<map:generate type="directory" src="{1}"/>
<map:transform src="stylesheets/system/directory2html.xsl"/>
<map:serialize/>
</map:match>
)
Vadim
> Thanks for any help.
>
> regards Jeremy
> --
> ___________________________________________________________________
>
> Jeremy Quinn Karma Divers
> webSpace Design
> HyperMedia Research Centre
>
> <mailto:[EMAIL PROTECTED]>
<http://www.media.demon.co.uk>
> <phone:+44.[0].20.7737.6831> <pager:[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>