upayavira    2003/08/09 06:12:04

  Modified:    src/documentation/xdocs/userdocs/concepts book.xml
  Added:       src/documentation/xdocs/userdocs/concepts aggregation.xml
  Log:
  Couldn't find any documentation on <map:aggregate>, so here's some basic 
docs, just in time for final release. Please improve on these
  
  Revision  Changes    Path
  1.6       +1 -0      
cocoon-2.1/src/documentation/xdocs/userdocs/concepts/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/concepts/book.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- book.xml  2 Jul 2003 06:05:17 -0000       1.5
  +++ book.xml  9 Aug 2003 13:12:04 -0000       1.6
  @@ -17,6 +17,7 @@
       <menu-item label="Caching" href="caching.html"/>
       <menu-item label="Actions" href="actions.html"/>
       <menu-item label="Matchers and Selectors" 
href="matchers_selectors.html"/>
  +    <menu-item label="Aggregation" href="aggregation.html"/>
       <menu-item label="Entity Catalogs" href="catalog.html"/>
       <menu-item label="MRUMemoryStore" href="mrustore.html"/>
       <menu-item label="Persistence" href="persistence.html"/>
  
  
  
  1.1                  
cocoon-2.1/src/documentation/xdocs/userdocs/concepts/aggregation.xml
  
  Index: aggregation.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" 
"../../dtd/document-v10.dtd">
  
  <document>
  
    <header>
      <title>Aggregation</title>
      <authors>
        <person name="Upayavira" email="[EMAIL PROTECTED]"/>
      </authors>
    </header>
  
  <body>
  
      <s1 title="Introduction">
        <p>
          Aggregation allows content from a number of sources to be combined 
into a single XML stream. 
          An aggregator takes the place of the generator in a pipeline.
        </p>
        <p>
          To merge content from <code>file1.html</code> to 
<code>file2.html</code>, you can use
          something like the following in your sitemap:
        </p>
        <source>
  <![CDATA[
    <map:match pattern="page.html">
      <map:aggregate element="data">
        <map:part src="file1.xml"/>
        <map:part src="file2.xml"/>
      </map:aggregate>
      <map:transform .../>
      ...
      <map:serialize/>
    </map:match>
  ]]>
        </source>
        <p>All of the contents of the sources referenced by a 
<code>&lt;map:part&gt;</code> element will 
           be wrapped by another element as specified in the 
<code>element</code> attribute of 
           <code>&lt;map:aggregate&gt;</code>.</p>
        <p>All sources referred to by the <code>src</code> attribute are 
standard Cocoon sources, and thus
           can refer to files, to HTTP URLs, to the <code>cocoon:</code> 
protocol, or any other protocol 
           available to Cocoon.</p>
      </s1>
      <s1 title="When to Use Aggregation">
         <p>You can use aggregation when you have a fixed number of static 
sources that need to be merged. 
            In such a case, you can name each source within your sitemap, as 
shown above.</p>
         <p>If you need to merge a variable number of sources, or sources who's 
details aren't known at
            design time (and can't be calculated with wildcards), then you 
should use either an 
            <link href="../transformers/xinclude-transformer.html">XInclude 
Transformer</link> or an
            <link href="../transformers/cinclude-transformer.html">CInclude 
Transformer</link>.</p>
      </s1>
  
  </body>
  </document>
  
  
  

Reply via email to