cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/webapp/samples/xinclude/content includehtml.xml loopinclusion.xml somehtml.xhtml test.xml test2.xml test3.xml test4.xml test5.xml xmlbase.xml
Date Sat, 16 Aug 2003 01:44:12 GMT
vgritsenko    2003/08/15 18:44:12

  Modified:    src/blocks/asciiart/conf asciiart.xsamples
               src/blocks/batik/samples samples.xml
               src/webapp/samples samples.xml
               src/webapp/samples/aggregation samples.xml sitemap.xmap
  Added:       src/webapp/samples/aggregation/content includehtml.xml
                        loopinclusion.xml somehtml.xhtml test.xml test2.xml
                        test3.xml test4.xml test5.xml xmlbase.xml
  Removed:     src/webapp/samples/xinclude samples.xml sitemap.xmap
               src/webapp/samples/xinclude/content includehtml.xml
                        loopinclusion.xml somehtml.xhtml test.xml test2.xml
                        test3.xml test4.xml test5.xml xmlbase.xml
  Log:
  Samples tweaks: move xinclude inside aggregation, together with cinclude.
  Add link to mozilla svg project.
  
  Revision  Changes    Path
  1.2       +2 -2      cocoon-2.1/src/blocks/asciiart/conf/asciiart.xsamples
  
  Index: asciiart.xsamples
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/asciiart/conf/asciiart.xsamples,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- asciiart.xsamples	20 Jul 2003 04:47:27 -0000	1.1
  +++ asciiart.xsamples	16 Aug 2003 01:44:12 -0000	1.2
  @@ -2,8 +2,8 @@
   
   <xsamples xpath="/samples" unless="group[@name='asciiart']">
   
  -  <group name="asciiart">
  -    <sample name="ASCII art" href="asciiart/">
  +  <group name="ASCII Art">
  +    <sample name="ASCII Art" href="asciiart/">
         Plain text files with character-based artwork and diagrams are presented
         in various formats, e.g. plain text, JPEG, PNG
       </sample>
  
  
  
  1.4       +4 -1      cocoon-2.1/src/blocks/batik/samples/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/batik/samples/samples.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- samples.xml	7 May 2003 19:15:02 -0000	1.3
  +++ samples.xml	16 Aug 2003 01:44:12 -0000	1.4
  @@ -56,6 +56,9 @@
       <sample name="Adobe SVG Viewer" href="http://www.adobe.com/svg/viewer/install/main.html">
         SVG browser plugin
       </sample>
  +    <sample name="Mozilla SVG Project" href="http://www.mozilla.org/projects/svg/">
  +      Mozilla with native SVG support
  +    </sample>
     </group>
   
   </samples>
  
  
  
  1.24      +98 -104   cocoon-2.1/src/webapp/samples/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/samples.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- samples.xml	15 Aug 2003 15:57:32 -0000	1.23
  +++ samples.xml	16 Aug 2003 01:44:12 -0000	1.24
  @@ -5,87 +5,82 @@
   <samples name="Cocoon Samples" xmlns:xlink="http://www.w3.org/1999/xlink">
   
     <group name="The Power of XML">
  -   <sample name="Hello World!" href="hello-world/">
  -    The complete separation between content and style
  -    leads to a very powerful multi-channeling solution where you can
  -    apply different stylesheets to the same content and generate different
  -    flavors of it.
  -   </sample>
  -   <sample name="XML-ized web sites" href="sites/">
  -    A couple of existing web sites have been xml-ized to show you
  -    how easier it is to handle pure-content markup.
  -   </sample>   
  -   <sample name="Presentation Slides" href="slides/slides">
  -    An example of more complex use of XSLT for navigation and content filtering.
  -   </sample>   
  -   <sample name="Internationalization (i18n) &amp; Localization (l10n)" href="i18n/">
  -    Since XML is based on Unicode, it can be used to encode all types of
  -    languages. Here is an example of the power of such an approach with
  -    the help of those i18n and l10n Cocoon facilities.
  -   </sample>
  -   <sample name="Syndication and Content Aggregation" href="aggregation/">
  -    Separation of content and style allows not only to serve your content
  -    in different ways, but also to syndicate, aggregate or otherwise transform
  -    content provided by other web sites.
  -   </sample>
  -   <sample name="Catalog Entity Resolver" href="catalog/">
  -    XML is handy but also very complex. Cocoon integrates a number of 
  -    facilities to help you during your journey through XML-land. One of these
  -    is the centralized handling of resolving network resources 
  -    (e.g. DTDs, symbols, character entity sets, images) to local copies through
  -    the use of catalogs.
  -   </sample>
  -   <sample name="XInclude" href="xinclude/">
  -     XInclude transformer sample. XInclude merges XML documents, or parts of
  -     them, into one document.
  -   </sample>
  +    <sample name="Hello World!" href="hello-world/">
  +      The complete separation between content and style
  +      leads to a very powerful multi-channeling solution where you can
  +      apply different stylesheets to the same content and generate different
  +      flavors of it.
  +    </sample>
  +    <sample name="XML-ized web sites" href="sites/">
  +      A couple of existing web sites have been xml-ized to show you
  +      how easier it is to handle pure-content markup.
  +    </sample>   
  +    <sample name="Presentation Slides" href="slides/slides">
  +      An example of more complex use of XSLT for navigation and content filtering.
  +    </sample>   
  +    <sample name="Internationalization (i18n) &amp; Localization (l10n)" href="i18n/">
  +      Since XML is based on Unicode, it can be used to encode all types of
  +      languages. Here is an example of the power of such an approach with
  +      the help of those i18n and l10n Cocoon facilities.
  +    </sample>
  +    <sample name="Syndication and Content Aggregation" href="aggregation/">
  +      Separation of content and style allows not only to serve your content
  +      in different ways, but also to syndicate, aggregate or otherwise include
  +      and transform content provided by other web sites.
  +    </sample>
  +    <sample name="Catalog Entity Resolver" href="catalog/">
  +      XML is handy but also very complex. Cocoon integrates a number of 
  +      facilities to help you during your journey through XML-land. One of these
  +      is the centralized handling of resolving network resources 
  +      (e.g. DTDs, symbols, character entity sets, images) to local copies through
  +      the use of catalogs.
  +    </sample>
     </group>
   
     <group name="Cocoon Control Flow">
  -   <sample name="Examples" href="flow/">
  -    Examples of Cocoon's control flow of Web pages.
  -   </sample>
  -   <note>
  -    Since the Cocoon Control Flow is a core technology you find more examples
  -    that make use of it e.g. the Petstore, JXForms and Woody block
  -   </note>      
  +    <note>
  +      Since the Cocoon Control Flow is a core technology you find more examples
  +      that make use of it e.g. the Petstore, JXForms and Woody block
  +    </note>      
  +    <sample name="Examples" href="flow/">
  +      Examples of Cocoon's control flow of Web pages.
  +    </sample>
     </group>  
   
  -  <group name="More core samples">
  -   <sample href="modules/" name="The Power of Sitemap: Input Modules">
  -    This example shows the usage of Input Modules in sitemap attribute expressions.
  -   </sample>
  -   <sample href="sources/" name="The Power of Sitemap: Sources">
  -    This example shows the usage of sources in the sitemap.
  -   </sample>    
  -   <sample href="xsp/" name="Extensible Server Pages">
  -     Extensible Server Pages.
  -   </sample>   
  -   <sample href="simpleform/" name="Simple Forms">
  -     These examples show a simple way to work with HTML forms. More powerful
  -     form solutions can be found in the blocks section. 
  -   </sample>
  -    <sample href="imagereader/" name="Imagereader">
  -     ImageReader
  -   </sample> 
  +  <group name="More Core Samples">
  +    <sample href="modules/" name="The Power of Sitemap: Input Modules">
  +      This example shows the usage of Input Modules in sitemap attribute expressions.
  +    </sample>
  +    <sample href="sources/" name="The Power of Sitemap: Sources">
  +      This example shows the usage of sources in the sitemap.
  +    </sample>    
  +    <sample href="xsp/" name="Extensible Server Pages">
  +      Extensible Server Pages.
  +    </sample>   
  +    <sample href="simpleform/" name="Simple Forms">
  +      These examples show a simple way to work with HTML forms. More powerful
  +      form solutions can be found in the blocks section. 
  +    </sample>
  +    <sample href="imagereader/" name="Image Reader">
  +      Examples of ImageReader component usage
  +    </sample> 
       <sample href="paginator/" name="Paginator">
  -     Paginator
  -   </sample> 
  -   <sample href="soap/" name="SOAP">
  -     Cocoon ships with facilities for immediate connection to SOAP resources.
  -     These examples show you how to connect to any web service with a few
  -     lines of XML markup.
  -   </sample> 
  -   <note>
  -   	 There is also an Axis block available that integrates Axis into Cocoon.
  -   </note>   
  -   <sample href="stream/order" name="B2B: Order Page" xlink:role="dynamic">
  -     An example of B2B processing.
  -   </sample>   
  +      Examples of Paginator transformer usage
  +    </sample> 
  +    <sample href="soap/" name="SOAP">
  +      Cocoon ships with facilities for immediate connection to SOAP resources.
  +      These examples show you how to connect to any web service with a few
  +      lines of XML markup.
  +    </sample> 
  +    <note>
  +      There is also an Axis block available that integrates Axis into Cocoon.
  +    </note>   
  +    <sample href="stream/order" name="B2B: Order Page" xlink:role="dynamic">
  +      An example of B2B processing.
  +    </sample>   
     </group>
     
   <!-- 
  -
     FIXME (SM): obsoleted by xmlform?
       
     <group name="Sample Forms">
  @@ -98,43 +93,42 @@
         input and report validation errors to the user through a taglib.
       </sample>
     </group>
  -
   -->
     
  -  <group name="Block samples">
  +  <group name="Block Samples">
       <sample name="Blocks with samples" href="blocks">
  -    Functionality outside the core has been moved to units called "blocks".
  -    This will lead to a more modular Cocoon. Here you find the samples 
  -    provided by the currently installed blocks. 
  -   </sample>
  +      Functionality outside the core has been moved to units called "blocks".
  +      This will lead to a more modular Cocoon. Here you find the samples 
  +      provided by the currently installed blocks. 
  +    </sample>
     </group>
    
     <group name="System Tools And Pages">
  -   <sample name="Status Page" href="status.html">
  -    This page shows the current internal status of cocoon, along with
  -    information on the cache and the object stores.
  -   </sample>
  -   <sample name="Clear Cache" href="clearcache.html">
  -    Empties the Cocoon cache.
  -   </sample>
  -   <sample name="Clear Persistent Store" href="clearpersistentstore.html">
  -    Empties the Cocoon persistent store.
  -   </sample>
  -   <sample name="Request Page" href="request.html">
  -    This example shows the usage of the RequestGenerator.
  -   </sample>
  -   <sample name="Error handling" href="errorhandling/">
  -    An example page producing exceptions and handling them. Demonstrates the 
  -    handler hierarchy and the exception selectors.
  -   </sample>
  -   <sample name="Link Status" href="linkstatus">
  -    Verify that there are no broken hyperlinks in the local Cocoon
  -    documentation. This sample will start at the home page of the local
  -    documentation webapp and traverse each internal link, reporting its status
  -    in a colour-coded table. Be patient - this process will take a while.
  -    NOTE: this will work only if you have included the documentation when 
  -    you built the web application
  -   </sample>
  +    <sample name="Status Page" href="status.html">
  +      This page shows the current internal status of cocoon, along with
  +      information on the cache and the object stores.
  +    </sample>
  +    <sample name="Clear Cache" href="clearcache.html">
  +      Empties the Cocoon cache.
  +    </sample>
  +    <sample name="Clear Persistent Store" href="clearpersistentstore.html">
  +      Empties the Cocoon persistent store.
  +    </sample>
  +    <sample name="Request Page" href="request.html">
  +      This example shows the usage of the RequestGenerator.
  +    </sample>
  +    <sample name="Error handling" href="errorhandling/">
  +      An example page producing exceptions and handling them. Demonstrates the 
  +      handler hierarchy and the exception selectors.
  +    </sample>
  +    <sample name="Link Status" href="linkstatus">
  +      Verify that there are no broken hyperlinks in the local Cocoon
  +      documentation. This sample will start at the home page of the local
  +      documentation webapp and traverse each internal link, reporting its status
  +      in a colour-coded table. Be patient - this process will take a while.
  +      NOTE: this will work only if you have included the documentation when 
  +      you built the web application
  +    </sample>
     </group>
   
   </samples>
  
  
  
  1.3       +38 -24    cocoon-2.1/src/webapp/samples/aggregation/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/aggregation/samples.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- samples.xml	18 May 2003 16:20:49 -0000	1.2
  +++ samples.xml	16 Aug 2003 01:44:12 -0000	1.3
  @@ -5,35 +5,49 @@
   <samples name="Aggregation">
   
     <group name="Back">
  -   <sample name="Back" href="../">
  -    Back to the samples home page.
  -   </sample>
  +    <sample name="Back" href="../">
  +      Back to the samples home page.
  +    </sample>
     </group>
   
     <group name="Data Sources">
  -   <sample name="Slashdot" href="slashdot">
  -    Live XML Feed from Slashdot.
  -   </sample>
  -   <sample name="Moreover.com" href="moreover">
  -    Live XML Developer News Feed from moreover.com.
  -   </sample>
  -   <sample name="XMLHack.com" href="xmlhack">
  -    Live Channel Feed from XMLHack.com.
  -   </sample>
  +    <sample name="Slashdot" href="slashdot">
  +      Live XML Feed from Slashdot.
  +    </sample>
  +    <sample name="Moreover.com" href="moreover">
  +      Live XML Developer News Feed from moreover.com.
  +    </sample>
  +    <sample name="XMLHack.com" href="xmlhack">
  +      Live Channel Feed from XMLHack.com.
  +    </sample>
     </group>
   
     <group name="Aggregation Sample">
  -   <sample name="Fixed Content Aggregation" href="aggregate">
  -    Single Web Page with News from all sources above aggregated by
  -    the sitemap aggregation facilities. This is useful when you know
  -    that the parts of your page to aggregate are always the same
  -    and never change.
  -   </sample>
  -   <sample name="Flexible Content Aggregation" href="aggregate2">
  -    Single Web Page with News from all sources above aggregated by
  -    the cocoon include transformer. This is useful for pages where
  -    the user can customize the parts of the page to aggregate.
  -   </sample>
  +    <sample name="Fixed Content Aggregation" href="aggregate">
  +      Single Web Page with News from all sources above aggregated by
  +      the sitemap aggregation facilities. This is useful when you know
  +      that the parts of your page to aggregate are always the same
  +      and never change.
  +    </sample>
  +    <sample name="Flexible Content Aggregation" href="aggregate2">
  +      Single Web Page with News from all sources above aggregated by
  +      the cocoon include transformer. This is useful for pages where
  +      the user can customize the parts of the page to aggregate.
  +    </sample>
     </group>
     
  +  <group name="XInclude Samples">
  +    <sample name="General" href="test.html">
  +      Demonstration of various XInclude and XPointer features.
  +    </sample>
  +    <sample name="XML Base" href="xmlbase.html">
  +      Demonstration of xml:base support.
  +    </sample>
  +    <sample name="Loop Inclusion" href="loopinclusion.html">
  +      Example of a loop inclusion. This will show an error page.
  +    </sample>
  +    <sample name="Elementpath XPointer Scheme" href="includehtml.html">
  +      Example of streaming inclusion using the custom elementpath XPointer scheme.
  +    </sample>
  +  </group>
   </samples>
  
  
  
  1.2       +128 -92   cocoon-2.1/src/webapp/samples/aggregation/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/aggregation/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap	26 Mar 2003 21:21:30 -0000	1.1
  +++ sitemap.xmap	16 Aug 2003 01:44:12 -0000	1.2
  @@ -4,99 +4,135 @@
   
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
   
  -<!-- =========================== Pipelines ================================= -->
  +  <!-- =========================== Views =================================== -->
   
  - <map:pipelines>
  +  <map:views>
  +    <map:view name="content" from-label="content">
  +      <map:serialize type="xml"/>
  +    </map:view>
  +
  +    <map:view from-label="content" name="pretty-content">
  +      <map:transform src="context://stylesheets/system/xml2html.xslt"/>
  +      <map:serialize type="html"/>
  +    </map:view>
  +
  +    <map:view name="links" from-position="last">
  +      <map:serialize type="links"/>
  +    </map:view>
  +  </map:views>
  +
  +  <!-- =========================== Pipelines ================================= -->
  +
  +  <map:pipelines>
  +    <map:pipeline>
  +
  +      <map:match pattern="">
  +        <map:generate src="samples.xml"/>
  +        <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
  +           <map:parameter name="contextPath" value="{request:contextPath}"/>
  +        </map:transform>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <!-- ================  NEWS  =========================== -->
  +
  +      <map:match pattern="slashdot">
  +        <map:generate src="http://slashdot.org/slashdot.xml"/>
  +        <map:transform src="stylesheets/slashdot.xsl"/>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <map:match pattern="**.gif">
  +        <map:read mime-type="image/gif" src="http://images.slashdot.org/topics/{1}.gif"/>
  +      </map:match>
  +
  +      <map:match pattern="**.jpg">
  +        <map:read mime-type="image/jpg" src="http://images.slashdot.org/topics/{1}.jpg"/>
  +      </map:match>
  +
  +      <map:match pattern="moreover">
  +        <map:generate src="http://www.moreover.com/cgi-local/page?o=xml&amp;c=Developer%20news"/>
  +        <map:transform src="stylesheets/moreover.xsl"/>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <map:match pattern="xmlhack">
  +        <map:generate src="http://www.xmlhack.com/cdf.cdf"/>
  +        <map:transform src="stylesheets/xmlhack.xsl"/>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <map:match pattern="aggregate">
  +        <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.
  +              |
  +              | All these pseudo protocols are declared in the cocoon.xconf.
  +              |
  +              | Thus, the parts refer to the pipeline fragments above.
  +              |
  +              | The optional element attribute places the content in a new root
  +              | element named as specified, using the namespace provided by the
  +              | optional ns attribute.
  +              |
  +              | Please see docs for further explanations.
  +              +-->
  +         <map:part element="news" ns="http://foo.bar.com/slashdot" src="cocoon:/slashdot"/>
  +         <map:part element="news" ns="http://foo.bar.com/moreover" src="cocoon:/moreover"/>
  +         <map:part element="news" ns="http://foo.bar.com/xmlhack" src="cocoon:/xmlhack"/>
  +        </map:aggregate>
  +        <map:transform src="stylesheets/news.xsl"/>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <!-- Aggregation using the Cocoon Include transformer -->
  +      <map:match pattern="aggregate2">
  +        <map:generate src="aggregate.xsp" type="serverpages"/>
  +        <map:transform type="cinclude"/>
  +        <map:transform src="stylesheets/news.xsl"/>
  +        <map:serialize/>
  +      </map:match>
   
  -  <map:pipeline>
  -
  -   <map:match pattern="">
  -     <map:generate src="samples.xml"/>
  -     <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
  -        <map:parameter name="contextPath" value="{request:contextPath}"/>
  -     </map:transform>
  -     <map:serialize/>
  -   </map:match>
  -
  -   <!-- ================  NEWS  =========================== -->
  -
  -   <map:match pattern="slashdot">
  -    <map:generate src="http://slashdot.org/slashdot.xml"/>
  -    <map:transform src="stylesheets/slashdot.xsl"/>
  -    <map:serialize/>
  -   </map:match>
  -
  -   <map:match pattern="**.gif">
  -    <map:read mime-type="image/gif" src="http://images.slashdot.org/topics/{1}.gif"/>
  -   </map:match>
  -
  -   <map:match pattern="**.jpg">
  -    <map:read mime-type="image/jpg" src="http://images.slashdot.org/topics/{1}.jpg"/>
  -   </map:match>
  -
  -   <map:match pattern="moreover">
  -    <map:generate src="http://www.moreover.com/cgi-local/page?o=xml&amp;c=Developer%20news"/>
  -    <map:transform src="stylesheets/moreover.xsl"/>
  -    <map:serialize/>
  -   </map:match>
  -
  -   <map:match pattern="xmlhack">
  -    <map:generate src="http://www.xmlhack.com/cdf.cdf"/>
  -    <map:transform src="stylesheets/xmlhack.xsl"/>
  -    <map:serialize/>
  -   </map:match>
  -
  -   <map:match pattern="aggregate">
  -    <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 element="news" ns="http://foo.bar.com/slashdot" src="cocoon:/slashdot"/>
  -     <map:part element="news" ns="http://foo.bar.com/moreover" src="cocoon:/moreover"/>
  -     <map:part element="news" ns="http://foo.bar.com/xmlhack" src="cocoon:/xmlhack"/>
  -    </map:aggregate>
  -    <map:transform src="stylesheets/news.xsl"/>
  -    <map:serialize/>
  -   </map:match>
  -
  -   <!-- Aggregation using the Cocoon Include transformer -->
  -   <map:match pattern="aggregate2">
  -    <map:generate src="aggregate.xsp" type="serverpages"/>
  -    <map:transform type="cinclude"/>
  -    <map:transform src="stylesheets/news.xsl"/>
  -    <map:serialize/>
  -   </map:match>
  -  
  -  </map:pipeline>
  +      <!-- TODO: Aggregation using the XInclude transformer -->
     
  - </map:pipelines>
  +      <!-- XInclude Samples -->
  +      <map:match pattern="*.html">
  +        <map:generate src="content/{1}.xml"/>
  +        <map:transform type="xinclude"/>
  +        <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
  +          <map:parameter name="contextPath" value="{request:contextPath}"/>
  +          <map:parameter name="servletPath" value="{request:servletPath}"/>
  +          <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  +          <map:parameter name="file" value="content/test.xml"/>
  +          <map:parameter name="remove" value="{0}"/>
  +        </map:transform>
  +        <map:serialize/>
  +      </map:match>
  +
  +      <!-- Source Files -->
  +      <map:match pattern="*.xml">
  +        <map:generate src="content/{1}.xml"/>
  +        <map:serialize/>
  +      </map:match>
   
  +    </map:pipeline>
  +  </map:pipelines>
   </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/includehtml.xml
  
  Index: includehtml.xml
  ===================================================================
  <?xml version="1.0"?>
  <page xmlns:xi="http://www.w3.org/2001/XInclude">
    <title>XInclude demo</title>
    <content>
      <para>This sample will include the content of the /html/body tag of the
        file somehtml.xhtml. This is done using the custom 'elementpath' XPointer
        scheme, which avoids building a DOM (which the xpointer() scheme does).</para>
      <para><b><![CDATA[somehtml.xhtml#xmlns(c=http://apache.org/cocoon/xpointer)c:elementpath(/html/body)]]></b></para>
      <xi:include href="somehtml.xhtml#xmlns(c=http://apache.org/cocoon/xpointer)c:elementpath(/html/body)"/>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/loopinclusion.xml
  
  Index: loopinclusion.xml
  ===================================================================
  <?xml version="1.0"?>
  <page xmlns:xi="http://www.w3.org/2001/XInclude">
    <title>XInclude loop inclusion test</title>
    <content>
      <xi:include href=""/>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/somehtml.xhtml
  
  Index: somehtml.xhtml
  ===================================================================
  <html>
    <head>
      <title></title>
    </head>
    <body>
      <p>Hello, this is the content of the <tt>somehtml.xhtml</tt> file.</p>
      <p>And here's yet another paragraph from that file.</p>
    </body>
  </html>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/test.xml
  
  Index: test.xml
  ===================================================================
  <?xml version="1.0"?>
  <page xmlns:xi="http://www.w3.org/2001/XInclude">
    <title>XInclude demo</title>
    <content>
      <para><b><![CDATA[<xi:include href="test3.xml"/>]]></b></para>
      <xi:include href="test3.xml"/>
  
      <hr/>
      <para><b><![CDATA[<xi:include href="test2.xml#xpointer(/page/content/para[2])"/>]]></b></para>
      <xi:include href="test2.xml#xpointer(/page/content/para[2])"/>
  
      <hr/>
      <para><b><![CDATA[<xi:include href="test2.xml#xmlns(my=http://localhost/my)xpointer(/page/content/my:abc/*)"/>]]></b></para>
      <xi:include href="test2.xml#xmlns(my=http://localhost/my)xpointer(/page/content/my:abc/*)"/>
  
  
      <hr/>
      <para><b>Inclusion with an invalid xpointer expression, will cause fallback
          element content to be inserted:</b></para>
      <para><b><![CDATA[<xi:include href="test2.xml#xpointer(">]]></b></para>
      <xi:include href="test2.xml#xpointer(">
        <a>
          <b>
            Any random content inside the xi:include element will be ignored.
          </b>
        </a>
        <xi:fallback>
          An error occured! This is the content of the fallback element you're seeing.
        </xi:fallback>
        And here's some more text you shouldn't see.
      </xi:include>
  
      <hr/>
      <para><b><![CDATA[
      <xi:include href="#xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(/page/content/xi:include[1])"/>
          ]]></b></para>
      <xi:include href="#xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(/page/content/xi:include[1])"/>
  
      <hr/>
      <para><b>This sample demonstrates the recursive inclusion: here file4.xml
          is included, which in itself includes file5.xml:</b></para>
      <para><b><![CDATA[<xi:include href="test4.xml"/>]]></b></para>
      <xi:include href="test4.xml"/>
  
      <hr/>
      <para><b>This example shows how you can put multiple xpointer expressions
          one after the other. If one doesn't return a result, it is skipped and
          the next one is evaluated, until one is found that returns a
          result.</b></para>
      <para><b><![CDATA[<xi:include href="test2.xml#xpointer(/x)xpointer(/y)xpointer(/z)xpointer(/page/content/para[2])"/>]]></b></para>
      <xi:include href="test2.xml#xpointer(/x)xpointer(/y)xpointer(/z)xpointer(/page/content/para[2])"/>
    </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/test2.xml
  
  Index: test2.xml
  ===================================================================
  <?xml version="1.0"?>
  <page xmlns:my="http://localhost/my">
   <content>
    <para>This is paragraph 1 from test2.xml</para>
    <para>This is paragraph 2 from test2.xml</para>
    <my:abc>
      <para>This is paragraph 3 from test2.xml (inside my:abc element)</para>
    </my:abc>
   </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/test3.xml
  
  Index: test3.xml
  ===================================================================
  <para>This is the content of the test3.xml file.</para>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/test4.xml
  
  Index: test4.xml
  ===================================================================
  <?xml version="1.0"?>
  <para xmlns:xi="http://www.w3.org/2001/XInclude">
    This is content in test4.xml, will do a include of test5.xml here:
    <xi:include href="test5.xml#xpointer(/para/node())"/>
  </para>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/test5.xml
  
  Index: test5.xml
  ===================================================================
  <?xml version="1.0"?>
  <para>
    This is the content of test5.xml
  </para>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/aggregation/content/xmlbase.xml
  
  Index: xmlbase.xml
  ===================================================================
  <?xml version="1.0"?>
  <page xmlns:xi="http://www.w3.org/2001/XInclude">
    <title>XInclude xml:base demo</title>
    <content>
      This is a test of the xml:base support.
      <hr/>
      <dummy xml:base="cocoon:/dir1/dir2/dir3/">
  
        <xi:include href="../../../test3.xml"/>
  
        <dummy xml:base="cocoon:/dir1/">
          <xi:include href="../test3.xml"/>
        </dummy>
  
        <xi:include href="../../../test3.xml"/>
  
      </dummy>
    </content>
  </page>
  
  
  

Mime
View raw message