You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/07/02 11:13:06 UTC

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

cziegeler    2002/07/02 02:13:06

  Modified:    src/webapp sitemap.xmap
  Added:       src/webapp/samples/lint sitemap.xmap
  Removed:     src/webapp/mount/lint sitemap.xmap
  Log:
  Moved lint and removed mount directory
  
  Revision  Changes    Path
  1.65      +0 -25     xml-cocoon2/src/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- sitemap.xmap	1 Jul 2002 10:04:16 -0000	1.64
  +++ sitemap.xmap	2 Jul 2002 09:13:06 -0000	1.65
  @@ -491,9 +491,6 @@
       <map:match pattern="documents/**">
         <map:mount check-reload="yes" src="documentation/" uri-prefix="documents"/>
       </map:match>
  -    <map:match pattern="tutorial/**">
  -      <map:mount check-reload="yes" src="tutorial/" uri-prefix="tutorial/"/>
  -    </map:match>
     </map:pipeline>
   
     <map:pipeline id="optional">
  @@ -521,12 +518,6 @@
       </map:match>
   
   
  -    <!-- Mount search pages sitemap, for using indexing & searching -->
  -    <map:match pattern="search/**">
  -      <map:mount check-reload="yes" src="search/" uri-prefix="search"/>
  -    </map:match>
  -
  -
       <!-- ======================= XML:DB ============================== -->
       <map:match pattern="xmldb/**">
         <map:match pattern="xpath" type="request-parameter">
  @@ -538,22 +529,6 @@
         <map:serialize type="xml"/>
       </map:match>
   </map:pipeline>
  -
  -  <!-- "automount" setup
  -    This causes directories added under "mount"
  -    (even with Cocoon already running) to be activated automagically
  -    if they contain a sitemap.xmap, without having to modify the main
  -    sitemap.xmap
  -  -->
  -  <map:pipeline>
  -    <map:match pattern="mount/*/**">
  -      <map:mount check-reload="yes" src="mount/{1}/" uri-prefix="mount/{1}"/>
  -      <!-- 
  -         This is an example of using a sitemap variable: "{1}" Curly
  -     brackets denote sitemap variables, here the one named "1".
  -      -->
  -    </map:match>
  -  </map:pipeline>
   
     <!-- pipeline mounting samples sitemaps -->
     <map:pipeline>
  
  
  
  1.1                  xml-cocoon2/src/webapp/samples/lint/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- This sitemap shows what is possible and what is not allowed. -->
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <map:components>
      <map:generators default="file"/>
      <map:transformers default="xslt"/>
      <map:readers default="resource"/>
      <map:serializers default="html"/>
      <map:matchers default="wildcard"/>
      <map:selectors default="parameter">
        <map:selector name="parameter" logger="sitemap.selector.parameter"
                      src="org.apache.cocoon.selection.ParameterSelector">
          <!-- component configuration may have any tags -->
          <unknown-tag/>
        </map:selector>
      </map:selectors>
    </map:components>
  
    <map:views>
      <map:view name="content" from-label="content">
        <!--
          Views can have same stuff as other pipelines except generator,
          reader, mount, redirect.
        -->
        <map:match pattern="test">
          <map:transform src="test"/>
        </map:match>
        <map:act type="request"/>
        <map:serialize type="xml"/>
      </map:view>
    </map:views>
  
    <map:resources>
      <map:resource name="slides">
        <map:generate src="test"/>
        <map:match pattern="test">
          <map:transform src="test"/>
        </map:match>
        <map:act type="request"/>
        <map:serialize/>
      </map:resource>
    </map:resources>
  
    <map:pipelines>
      <!-- The only working pipeline here -->
      <map:pipeline>
        <map:generate src="sitemap.xmap">
        <!-- parameter element is deprecated, and its usage will result in error.
        <parameter name="deprecated" value="error"/>
        -->
        </map:generate>
        <map:transform src="../../stylesheets/simple-xml2html.xsl"/>
        <map:serialize/>
        <!-- any unsupported tag will result in error
        <unknown-tag/>
        -->
      </map:pipeline>
  
      <!-- Pipeline with no map:generate|read|mount|redirect-to|call is illegal
      <map:pipeline>
        <map:transform src="../../stylesheets/simple-xml2html.xsl"/>
        <map:serialize/>
      </map:pipeline>
      -->
  
      <!-- Pipeline with map:generate|transform must have serialize
      <map:pipeline>
        <map:generate src="sitemap.xmap"/>
        <map:transform src="../../stylesheets/simple-xml2html.xsl"/>
      </map:pipeline>
      -->
  
      <!-- Pipeline with component after map:serialize|read|mount|redirect-to|call is illegal
      <map:pipeline>
        <map:read src="sitemap.xmap"/>
        <map:act type="request"/>
      </map:pipeline>
      -->
  
      <!-- map:match|select without direct components are illegal
      <map:pipeline>
        <map:match pattern="oops">
          <map:act type="request">
            <map:parameter name="x" value="x"/>
          </map:act>
        </map:match>
      </map:pipeline>
      -->
  
      <!-- More invalid pipelines
      <map:pipeline>
        <map:handle-errors>
          <map:generate src="sitemap.xmap"/>
          <map:serialize/>
        </map:handle-errors>
      </map:pipeline>
  
      <map:pipeline>
        <map:generate src="sitemap.xmap"/>
        <map:handle-errors>
          <map:serialize/>
        </map:handle-errors>
      </map:pipeline>
  
      <map:pipeline>
        <map:generate src="sitemap.xmap"/>
        <map:serialize/>
        <map:handle-errors>
        </map:handle-errors>
      </map:pipeline>
  
      <map:pipeline>
        <map:generate src="sitemap.xmap"/>
        <map:serialize/>
        <map:handle-errors>
          <map:generate src="sitemap.xmap"/>
        </map:handle-errors>
      </map:pipeline>
      -->
  
      <map:pipeline>
        <!-- 1. matchers allow any nested components -->
        <map:match pattern="test-one-1">
          <map:generate src="one"/>
          <map:match pattern="test-one-2-nested">
            <map:transform src="two"/>
          </map:match>
          <map:act type="request">
            <map:transform src="three"/>
          </map:act>
          <map:select>
            <map:when test="one">
              <map:transform src="four"/>
            </map:when>
            <map:otherwise>
              <map:transform src="five"/>
            </map:otherwise>
          </map:select>
          <map:transform src="six"/>
          <map:serialize/>
        </map:match>
  
        <map:match pattern="test-one-2">
          <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
        </map:match>
  
        <map:match pattern="test-one-3">
          <map:read src="one"/>
        </map:match>
  
        <!-- 2. selectors allow any nested components -->
        <map:select>
          <map:when test="one">
            <map:generate src="one"/>
            <map:transform src="two"/>
            <map:serialize/>
          </map:when>
          <map:when test="two">
            <map:act type="request">
              <map:read src="one"/>
            </map:act>
          </map:when>
          <map:when test="three">
            <map:match pattern="one">
              <map:read src="one"/>
            </map:match>
          </map:when>
          <map:when test="four">
            <map:generate src="one"/>
            <map:select>
              <map:when test="one-one">
                <map:transform src="five"/>
              </map:when>
              <map:otherwise>
                <map:transform src="six"/>
              </map:otherwise>
            </map:select>
            <map:serialize/>
          </map:when>
          <map:when test="five">
            <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
          </map:when>
          <map:otherwise>
            <map:read src="one"/>
          </map:otherwise>
        </map:select>
  
        <map:match pattern="test">
          <!-- 3. actions allow any nested components -->
          <map:act type="request">
            <map:generate src="one"/>
            <map:match pattern="test-one-2-nested">
              <map:transform src="two"/>
            </map:match>
            <map:act type="request">
              <map:transform src="three"/>
            </map:act>
            <map:select>
              <map:when test="one">
                <map:transform src="four"/>
              </map:when>
              <map:otherwise>
                <map:transform src="five"/>
              </map:otherwise>
            </map:select>
            <map:transform src="six"/>
            <map:serialize/>
          </map:act>
  
          <map:act type="request">
            <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
          </map:act>
  
          <map:act type="request">
            <map:read src="one"/>
          </map:act>
        </map:match>
  
        <!-- 4. direct components are also allowed at the top level -->
        <map:generate src="test-four"/>
        <map:transform src="test-four"/>
        <map:serialize/>
  
        <!-- can put nothing after serialize|read|mount|redirect-to
          <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
          <map:read src="one"/>
        -->
  
        <map:handle-errors>
          <map:match pattern="error-one">
            <map:transform src="one"/>
          </map:match>
          <map:act type="request">
            <map:transform src="two"/>
          </map:act>
          <map:select>
            <map:when test="one">
              <map:transform src="three"/>
            </map:when>
            <map:otherwise>
              <map:transform src="four"/>
            </map:otherwise>
          </map:select>
          <map:transform src="five"/>
          <map:serialize/>
        </map:handle-errors>
      </map:pipeline>
  
      <!-- Test substitutions -->
      <map:pipeline>
        <map:match type="not-substituted" pattern="substitute-match-pattern-{dummy}">
          <map:generate type="not-substituted" 
              src="substitute-generate-src-{dummy}" label="not-substituted"/>
          <map:transform type="not-substituted" src="substitute-transform-src-{dummy}"/>
  
          <map:act type="not-substituted" src="substitute-act-src-{dummy}"/>
  
          <map:select type="not-substituted">
            <map:when test="substitute-when-test-{dummy}">
              <map:transform src="dummy"/>
            </map:when>
            <map:otherwise>
            </map:otherwise>
          </map:select>
          <map:serialize type="not-substituted" src="substitute-serialize-src-{dummy}"/>
        </map:match>
  
        <map:match pattern="dummy">
          <map:mount
            uri-prefix="substitute-mount-uri-prefix-{dummy}"
            src="substitute-mount-src-{dummy}"
            check-reload="yes"/> <!-- no substitution -->
        </map:match>
  
        <map:match pattern="dummy">
          <map:read type="not-substituted" src="substitute-read-src-{dummy}"/>
        </map:match>
  
        <map:match pattern="dummy">
          <map:redirect-to uri="substitute-redirect-uri-{dummy}"/>
        </map:match>
  
        <map:aggregate 
          element="substitute-aggregate-element-{dummy}" 
          ns="substitute-aggregate-ns-{dummy}"
          prefix="substitute-aggregate-prefix-{dummy}">
          <map:part
            src="substitute-part-src-{dummy}"
            element="substitute-part-element-{dummy}"
            ns="substitute-part-ns-{dummy}"
            prefix="substitute-part-prefix-{dummy}"
            strip-root="substitute-part-strip-root-{dummy}"/>
        </map:aggregate>
        <map:call resource="substitute-call-src-{dummy}"/>
  
      </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