cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject cocoon:/ and content aggregation
Date Mon, 29 Oct 2001 15:59:17 GMT
AFAIK the cocoon: protocol has a scope of the current sitemap.
But I need to aggregate a resource from the parent sitemap.

Since it is also at the servlet context I tried:

        ...
        <map:aggregate element="page">
         <map:part src="context:/inRootSitemap.xml"/>
         <map:part src="cocoon:/inThisSitemapUri1.xsp"/>
         <map:part src="cocoon:/inThisSitemapUri2.xsp"/>
        </map:aggregate>
        ...

This did not work. Then I tried:

        ...
        <map:aggregate element="page">
         <map:part src="../inRootSitemap.xml"/>
         <map:part src="cocoon:/inThisSitemapUri1.xsp"/>
         <map:part src="cocoon:/inThisSitemapUri2.xsp"/>
        </map:aggregate>
        ...

This seems to work.
Then I figured out I could create a mapping in the
current sitemap with a generator grabbing the XML
file via the context: protocol. So it would be accessible
in the subsitemap:
        ...
        <map:aggregate element="page">
         <map:part src="cocoon:/inRootSitemap.xml"/>
         <map:part src="cocoon:/inThisSitemapUri1.xsp"/>
        ...

        <map:match pattern="inRootSitemap.xml">
         <map:generate src="context:/inRootSitemap.xml"/>
          ...

Now this leads to some questions:
1. Shouldn't the context: "protocol" also work at the
   src attribute of map:part?
2. Was is the expense of not using the cocoon: protocol
   at map:part?

Comments?
--
Torsten


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


Mime
View raw message