You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/08/13 17:16:33 UTC

cvs commit: xml-cocoon2/src/webapp/samples/search sitemap.xmap

vgritsenko    2002/08/13 08:16:33

  Modified:    src/webapp/search Tag: cocoon_2_0_3_branch sitemap.xmap
               src/webapp/samples/search sitemap.xmap
  Log:
  cleanup search sitemap. main sitemap has all the comments needed.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.2   +61 -222   xml-cocoon2/src/webapp/search/Attic/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/search/Attic/sitemap.xmap,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- sitemap.xmap	13 Jul 2002 16:28:03 -0000	1.5.2.1
  +++ sitemap.xmap	13 Aug 2002 15:16:33 -0000	1.5.2.2
  @@ -1,228 +1,67 @@
   <?xml version="1.0"?>
   
  +<!-- Search sub sitemap -->
   <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.
  --->
  -
  -
  -
  -<!-- =========================== 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.
  -
  -  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 name="search"
  -    src="org.apache.cocoon.generation.SearchGenerator"
  -    label="content"/>
  -</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 "xslt" transformer is an example of a component with additional
  -  configuration.
  --->
  -
  -<map:transformers default="xslt">
  -  <map:transformer name="log"
  -    src="org.apache.cocoon.transformation.LogTransformer"/>
  -</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"/>
  -
  -<!--
  -  Serializers consume SAX events and produce a character stream. Every
  -  pipeline needs to be terminated by a serializer.
  --->
  -
  -<map:serializers default="html"/>
  -
  -
  -<!--
  -  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.
  --->
  -
  -  <map:matchers default="wildcard"/>
  -
  -
  -<!--
  -  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.
  --->
  -
  -<map:selectors default="browser"/>
  -
  -<!--
  -  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.
  --->
  -
  -  <map:actions>
  -    <map:action name="lang-select" src="org.apache.cocoon.acting.LangSelect"/>
  -    <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction"/>
  -    <map:action name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
  -    <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/>
  -    <map:action name="resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/>
  -  </map:actions>
  -
  -</map:components>
  -
  -<!-- =========================== Views =================================== -->
  -
  -<!--
  -  Views provide diffent, well, views to resources. Views are
  -  orthogonal to pipelines. Please refer to the docs.
  --->
  -
  -<map:views>
  -  <map:view name="content" from-label="content">
  -   <map:serialize type="xml"/>
  -  </map:view>
  -
  -  <map:view name="links" from-position="last">
  -   <map:serialize type="links"/>
  -  </map:view>
  -
  -</map:views>
  -
  -
  -<!-- =========================== 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.
  --->
  -
  -<map:pipelines>
  -  
  -  <!-- sub-sitemap example pipeline -->
  -  <map:pipeline>
  -    <map:match pattern="">
  -      <map:redirect-to uri="welcome"/>
  -    </map:match>
  -
  -    <map:match pattern="images/*.gif">
  -      <map:read src="images/{1}.gif" mime-type="image/gif">
  -        <map:parameter name="expires" value="60000"/>
  -      </map:read>
  -    </map:match>
  -
  -    <map:match pattern="findIt">
  -      <map:generate type="search"/>
  -      <map:transform type="log"/>
  -      <map:transform src="stylesheets/search2html.xsl"/>
  -      <map:serialize/>
  -    </map:match>
  -    
  -    <map:match pattern="**">
  -      <map:generate type="serverpages" src="{1}-index.xsp"/>
  -      <!--
  -        Run-time configuration is done through these
  -        <map:parameter/> elements. Again, let's have a look at the
  -        javadocs:
  -        "[...] All <map:parameter> declarations will be made
  -        available in the XSLT stylesheet as xsl:variables. [...]" 
  -      -->
  -      <map:transform src="context://stylesheets/dynamic-page2html.xsl">
  -        <map:parameter name="view-source" value="search/{1}-index.xsp"/>
  -      </map:transform>
  -      <map:serialize/>
  -    </map:match>
  -
  -  </map:pipeline>
  -</map:pipelines>
   
  +  <!-- ========================= Components ============================== -->
  +  <map:components>
  +    <map:generators default="file">
  +      <map:generator name="search"
  +        src="org.apache.cocoon.generation.SearchGenerator"
  +        label="content"/>
  +    </map:generators>
  +
  +    <map:transformers default="xslt">
  +      <map:transformer name="log"
  +        src="org.apache.cocoon.transformation.LogTransformer"/>
  +    </map:transformers>
  +
  +    <map:readers default="resource"/>
  +    <map:serializers default="html"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +    <map:actions/>
  +  </map:components>
  +
  +  <!-- ========================== Views ================================== -->
  +  <map:views>
  +    <map:view name="content" from-label="content">
  +     <map:serialize type="xml"/>
  +    </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:redirect-to uri="welcome"/>
  +      </map:match>
  +
  +      <map:match pattern="images/*.gif">
  +        <map:read src="images/{1}.gif" mime-type="image/gif">
  +          <map:parameter name="expires" value="60000"/>
  +        </map:read>
  +      </map:match>
  +
  +      <map:match pattern="findIt">
  +        <map:generate type="search"/>
  +        <map:transform type="log"/>
  +        <map:transform src="stylesheets/search2html.xsl"/>
  +        <map:serialize/>
  +      </map:match>
  +    
  +      <map:match pattern="**">
  +        <map:generate type="serverpages" src="{1}-index.xsp"/>
  +        <map:transform src="context://stylesheets/dynamic-page2html.xsl">
  +          <map:parameter name="view-source" value="search/{1}-index.xsp"/>
  +        </map:transform>
  +        <map:serialize/>
  +      </map:match>
  +    </map:pipeline>
  +  </map:pipelines>
   </map:sitemap>
  -
   <!-- end of file -->
  -
  
  
  
  1.4       +61 -221   xml-cocoon2/src/webapp/samples/search/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/search/sitemap.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sitemap.xmap	13 Jul 2002 16:28:04 -0000	1.3
  +++ sitemap.xmap	13 Aug 2002 15:16:33 -0000	1.4
  @@ -1,228 +1,68 @@
   <?xml version="1.0"?>
   
  +<!-- Search sub sitemap -->
   <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.
  --->
  -
  -
  -
  -<!-- =========================== 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.
  -
  -  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 name="search"
  -    src="org.apache.cocoon.generation.SearchGenerator"
  -    label="content"/>
  -</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 "xslt" transformer is an example of a component with additional
  -  configuration.
  --->
  -
  -<map:transformers default="xslt">
  -  <map:transformer name="log"
  -    src="org.apache.cocoon.transformation.LogTransformer"/>
  -</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"/>
  -
  -<!--
  -  Serializers consume SAX events and produce a character stream. Every
  -  pipeline needs to be terminated by a serializer.
  --->
  -
  -<map:serializers default="html"/>
  -
  -
  -<!--
  -  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.
  --->
  -
  -  <map:matchers default="wildcard"/>
  -
  -
  -<!--
  -  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.
  --->
  -
  -<map:selectors default="browser"/>
  -
  -<!--
  -  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.
  --->
  -
  -  <map:actions>
  -    <map:action name="lang-select" src="org.apache.cocoon.acting.LangSelect"/>
  -    <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction"/>
  -    <map:action name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
  -    <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/>
  -    <map:action name="resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/>
  -  </map:actions>
  -
  -</map:components>
  -
  -<!-- =========================== Views =================================== -->
  -
  -<!--
  -  Views provide diffent, well, views to resources. Views are
  -  orthogonal to pipelines. Please refer to the docs.
  --->
  -
  -<map:views>
  -  <map:view name="content" from-label="content">
  -   <map:serialize type="xml"/>
  -  </map:view>
  -
  -  <map:view name="links" from-position="last">
  -   <map:serialize type="links"/>
  -  </map:view>
  -
  -</map:views>
  -
  -
  -<!-- =========================== 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.
  --->
  -
  -<map:pipelines>
  -  
  -  <!-- sub-sitemap example pipeline -->
  -  <map:pipeline>
  -    <map:match pattern="">
  -      <map:redirect-to uri="welcome"/>
  -    </map:match>
  -
  -    <map:match pattern="images/*.gif">
  -      <map:read src="images/{1}.gif" mime-type="image/gif">
  -        <map:parameter name="expires" value="60000"/>
  -      </map:read>
  -    </map:match>
  -
  -    <map:match pattern="findIt">
  -      <map:generate type="search"/>
  -      <map:transform type="log"/>
  -      <map:transform src="stylesheets/search2html.xsl"/>
  -      <map:serialize/>
  -    </map:match>
  -    
  -    <map:match pattern="**">
  -      <map:generate type="serverpages" src="{1}-index.xsp"/>
  -      <!--
  -        Run-time configuration is done through these
  -        <map:parameter/> elements. Again, let's have a look at the
  -        javadocs:
  -        "[...] All <map:parameter> declarations will be made
  -        available in the XSLT stylesheet as xsl:variables. [...]" 
  -      -->
  -      <map:transform src="context://samples/stylesheets/dynamic-page2html.xsl">
  -        <map:parameter name="view-source" value="search/{1}-index.xsp"/>
  -      </map:transform>
  -      <map:serialize/>
  -    </map:match>
   
  -  </map:pipeline>
  -</map:pipelines>
  +  <!-- =========================== Components ================================ -->
  +  <map:components>
   
  +    <map:generators default="file">
  +      <map:generator name="search"
  +        src="org.apache.cocoon.generation.SearchGenerator"
  +        label="content"/>
  +    </map:generators>
  +
  +    <map:transformers default="xslt">
  +      <map:transformer name="log"
  +        src="org.apache.cocoon.transformation.LogTransformer"/>
  +    </map:transformers>
  +
  +    <map:readers default="resource"/>
  +    <map:serializers default="html"/>
  +    <map:matchers default="wildcard"/>
  +    <map:selectors default="browser"/>
  +    <map:actions/>
  +  </map:components>
  +
  +  <!-- =========================== Views =================================== -->
  +  <map:views>
  +    <map:view name="content" from-label="content">
  +     <map:serialize type="xml"/>
  +    </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:redirect-to uri="welcome"/>
  +      </map:match>
  +
  +      <map:match pattern="images/*.gif">
  +        <map:read src="images/{1}.gif" mime-type="image/gif">
  +          <map:parameter name="expires" value="60000"/>
  +        </map:read>
  +      </map:match>
  +
  +      <map:match pattern="findIt">
  +        <map:generate type="search"/>
  +        <map:transform type="log"/>
  +        <map:transform src="stylesheets/search2html.xsl"/>
  +        <map:serialize/>
  +      </map:match>
  +    
  +      <map:match pattern="**">
  +        <map:generate type="serverpages" src="{1}-index.xsp"/>
  +        <map:transform src="context://samples/stylesheets/dynamic-page2html.xsl">
  +          <map:parameter name="view-source" value="search/{1}-index.xsp"/>
  +        </map:transform>
  +        <map:serialize/>
  +      </map:match>
  +    </map:pipeline>
  +  </map:pipelines>
   </map:sitemap>
  -
   <!-- end of file -->
  -
  
  
  

----------------------------------------------------------------------
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