cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject cvs commit: xml-cocoon2/src/webapp/samples/welcome cocoon.gif status2html.xsl welcome.xhtml
Date Thu, 20 Feb 2003 18:17:50 GMT
stefano     2003/02/20 10:17:50

  Modified:    src/webapp sitemap.xmap
               src/webapp/WEB-INF cocoon.xconf
  Removed:     src/webapp cocoon.xconf.moved
               src/webapp/samples/docs/samples/fo readme.fo
               src/webapp/samples/docs/samples/svg henryV.svg opac.svg
               src/webapp/samples/lint sitemap.xmap
               src/webapp/samples/logicsheets hello.xsl
               src/webapp/samples/misc samples.xml sitemap.xmap
               src/webapp/samples/misc/catalog article.xml catalog-demo.xml
                        sdocbook-demo.html sdocbook2body.xsl style.xsl
                        testovr.xml
               src/webapp/samples/poi sitemap.xmap
               src/webapp/samples/poi/content samples.xml
               src/webapp/samples/poi/content/dynamic statetax.xml
                        statetax2.xsp
               src/webapp/samples/poi/content/static anova-2w-wrep.xml
                        hypothetical-sales.xml regress.xml test-date.xml
                        test-format.xml test-indent.xml test-math.xml
                        web_page_sample.xml
               src/webapp/samples/poi/stylesheets simple-page2xls.xsl
                        simple-sql2xls.xsl statetax-esql2xls.xsl
                        statetax-sql2xls.xsl
               src/webapp/samples/search create-index.xsp search-index.xsp
                        sitemap.xmap statistic-index.xsp welcome-index.xsp
               src/webapp/samples/search/images lucene_green_300.gif
               src/webapp/samples/search/stylesheets search2html.xsl
               src/webapp/samples/system sitemap.xmap
               src/webapp/samples/system/content/xml error-giving-page.xml
               src/webapp/samples/templates hello-page.vm
               src/webapp/samples/welcome cocoon.gif status2html.xsl
                        welcome.xhtml
  Log:
  Refactoring samples
  
  Revision  Changes    Path
  1.87      +274 -356  xml-cocoon2/src/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- sitemap.xmap	14 Jan 2003 10:36:48 -0000	1.86
  +++ sitemap.xmap	20 Feb 2003 18:17:47 -0000	1.87
  @@ -1,245 +1,170 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  -<!-- 
  -   This is the 'heart' of Cocoon. The sitemap maps URI space to 
  -   resources. It consists basicly of two parts: components and
  -   pipelines. Pipelines are made out of components. There is such a
  -   vast number of components available that it would be impossible to
  -   describe them here, please refer to the accompanying
  -   documentation. For specific components, have a look also at the
  -   javadocs for them. Most pipelines are present to demonstrate some
  -   feature or technique, often they are explained in more detail in 
  -   the accompanying documentation.
  -   
  -   There are some other, less important parts that deal with
  -   resources, views and action sets. For now, ignore them.
  --->
  -
   
  +<!--+
  +    | This is the 'heart' of Cocoon. The sitemap maps URI space to 
  +    | resources. It consists basicaly of two parts: components and
  +    | pipelines. Pipelines are made out of components. There is such a
  +    | vast number of components available that it would be impossible to
  +    | describe them here, please refer to the accompanying
  +    | documentation. For specific components, have a look also at the
  +    | javadocs for them. Most pipelines are present to demonstrate some
  +    | feature or technique, often they are explained in more detail in 
  +    | the accompanying documentation.
  +    +-->
   
   <!-- =========================== Components ================================ -->
   
    <map:components>
   
  -<!--
  -  All pipelines consist at least of two components: a generator, that
  -  produces the content and a serialiser, that delivers the content to
  -  the client.
  -
  -  More precisely: a generator generates SAX events and a serializer
  -  consumes these events and produces a character stream.
  -
  -  Some things to note here: each generator has a unique name, this
  -  name is mapped to a java class, one name is declared as default
  -  generator. In addition each generator may have additional
  -  configurations as child elements.
  -
  -  Additional attributes are targeted at the component manager. The optional
  -  "label" attribute is relevant for the view concept below. The optional
  -  "logger" attribute defines the logging category where messages produced
  -  by a component should go. If there's no "logger" attribute, the category
  -  used is the one defined for the "sitemap" component in cocoon.xconf.
  -
  -  We have chosen in this example sitemap to use a different logging category
  -  for each component, which allows fine-grained classification of log
  -  messages. But you are free to use any category you want.
  -
  -  It is possible to have the same java class declared as different
  -  generators by using different names. No configuration options are
  -  shared between these instances, however.
  -
  -  All components follow this schema.
  -
  --->
  -
  - <map:generators default="file">
  +  <!--+
  +      | All pipelines consist at least of two components: a generator, that
  +      | produces the content, and a serialiser, that delivers the content to
  +      | the client.
  +      | 
  +      | More precisely: a generator generates SAX events and a serializer
  +      | consumes these events and produces a byte stream.
  +      | 
  +      | Some things to note here: each generator has a unique name, this
  +      | name is mapped to a java class, one name is declared as default
  +      | generator. In addition each generator may have additional
  +      | configurations as child elements.
  +      | 
  +      | Additional attributes are targeted at the component manager. The optional
  +      | "label" attribute is relevant for the view concept below. The optional
  +      | "logger" attribute defines the logging category where messages produced
  +      | by a component should go. If there's no "logger" attribute, the category
  +      | used is the one defined for the "sitemap" component in cocoon.xconf.
  +      | 
  +      | We have chosen in this sitemap to use a different logging category
  +      | for each component, which allows fine-grained classification of log
  +      | messages. But you are free to use any category you want.
  +      | 
  +      | It is possible to have the same java class declared as different
  +      | generators by using different names. No configuration options are
  +      | shared between these instances, however.
  +      | 
  +      | All components follow this schema.
  +      +-->
  +  <map:generators default="file">
       <map:generator label="content,data" logger="sitemap.generator.file" name="file"
pool-grow="4" pool-max="32" pool-min="8" src="org.apache.cocoon.generation.FileGenerator"/>
  -
       <map:generator label="content,data" logger="sitemap.generator.serverpages" name="serverpages"
pool-grow="2" pool-max="32" pool-min="4" src="org.apache.cocoon.generation.ServerPagesGenerator"/>
  -    
       <map:generator label="content,data" logger="sitemap.generator.directory" name="directory"
pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.generation.DirectoryGenerator"/>
  -
  +    <map:generator label="content,data" logger="sitemap.generator.imagedirectory" name="imagedirectory"
src="org.apache.cocoon.generation.ImageDirectoryGenerator"/>
       <map:generator label="data" logger="sitemap.generator.request" name="request" pool-grow="2"
pool-max="16" pool-min="2" src="org.apache.cocoon.generation.RequestGenerator"/>
  -
  +    <map:generator label="content,data" logger="sitemap.generator.stream" name="stream"
pool-grow="2" pool-max="16" pool-min="1" src="org.apache.cocoon.generation.StreamGenerator"/>
       <map:generator label="data" logger="sitemap.generator.status" name="status" pool-grow="2"
pool-max="16" pool-min="2" src="org.apache.cocoon.generation.StatusGenerator"/>
  +  </map:generators>
   
  -   <map:generator label="content,data" logger="sitemap.generator.imagedirectory" name="imagedirectory"
src="org.apache.cocoon.generation.ImageDirectoryGenerator"/>
  -
  -   <map:generator label="data" logger="sitemap.generator.extractor" name="extractor"
src="org.apache.cocoon.generation.FragmentExtractorGenerator"/>
  -  
  -    <map:generator label="content,data" name="html" src="org.apache.cocoon.generation.HTMLGenerator"/>
  -
  -    <map:generator label="content,data" name="jsp" src="org.apache.cocoon.generation.JspGenerator"/>
  -    <map:generator label="content,data" name="stream" src="org.apache.cocoon.generation.StreamGenerator"/>
  -
  -    <map:generator label="content,data" name="script" src="org.apache.cocoon.generation.ScriptGenerator"/>
  -
  -    <map:generator label="content,data" name="velocity" src="org.apache.cocoon.generation.VelocityGenerator"/>
  -    
  -    <map:generator label="content,data" name="wsproxy" src="org.apache.cocoon.generation.WebServiceProxyGenerator"
logger="sitemap.generator.wsproxy"/>
  -    
  -</map:generators>
  -
  -<!--
  -  Transformers can be placed inside the pipeline between the generator
  -  and the serializer. You may have as many transformers as you
  -  like. Transformers consume SAX events and emmit SAX events.
  -
  -  The "xalan" transformer is an example of a component with additional
  -  configuration.
  --->
  +  <!--+
  +      | Transformers can be placed inside the pipeline between the generator
  +      | and the serializer. You may have as many transformers as you
  +      | like. Transformers consume SAX events and emmit SAX events.
  +      |
  +      | The "xslt" transformer is an example of a component with additional
  +      | configuration.
  +      +-->
     <map:transformers default="xslt">
   
  -    <!-- NOTE: This used to be the default XSLT processor. The default now is XSLTC
-->
  -    <map:transformer name="xalan" logger="sitemap.transformer.xslt" pool-grow="2" pool-max="32"
pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
  +    <!-- NOTE: XSLTC is now the default processor. If you use Xalan extensions, use
the "xalan" transformer. -->
  +    <map:transformer logger="sitemap.transformer.xslt" name="xslt" pool-grow="2" pool-max="32"
pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
         <use-request-parameters>false</use-request-parameters>
         <use-browser-capabilities-db>false</use-browser-capabilities-db>
  +      <transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory>
       </map:transformer>
   
  -    <!-- 
  -        NOTE: XSLTC is now the default processor. If you use Xalan extensions, 
  -        use the "xalan" transformer. 
  -     -->
  -    <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"
  -                        logger="sitemap.transformer.xsltc"
  -                        pool-max="32" pool-min="8" pool-grow="2">
  +    <!-- NOTE: This used to be the default XSLT processor. The default now is XSLTC
-->
  +    <map:transformer logger="sitemap.transformer.xalan" name="xalan" pool-grow="2" pool-max="32"
pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
         <use-request-parameters>false</use-request-parameters>
         <use-browser-capabilities-db>false</use-browser-capabilities-db>
  -      <transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory>
  +      <transformer-factory>org.apache.xalan.processor.TransformerFactoryImpl</transformer-factory>
       </map:transformer>
   
  -    <map:transformer logger="sitemap.transformer.log" name="log" pool-grow="2" pool-max="16"
pool-min="2" src="org.apache.cocoon.transformation.LogTransformer"/>
  -
       <map:transformer logger="sitemap.transformer.xinclude" name="xinclude" pool-grow="2"
pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.XIncludeTransformer"/>
  -
       <map:transformer logger="sitemap.transformer.cinclude" name="cinclude" pool-grow="2"
pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.CIncludeTransformer"/>
  +    <map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"/>
  +    <map:transformer logger="sitemap.transformer.write-source" name="write-source" src="org.apache.cocoon.transformation.SourceWritingTransformer"/>
       <map:transformer logger="sitemap.transformer.jpath" name="jpath" src="org.apache.cocoon.transformation.JPathTransformer"/>
  +    <map:transformer logger="sitemap.transformer.filter" name="filter" src="org.apache.cocoon.transformation.FilterTransformer"/>
  +    <map:transformer logger="sitemap.transformer.writeDOMsession" name="writeDOMsession"
src="org.apache.cocoon.transformation.WriteDOMSessionTransformer"/>
  +    <map:transformer logger="sitemap.transformer.readDOMsession" name="readDOMsession"
src="org.apache.cocoon.transformation.ReadDOMSessionTransformer"/>
  +    <map:transformer logger="sitemap.transformer.log" name="log" pool-grow="2" pool-max="16"
pool-min="2" src="org.apache.cocoon.transformation.LogTransformer"/>
  +  </map:transformers>
   
  -   <map:transformer logger="sitemap.transformer.extractor" name="extractor" src="org.apache.cocoon.transformation.FragmentExtractorTransformer"/>
  -
  -   <map:transformer logger="sitemap.transformer.filter" name="filter" src="org.apache.cocoon.transformation.FilterTransformer"/>
  -
  -   <map:transformer logger="sitemap.transformer.writeDOMsession" name="writeDOMsession"
src="org.apache.cocoon.transformation.WriteDOMSessionTransformer"/>
  -
  -   <map:transformer logger="sitemap.transformer.readDOMsession" name="readDOMsession"
src="org.apache.cocoon.transformation.ReadDOMSessionTransformer"/>
  -   <map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"/>
  -   <map:transformer logger="sitemap.transformer.write-source" name="write-source" src="org.apache.cocoon.transformation.SourceWritingTransformer"/>
  -   
  -   <map:transformer name="xmlform" label="content" src="org.apache.cocoon.transformation.XMLFormTransformer"
logger="xmlform.sitemap.transformer"/>
  -
  -</map:transformers>
  -
  -<!--
  -  Readers are an exception to the above rule that a pipline need to
  -  have exactly one generator and exactly one serializer. Readers
  -  circumvent the XML oriented SAX pipeline model, think of a reader
  -  being a generator and a serializer at once thus a pipeline may not
  -  contain any generator, transformer or serializer in addition to a
  -  reader. They are useful for delivering binary content like images.
  --->
  -  <map:readers default="resource">
  -    <map:reader logger="sitemap.reader.resource" name="resource" pool-max="32" src="org.apache.cocoon.reading.ResourceReader"/>
  -  
  -    <map:reader name="jsp" src="org.apache.cocoon.reading.JSPReader"/>
  -</map:readers>
  -
  -<!--
  -  Serializers consume SAX events and produce a character stream. Every
  -  pipeline needs to be terminated by a serializer.
  --->
  +  <!--+
  +      | Serializers consume SAX events and produce a character stream. Every
  +      | pipeline needs to be terminated by a serializer.
  +      +-->
     <map:serializers default="html">
       <map:serializer logger="sitemap.serializer.links" name="links" src="org.apache.cocoon.serialization.LinkSerializer"/>
  -
       <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml"
src="org.apache.cocoon.serialization.XMLSerializer"/>
  -
       <map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html"
pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">
         <buffer-size>1024</buffer-size>
       </map:serializer>
  -
  -   <map:serializer logger="sitemap.serializer.vrml" mime-type="model/vrml" name="vrml"
src="org.apache.cocoon.serialization.TextSerializer"/>
  -
  -   <map:serializer logger="sitemap.serializer.wml" mime-type="text/vnd.wap.wml" name="wml"
src="org.apache.cocoon.serialization.XMLSerializer">
  -    <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
  -    <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
  -    <encoding>ASCII</encoding>
  -    <omit-xml-declaration>yes</omit-xml-declaration>
  -   </map:serializer>
  -
  -   <map:serializer logger="sitemap.serializer.svgxml" mime-type="image/svg-xml" name="svgxml"
src="org.apache.cocoon.serialization.XMLSerializer">
  -    <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public>
  -    <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system>
  -   </map:serializer>
  -
  -   <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml"
pool-grow="2" pool-max="64" pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer">
  -     <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
  -     <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
  -     <encoding>UTF-8</encoding>
  -   </map:serializer>
  -
  -   <map:serializer logger="sitemap.serializer.text" mime-type="text/plain" name="text"
src="org.apache.cocoon.serialization.TextSerializer"/>
  -  
  -    <map:serializer mime-type="application/pdf" name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"/>
  -    <map:serializer mime-type="application/postscript" name="fo2ps" src="org.apache.cocoon.serialization.FOPSerializer"/>
  -    <map:serializer mime-type="vnd.hp-PCL" name="fo2pcl" src="org.apache.cocoon.serialization.FOPSerializer"/>
  -
  -    <map:serializer mime-type="image/jpeg" name="svg2jpeg" src="org.apache.cocoon.serialization.SVGSerializer">
  -      <parameter name="quality" type="float" value="0.9"/>
  +    <map:serializer logger="sitemap.serializer.wml" mime-type="text/vnd.wap.wml" name="wml"
src="org.apache.cocoon.serialization.XMLSerializer">
  +     <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
  +     <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
  +     <encoding>ASCII</encoding>
  +     <omit-xml-declaration>yes</omit-xml-declaration>
  +    </map:serializer>
  +    <map:serializer logger="sitemap.serializer.svgxml" mime-type="image/svg-xml" name="svgxml"
src="org.apache.cocoon.serialization.XMLSerializer">
  +     <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public>
  +     <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system>
  +    </map:serializer>
  +    <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml"
pool-grow="2" pool-max="64" pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer">
  +      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
  +      <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
  +      <encoding>UTF-8</encoding>
       </map:serializer>
  -    <map:serializer mime-type="image/png" name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"/>
  -</map:serializers>
  +    <map:serializer logger="sitemap.serializer.text" mime-type="text/plain" name="text"
src="org.apache.cocoon.serialization.TextSerializer"/>
  +    <map:serializer logger="sitemap.serializer.vrml" mime-type="model/vrml" name="vrml"
src="org.apache.cocoon.serialization.TextSerializer"/>
  +  </map:serializers>
  +
  +  <!--+
  +      | Readers circumvent the XML oriented SAX pipeline model, think of a reader
  +      | being a generator and a serializer at once thus a pipeline may not
  +      | contain any generator, transformer or serializer in addition to a
  +      | reader. They are useful for delivering binary content like images.
  +      +-->
  +  <map:readers default="resource">
  +    <map:reader logger="sitemap.reader.resource" name="resource" pool-max="32" src="org.apache.cocoon.reading.ResourceReader"/>
  +  </map:readers>
   
  -<!--
  -  Matchers are executed during pipeline setup. They decide if a
  -  pipeline fragment is used within a pipeline. Usually, the decision
  -  is based on a match on the requested URI but matchers exist, that
  -  match different things as well. Most often the fragment contained in
  -  a matcher has a generator as well as a serializer. This is not a
  -  necessity, matchers can be nested while chaining does not work.
  -  Related concepts are selectors and actions. 
  -
  -  Since this is important, let me repeat it: Matchers are executed
  -  during pipeline setup.
  --->
  +  <!--+
  +      | Matchers are executed during pipeline setup. They decide if a
  +      | pipeline fragment is used within a pipeline. Usually, the decision
  +      | is based on a match on the requested URI but matchers exist, that
  +      | match different things as well. Most often the fragment contained in
  +      | a matcher has a generator as well as a serializer. This is not a
  +      | necessity, matchers can be nested while chaining does not work.
  +      +-->
     <map:matchers default="wildcard">
       <map:matcher logger="sitemap.matcher.wildcard" name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  -
       <map:matcher logger="sitemap.matcher.regexp" name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
  -   <map:matcher logger="sitemap.matcher.request-parameter" name="request-parameter"
src="org.apache.cocoon.matching.RequestParameterMatcher"/>
  -
  -   <map:matcher logger="sitemap.matcher.cookie" name="cookie" src="org.apache.cocoon.matching.CookieMatcher"/>
  -
  -   <map:matcher logger="sitemap.matcher.header" name="header" src="org.apache.cocoon.matching.HeaderMatcher"/>
  -
  -   <map:matcher logger="sitemap.matcher.parameter" name="parameter" src="org.apache.cocoon.matching.ParameterMatcher"/>
  -
  -   <map:matcher logger="sitemap.matcher.sessionstate" name="sessionstate" src="org.apache.cocoon.matching.WildcardSessionAttributeMatcher">
  +    <map:matcher logger="sitemap.matcher.request-parameter" name="request-parameter"
src="org.apache.cocoon.matching.RequestParameterMatcher"/>
  +    <map:matcher logger="sitemap.matcher.cookie" name="cookie" src="org.apache.cocoon.matching.CookieMatcher"/>
  +    <map:matcher logger="sitemap.matcher.header" name="header" src="org.apache.cocoon.matching.HeaderMatcher"/>
  +    <map:matcher logger="sitemap.matcher.parameter" name="parameter" src="org.apache.cocoon.matching.ParameterMatcher"/>
  +    <map:matcher logger="sitemap.matcher.sessionstate" name="sessionstate" src="org.apache.cocoon.matching.WildcardSessionAttributeMatcher">
         <attribute-name>org.apache.cocoon.SessionState</attribute-name>
  -   </map:matcher>
  -
  -   <map:matcher logger="sitemap.matcher.next-page" name="next-page" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
  -      <parameter-name>next-state</parameter-name>
  -   </map:matcher>
  -
  -   <map:matcher logger="sitemap.matcher.referer-match" name="referer-match" src="org.apache.cocoon.matching.WildcardHeaderMatcher">
  +    </map:matcher>
  +    <map:matcher logger="sitemap.matcher.referer-match" name="referer-match" src="org.apache.cocoon.matching.WildcardHeaderMatcher">
         <header-name>referer</header-name>
  -   </map:matcher>
  +    </map:matcher>
     </map:matchers>
   
  -<!--
  -  Selectors are executed during pipeline setup. They can be used to
  -  determine which pipeline fragments should be combined. They are best
  -  compared with a switch statement in java. Matchers and actions are
  -  related concepts.
  -
  -  Since this is important, let me repeat it: Selectors are executed
  -  during pipeline setup.
  --->
  +  <!--+
  +      | Selectors are executed during pipeline setup. They can be used to
  +      | determine which pipeline fragments should be combined. They are best
  +      | compared with a java switch statement.
  +      +-->
     <map:selectors default="browser">
      <map:selector logger="sitemap.selector.browser" name="browser" src="org.apache.cocoon.selection.BrowserSelector">
  -    <!-- # NOTE: The appearance indicates the search order. This is very important since
  -         #       some words may be found in more than one browser description. (MSIE is
  -         #       presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
  -    -->
  +    <!--+
  +        | NOTE: The appearance indicates the search order. This is very important since
  +        |       some words may be found in more than one browser description. (MSIE is
  +        |       presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
  +        +-->
       <browser name="explorer" useragent="MSIE"/>
       <browser name="pocketexplorer" useragent="MSPIE"/>
       <browser name="handweb" useragent="HandHTTP"/>
  @@ -255,233 +180,226 @@
       <browser name="mozilla5" useragent="Netscape6/"/>
       <browser name="netscape" useragent="Mozilla"/>
      </map:selector>
  -
      <map:selector logger="sitemap.selector.request-parameter" name="request-parameter"
src="org.apache.cocoon.selection.RequestParameterSelector">
       <!-- Define now which request parameter to use; or do it later,
            when using this selector, via "parameter-name" parameter.
       <parameter-name>myparam</parameter-name> 
       -->
      </map:selector>
  -
      <map:selector logger="sitemap.selector.request-attribute" name="request-attribute"
src="org.apache.cocoon.selection.RequestAttributeSelector">
       <!-- <attribute-name>myparam</attribute-name> -->
      </map:selector>
  -
      <map:selector logger="sitemap.selector.session-attribute" name="session-attribute"
src="org.apache.cocoon.selection.SessionAttributeSelector">
       <!-- <attribute-name>myparam</attribute-name> -->
      </map:selector>
  -
      <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector"/>
  -
      <map:selector logger="sitemap.selector.header" name="header" src="org.apache.cocoon.selection.HeaderSelector">
       <!-- <header-name>myparam</header-name> -->
      </map:selector>
  -
      <map:selector logger="sitemap.selector.host" name="host" src="org.apache.cocoon.selection.HostSelector"/>
     </map:selectors>
   
  -<!--
  -  Actions are executed during pipeline setup. Their purpose is to
  -  execute some arbitrary complex code. They are the work horses of
  -  pipelines. Use them to update databases, check external resources
  -  etc. The execution may fail or complete successfully. Only if the
  -  execution was successful, the pipeline fragment contained inside is
  -  used within the pipeline. Related concepts are matchers and
  -  selectors.
  -
  -  Since this is important, let me repeat it: Actions are executed
  -  during pipeline setup.
  --->
  +  <!--+
  +      | Actions are executed during pipeline setup. Their purpose is to
  +      | execute some code that doesn't involve touching the stream of
  +      | pipeline events. Example usage is to update databases, check external 
  +      | resources, etc.. The execution may fail or complete successfully. Only 
  +      | if the execution of the action was successful, the pipeline fragment 
  +      | nested inside the action element is executed, otherwise, it's skipped
  +      | entirely and execution proceeds from the element right below the action.
  +      +-->
     <map:actions>
  -   <!-- LangSelect action is deprecated. Use LocaleAction instead -->
  -   <!-- Locale Action is moved to /samples/i18n/sitemap.xmap -->
  -
      <map:action logger="sitemap.action.request" name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
  -
      <map:action logger="sitemap.action.form-validator" name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/>
  -
      <map:action logger="sitemap.action.session-state" name="session-state" src="org.apache.cocoon.acting.SessionStateAction"/>
  -
      <map:action logger="sitemap.action.session-isvalid" name="session-isvalid" src="org.apache.cocoon.acting.SessionIsValidAction"/>
  -
      <map:action logger="sitemap.action.resource-exists" name="resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/>
  -
      <map:action logger="sitemap.action.set-header" name="set-header" src="org.apache.cocoon.acting.HttpHeaderAction"/>
  -
      <map:action logger="sitemap.action.clear-cache" name="clear-cache" src="org.apache.cocoon.acting.ClearCacheAction"/>
  -
      <map:action logger="sitemap.action.clear-persistent-store" name="clear-persistent-store"
src="org.apache.cocoon.acting.ClearPersistentStoreAction"/>
  -
     </map:actions>
   
  -  <!--
  -     The different pipeline implementations
  -
  -     NON-CACHING:
  -     The non caching implementation of cocoon pipelines.
  -
  -     CACHING:
  -     Traditional longest cachable key caching.
  -     
  -     CACHING-POINT:
  -     The caching-point pipeline implements an extended
  -     caching algorithm which is of particular benefit for use with 
  -     those pipelines that utilise cocoon-views and/or provide 
  -     drill-down functionality.
  -     
  -     The autoCachingPoint algorithim (if enabled) will automatically
  -     cache common elements of the pipeline currently being processed - as well
  -     as the entire cachable pipeline according to the "longest cachable key"
  -     algorithm.
  -
  -     Consider the following simple pipeline, where generator G is labelled with
  -     a cocoon-view enabling the pipeline to serialize data to either html or pdf 
  -     depending on the value of cocoon-view (as provided by the request):
  -     G - T -  S(html)
  -     |__ T -  S(pdf)
  -     
  -     If cocoon-view=html, then the caching-point algorithm will not only cache 
  -     the longest cachable path, which would be GTS(html) but also the
  -     *common element* which in this case would be the results from G. If the
  -     next request to this pipeline was cocoon-view=pdf, then there would be no
  -     need to invoke the generator a second time, as it's value has already been
  -     cached (provided G generates the same cache key)
  -
  -     Also note: One can switch "Off" autoCachingPoint and use "pipeline-hints" to
  -     manually indicate that certain pipeline-components should be considered as
  -     cache points.
  -  -->
  -  <map:pipes default="caching">
  +  <!--+
  +      | The different pipe implementations
  +      | 
  +      | NON-CACHING:
  +      |   The non caching implementation of cocoon pipelines.
  +      | 
  +      | CACHING:
  +      |   Traditional longest cachable key caching.
  +      | 
  +      | CACHING-POINT:
  +      |   The caching-point pipeline implements an extended             
  +      |   caching algorithm which is of particular benefit for use with 
  +      |   those pipelines that utilise cocoon-views and/or provide      
  +      |   drill-down functionality.                                     
  +      | 
  +      | The autoCachingPoint algorithim (if enabled) will automatically
  +      | cache common elements of the pipeline currently being processed - as well
  +      | as the entire cachable pipeline according to the "longest cachable key"
  +      | algorithm.
  +      | 
  +      | Consider the following simple pipeline, where generator G is labelled with
  +      | a cocoon-view enabling the pipeline to serialize data to either html or pdf 
  +      | depending on the value of cocoon-view (as provided by the request):
  +      | G - T -  S(html)
  +      | |__ T -  S(pdf)
  +      | 
  +      | If cocoon-view=html, then the caching-point algorithm will not only cache 
  +      | the longest cachable path, which would be GTS(html) but also the
  +      | *common element* which in this case would be the results from G. If the
  +      | next request to this pipeline was cocoon-view=pdf, then there would be no
  +      | need to invoke the generator a second time, as it's value has already been
  +      | cached (provided G generates the same cache key)
  +      | 
  +      | Also note: One can switch "Off" autoCachingPoint and use "pipeline-hints" to
  +      | manually indicate that certain pipeline-components should be considered as
  +      | cache points.
  +      +-->
  +   <map:pipes default="caching">
        <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
        <map:pipe name="caching-point" src="org.apache.cocoon.components.pipeline.impl.CachingPointProcessingPipeline">
          <autoCachingPoint>On</autoCachingPoint>
        </map:pipe>
        <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
  -  </map:pipes>
  +   </map:pipes>
   
    </map:components>
   
   <!-- =========================== Views =================================== -->
   
  -<!--
  -  Views provide diffent, well, views to resources. Views are
  -  orthogonal to pipelines. Please refer to the docs.
  --->
  - <map:views>
  -  <map:view from-label="content" name="content">
  -   <map:serialize type="xml"/>
  -  </map:view>
  -
  -  <map:view from-label="data" name="pretty-content">
  -    <map:transform src="stylesheets/simple-xml2html.xsl"/>
  -    <map:serialize type="html"/>
  -  </map:view>
  -  
  -  <map:view from-position="last" name="links">
  -   <map:serialize type="links"/>
  -  </map:view>
  -
  - </map:views>
  +  <!--+
  +      | Views provide diffent, well, views to resources. Views are
  +      | orthogonal to pipelines. Please refer to the docs.
  +      +-->
  +  <map:views>
  +    <map:view from-label="content" name="content">
  +      <map:serialize type="xml"/>
  +    </map:view>
  +
  +    <map:view from-label="data" name="pretty-content">
  +      <map:transform src="stylesheets/simple-xml2html.xsl"/>
  +      <map:serialize type="html"/>
  +    </map:view>
  +
  +    <map:view from-position="last" name="links">
  +      <map:serialize type="links"/>
  +    </map:view>
  +  </map:views>
   
   <!-- =========================== Resources ================================= -->
   
  -<!--
  -  Resources are pipeline fragments that may be used from different
  -  pipeline fragments. For our needs, they behave exactly like
  -  pipelines, only that they are not accessible from outside.
  -  Hence I will explain what's inside below for pipelines.
  --->
  -
  +  <!--+
  +      | Resources are pipeline fragments that may be used from different
  +      | pipeline fragments. For our needs, they behave exactly like
  +      | pipelines, only that they are not accessible from outside.
  +      | Hence I will explain what's inside below for pipelines.
  +      +-->
    <map:resources>
    </map:resources>
   
   <!-- ========================== Action sets ================================ -->
   
  -<!--
  -  Action sets group actions together. If some actions are often used
  -  together in pipeline fragments, it's easier to group them and refer
  -  to the group. For more info, please see the docs.
  --->
  -
  - <map:action-sets>
  - </map:action-sets>
  + <!--+
  +     | Action sets group actions together. If some actions are often used
  +     | together in pipeline fragments, it's easier to group them and refer
  +     | to the group. For more info, please see the docs.
  +     +-->
  +  <map:action-sets>
  +  </map:action-sets>
   
   <!-- =========================== Pipelines ================================= -->
   
  -<!--
  -  Pipelines. The beef. Pipelines specify, how the processing of your
  -  content is done. Usually, a pipeline consists of several fragments
  -  that specify the generation, transformation, and serialization of
  -  SAX events.
  -
  -  Processing is done in two steps:
  -
  -  1) The top level elements are executed in order of appearance until
  -     one signals success. These top level elements are usually
  -     matchers. AFAIK other components are not supported for this.
  -
  -     Other components are called depth-first to determine what
  -     fragments make up the processing pipeline. When a component
  -     fails, no nested components are called but the next component on
  -     the same level.
  -
  -  2) Once it is determined which generator, which transformers and
  -     wich serializer is used, these components are executed. During
  -     this, the pipeline may not be changed.
  -
  -
  -  You may have as many pipelines in your sitemap as you like. However,
  -  it seems that the only purposes would be to specify different error
  -  handlers.
  --->
  -
  + <!--+
  +     | Pipelines. The beef. Pipelines specify how the processing of your
  +     | content is done. Usually, a pipeline consists of several fragments
  +     | that specify the generation, transformation, and serialization of
  +     | SAX events.
  +     |
  +     | Processing is done in two steps:
  +     |
  +     | 1) The top level elements are executed in order of appearance until
  +     |    one signals success. These top level elements are usually
  +     |    matchers.
  +     |
  +     |    Other components are called depth-first to determine what
  +     |    fragments make up the processing pipeline. When a component
  +     |    fails, no nested components are called but the next component on
  +     |    the same level.
  +     |
  +     | 2) Once it is determined which generator, which transformers and
  +     |    wich serializer is used, these components are executed. During
  +     |    this, the pipeline may not be changed.
  +     |
  +     | You may have as many pipelines in your sitemap as you like.
  +     +-->
    <map:pipelines>
  +
     <map:component-configurations>
       <global-variables>
  -       <!-- Define global parameters here:
  -           <skin>my_skin</skin>
  -           ...
  -           You can access them by {global:*name*}, e.g. {global:skin}.
  -           These values are inherited into sub-sitemaps and can
  -           be extended there.
  -        -->
  +       <!--+
  +           | Define global parameters here:
  +           |   <skin>my_skin</skin>
  +           |   ...
  +           | You can access them by {global:*name*}, e.g. {global:skin}.
  +           | These values are inherited into sub-sitemaps and can
  +           | be extended there.
  +           +-->
       </global-variables>
  -     <!-- Define component configuration here -->
  +    <!-- Define component configuration here -->
     </map:component-configurations>
   
  -  <!-- Cocoon documentation pipeline -->
  +  <!-- main pipeline -->
     <map:pipeline>
  -    <!-- Redirection to documentation sites -->
  +
  +    <!-- welcome page -->
       <map:match pattern="">
  -      <map:redirect-to uri="documents/index"/>
  +      <map:generate src="welcome.xml"/>
  +      <map:transform src="welcome.xslt"/>
  +      <map:serialize type="xhtml"/>
       </map:match>
   
  -    <map:match pattern="documents/index">
  -      <map:redirect-to uri="index.html"/>
  -      <!--
  -        You may direct a client to a more appropriate URI by the above
  -        command. The above results in a redirect response to the
  -        client. By redirecting to a ressource it would be handled by
  -        cocoon internally.
  -
  -        Since pipelines work on a first match basis, the above wins the
  -        request although the match below would match as well.
  -      -->
  +    <!-- welcome page images -->
  +    <map:match pattern="images/*.gif">
  +      <map:read src="resources/images/{1}.gif" mime-type="images/gif"/>
       </map:match>
  -    <map:match pattern="documents/**">
  -      <map:mount check-reload="yes" src="documentation/" uri-prefix="documents"/>
  +
  +    <!-- welcome page CSS stylesheets -->
  +    <map:match pattern="styles/*.css">
  +      <map:read src="resources/styles/{1}.css" mime-type="text/css"/>
  +    </map:match>
  +
  +    <!-- favicon -->
  +    <map:match pattern="favicon.ico">
  +      <map:read src="images/cocoon.ico"/>
  +    </map:match>
  +
  +    <!-- mount user directories -->
  +    <map:match pattern="~*/**">
  +      <map:mount check-reload="yes" src="/home/{1}/public_html/" uri-prefix="~{1}"/>
  +    </map:match>
  +    
  +    <!--+
  +        | Redirect to the user directory if the ending slash is missing
  +        | Cocoon doesn't do automatic translation of URLs because we consider it
  +        | a bad practice. http://blah/something/ and http://blah/something
  +        | effectively locate different web resources and the act of mapping
  +        | them to the same system resources is your concern, not Cocoon's.
  +        | Note that some stupid browsers (IE, for example) believe the opposite
  +        | and will drop the ending slash when you bookmark a web resource
  +        | so be aware of this issue and plan your URL-space carefully.
  +        +-->
  +    <map:match pattern="~*">
  +      <map:redirect-to uri="{0}/"/>
       </map:match>
  -  </map:pipeline>
   
  -  <!-- pipeline mounting samples sitemaps -->
  -  <map:pipeline>
       <!-- mount everything else -->
       <map:match pattern="*/**">
         <map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/>
  -    </map:match>   
  +    </map:match>
  +
     </map:pipeline>
   
    </map:pipelines>
   
  -</map:sitemap>
  -
  +</map:sitemap>
  \ No newline at end of file
  
  
  
  1.58      +25 -16    xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- cocoon.xconf	30 Jan 2003 09:01:31 -0000	1.57
  +++ cocoon.xconf	20 Feb 2003 18:17:47 -0000	1.58
  @@ -80,6 +80,20 @@
        <parameter name="use-persistent-cache" value="true"/>
     </transient-store>
   
  +  <!-- Persistent store for the cache. 
  +  
  +       Common configuration parameters:
  +         use-cache-directory: Indicates that cache directory specified in
  +                              web.xml should be used.
  +         use-work-directory: Indicates that work directory specified in
  +                             web.xml should be used.
  +         directory: Specifies directory to use. Absolute or relative to the
  +                    work directory.
  +  -->
  +  <persistent-store logger="core.store.persistent">
  +    <parameter name="use-cache-directory" value="true"/>
  +  </persistent-store>
  +  
     <!-- Store Janitor:
       Be careful with the heapsize and freememory parameters. Wrong values can
       cause high cpu usage. Example configuration:
  @@ -220,11 +234,11 @@
                Pizza. Requires pizza.jar (included with Cocoon distribution).
                Jikes. Requires IBM jikes compiler to be present in the PATH  -->
         <parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Pizza"/>
  -</java-language>
  +    </java-language>
     
       <!-- Interpreted JavaScript language -->
       <js-language logger="core.language.js" name="js"/>
  -</programming-languages>
  +  </programming-languages>
   
     <!-- Class loader:
       A singleton-like implementation of a ClassLoader.
  @@ -348,7 +362,6 @@
             <parameter name="uri" value="http://apache.org/cocoon/xsp/input/1.0"/>
             <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/input.xsl"/>
           </builtin-logicsheet>
  -
         </target-language>
       
         <!-- XSP in Javascript -->
  @@ -373,8 +386,7 @@
             <parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/javascript/session.xsl"/>
           </builtin-logicsheet>
         </target-language>
  -</xsp-language>
  -
  +    </xsp-language>
     </markup-languages>
   
     <!-- Compiling xml to byte streams.
  @@ -385,7 +397,6 @@
       a dependency.
     -->
     <xml-serializer class="org.apache.cocoon.components.sax.XMLByteStreamCompiler" logger="core.xml-serializer"
pool-grow="4" pool-max="32" pool-min="8"/>
  -
     <xml-deserializer class="org.apache.cocoon.components.sax.XMLByteStreamInterpreter"
logger="core.xml-deserializer" pool-grow="4" pool-max="32" pool-min="8"/>
   
     <!-- Resource Monitor:
  @@ -395,17 +406,15 @@
       <thread frequency="10000" priority="5"/>
     </monitor>
   
  -<cornerstone-threadmanager logger="core.scheduler">
  -  <thread-group>
  -     <name>default</name>
  -  </thread-group>
  -</cornerstone-threadmanager>
  +  <cornerstone-threadmanager logger="core.scheduler">
  +    <thread-group>
  +       <name>default</name>
  +    </thread-group>
  +  </cornerstone-threadmanager>
   
     <!-- cornerstone-scheduler -->
     <cornerstone-scheduler logger="core.scheduler"/>
   
  -<!-- ======================== The sitemap  ============================== -->
  -
     <!--
       New implementation of the sitemap. It is interpreted, so load times are super-fast,
       and request processing is slightly faster than with the compiled engine thanks to
  @@ -421,8 +430,8 @@
     -->
     <sitemap check-reload="yes" config="resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml"
file="context://sitemap.xmap" logger="sitemap"/>
   
  -  <!-- Entity resolution catalogs: *********************************************
  -    catalog:
  +  <!-- Entity resolution catalogs
  +
       The default catalog is distributed at /WEB-INF/entities/catalog
       This is the contextual pathname for Cocoon resources.
       You can override this path, if necessary, using the "catalog" parameter.
  @@ -451,7 +460,7 @@
       TODO: determine all messages at each level
      <parameter name="verbosity" value="2"/>
   
  -  ************************************************************************** -->
  +   -->
     <entity-resolver class="org.apache.cocoon.components.resolver.ResolverImpl" logger="core.resolver">
      <parameter name="catalog" value="/WEB-INF/entities/catalog"/>
      <parameter name="verbosity" value="1"/>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message