cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@dff.st>
Subject RE: Aggregation sample
Date Fri, 19 Apr 2002 08:10:33 GMT
On Fri, 19 Apr 2002, Volker Schneider wrote:

> Hi Torsten,
>
> I have the following pipeline:
>
>    <map:match pattern="Agg">
>      <map:aggregate element="site">
>        <map:part type="file" element="part1" src="prototyp/part1.xml"/>
>        <map:part type="file" element="part2" src="prototyp/part2.xml"/>
>      </map:aggregate>
>      <serialize type="xml"/>
>    </map:match>

>From the sample webapp:

   <map:match pattern="news/aggregate.xml">
    <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:/news/slashdot.xml" element="news"  ns="http://foo.bar.com/slashdot"/>
     <map:part src="cocoon:/news/moreover.xml" element="news"  ns="http://foo.bar.com/moreover"/>
     <map:part src="cocoon:/news/xmlhack.xml" element="news"  ns="http://foo.bar.com/xmlhack"/>
    </map:aggregate>
    <map:transform src="stylesheets/news/news.xsl"/>
    <map:serialize/>
   </map:match>
--
Torsten


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message