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/documentation/xdocs/drafts sitemap-allowed.xmap
Date Thu, 20 Feb 2003 20:23:31 GMT
stefano     2003/02/20 12:23:31

  Added:       src/documentation/xdocs/drafts sitemap-allowed.xmap
  Log:
  allowed/disallowed sitemap constructs (moved from webapp/samples/lint)
  
  Revision  Changes    Path
  1.1                  xml-cocoon2/src/documentation/xdocs/drafts/sitemap-allowed.xmap
  
  Index: sitemap-allowed.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 mime-type="text/test" src="sitemap.xmap"/>
        <map:act type="request"/>
      </map:pipeline>
      -->
  
      <!-- map:match|select without components are illegal
      <map:pipeline>
        <map:match pattern="oops">
          <map:act type="request">
            <map:parameter name="x" value="x"/>
          </map:act>
        </map:match>
        <map:match pattern="ok">
         <map:generate src="sitemap.xmap"/>
        </map:match>
        <map:serialize/>
      </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 mime-type="text/test" 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 mime-type="text/test" src="one"/>
            </map:act>
          </map:when>
          <map:when test="three">
            <map:match pattern="one">
              <map:read mime-type="text/test" 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 mime-type="text/test" 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 mime-type="text/test" 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 mime-type="text/test" 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 mime-type="text/test" 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


Mime
View raw message