home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / sitemap-allowed.xmap < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  9.8 KB  |  321 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <!-- This sitemap shows what is possible and what is not allowed. -->
  19. <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  20.   <map:components>
  21.     <map:generators default="file"/>
  22.     <map:transformers default="xslt"/>
  23.     <map:readers default="resource"/>
  24.     <map:serializers default="html"/>
  25.     <map:matchers default="wildcard"/>
  26.     <map:selectors default="parameter">
  27.       <map:selector name="parameter" logger="sitemap.selector.parameter"
  28.                     src="org.apache.cocoon.selection.ParameterSelector">
  29.         <!-- component configuration may have any tags -->
  30.         <unknown-tag/>
  31.       </map:selector>
  32.     </map:selectors>
  33.   </map:components>
  34.  
  35.   <map:views>
  36.     <map:view name="content" from-label="content">
  37.       <!--
  38.         Views can have same stuff as other pipelines except generator,
  39.         reader, mount, redirect.
  40.       -->
  41.       <map:match pattern="test">
  42.         <map:transform src="test"/>
  43.       </map:match>
  44.       <map:act type="request"/>
  45.       <map:serialize type="xml"/>
  46.     </map:view>
  47.   </map:views>
  48.  
  49.   <map:resources>
  50.     <map:resource name="slides">
  51.       <map:generate src="test"/>
  52.       <map:match pattern="test">
  53.         <map:transform src="test"/>
  54.       </map:match>
  55.       <map:act type="request"/>
  56.       <map:serialize/>
  57.     </map:resource>
  58.   </map:resources>
  59.  
  60.   <map:pipelines>
  61.     <!-- The only working pipeline here -->
  62.     <map:pipeline>
  63.       <map:generate src="sitemap.xmap">
  64.       <!-- parameter element is deprecated, and its usage will result in error.
  65.       <parameter name="deprecated" value="error"/>
  66.       -->
  67.       </map:generate>
  68.       <map:transform src="../../stylesheets/simple-xml2html.xslt"/>
  69.       <map:serialize/>
  70.       <!-- any unsupported tag will result in error
  71.       <unknown-tag/>
  72.       -->
  73.     </map:pipeline>
  74.  
  75.     <!-- Pipeline with no map:generate|read|mount|redirect-to|call is illegal
  76.     <map:pipeline>
  77.       <map:transform src="../../stylesheets/simple-xml2html.xslt"/>
  78.       <map:serialize/>
  79.     </map:pipeline>
  80.     -->
  81.  
  82.     <!-- Pipeline with map:generate|transform must have serialize
  83.     <map:pipeline>
  84.       <map:generate src="sitemap.xmap"/>
  85.       <map:transform src="../../stylesheets/simple-xml2html.xslt"/>
  86.     </map:pipeline>
  87.     -->
  88.  
  89.     <!-- Pipeline with component after map:serialize|read|mount|redirect-to|call is illegal
  90.     <map:pipeline>
  91.       <map:read mime-type="text/test" src="sitemap.xmap"/>
  92.       <map:act type="request"/>
  93.     </map:pipeline>
  94.     -->
  95.  
  96.     <!-- map:match|select without components are illegal
  97.     <map:pipeline>
  98.       <map:match pattern="oops">
  99.         <map:act type="request">
  100.           <map:parameter name="x" value="x"/>
  101.         </map:act>
  102.       </map:match>
  103.       <map:match pattern="ok">
  104.        <map:generate src="sitemap.xmap"/>
  105.       </map:match>
  106.       <map:serialize/>
  107.     </map:pipeline>
  108.     -->
  109.  
  110.     <!-- More invalid pipelines
  111.     <map:pipeline>
  112.       <map:handle-errors>
  113.         <map:generate src="sitemap.xmap"/>
  114.         <map:serialize/>
  115.       </map:handle-errors>
  116.     </map:pipeline>
  117.  
  118.     <map:pipeline>
  119.       <map:generate src="sitemap.xmap"/>
  120.       <map:handle-errors>
  121.         <map:serialize/>
  122.       </map:handle-errors>
  123.     </map:pipeline>
  124.  
  125.     <map:pipeline>
  126.       <map:generate src="sitemap.xmap"/>
  127.       <map:serialize/>
  128.       <map:handle-errors>
  129.       </map:handle-errors>
  130.     </map:pipeline>
  131.  
  132.     <map:pipeline>
  133.       <map:generate src="sitemap.xmap"/>
  134.       <map:serialize/>
  135.       <map:handle-errors>
  136.         <map:generate src="sitemap.xmap"/>
  137.       </map:handle-errors>
  138.     </map:pipeline>
  139.     -->
  140.  
  141.     <map:pipeline>
  142.       <!-- 1. matchers allow any nested components -->
  143.       <map:match pattern="test-one-1" name="anchor-match">
  144.         <map:generate src="one"/>
  145.         <map:match pattern="test-one-2-nested">
  146.           <map:transform src="two"/>
  147.         </map:match>
  148.         <map:act type="request" name="anchor-act">
  149.           <map:transform src="three"/>
  150.         </map:act>
  151.         <map:select>
  152.           <map:when test="one">
  153.             <map:transform src="four"/>
  154.           </map:when>
  155.           <map:otherwise>
  156.             <map:transform src="five"/>
  157.           </map:otherwise>
  158.         </map:select>
  159.         <map:transform src="six"/>
  160.         <map:serialize/>
  161.       </map:match>
  162.  
  163.       <map:match pattern="test-one-2">
  164.         <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  165.       </map:match>
  166.  
  167.       <map:match pattern="test-one-3">
  168.         <map:read mime-type="text/test" src="one"/>
  169.       </map:match>
  170.  
  171.       <!-- 2. selectors allow any nested components -->
  172.       <map:select>
  173.         <map:when test="one">
  174.           <map:generate src="one"/>
  175.           <map:transform src="two"/>
  176.           <map:serialize/>
  177.         </map:when>
  178.         <map:when test="two">
  179.           <map:act type="request">
  180.             <map:read mime-type="text/test" src="one"/>
  181.           </map:act>
  182.         </map:when>
  183.         <map:when test="three">
  184.           <map:match pattern="one">
  185.             <map:read mime-type="text/test" src="one"/>
  186.           </map:match>
  187.         </map:when>
  188.         <map:when test="four">
  189.           <map:generate src="one"/>
  190.           <map:select>
  191.             <map:when test="one-one">
  192.               <map:transform src="five"/>
  193.             </map:when>
  194.             <map:otherwise>
  195.               <map:transform src="six"/>
  196.             </map:otherwise>
  197.           </map:select>
  198.           <map:serialize/>
  199.         </map:when>
  200.         <map:when test="five">
  201.           <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  202.         </map:when>
  203.         <map:otherwise>
  204.           <map:read mime-type="text/test" src="one"/>
  205.         </map:otherwise>
  206.       </map:select>
  207.  
  208.       <map:match pattern="test">
  209.         <!-- 3. actions allow any nested components -->
  210.         <map:act type="request">
  211.           <map:generate src="one"/>
  212.           <map:match pattern="test-one-2-nested">
  213.             <map:transform src="two"/>
  214.           </map:match>
  215.           <map:act type="request">
  216.             <map:transform src="three"/>
  217.           </map:act>
  218.           <map:select>
  219.             <map:when test="one">
  220.               <map:transform src="four"/>
  221.             </map:when>
  222.             <map:otherwise>
  223.               <map:transform src="five"/>
  224.             </map:otherwise>
  225.           </map:select>
  226.           <map:transform src="six"/>
  227.           <map:serialize/>
  228.         </map:act>
  229.  
  230.         <map:act type="request">
  231.           <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  232.         </map:act>
  233.  
  234.         <map:act type="request">
  235.           <map:read mime-type="text/test" src="one"/>
  236.         </map:act>
  237.       </map:match>
  238.  
  239.       <!-- 4. direct components are also allowed at the top level -->
  240.       <map:generate src="test-four"/>
  241.       <map:transform src="test-four"/>
  242.       <map:serialize/>
  243.  
  244.       <!-- can put nothing after serialize|read|mount|redirect-to
  245.         <map:mount uri-prefix="one/" src="one/" check-reload="yes"/>
  246.         <map:read mime-type="text/test" src="one"/>
  247.       -->
  248.  
  249.       <map:handle-errors>
  250.         <map:match pattern="error-one">
  251.           <map:transform src="one"/>
  252.         </map:match>
  253.         <map:act type="request">
  254.           <map:transform src="two"/>
  255.         </map:act>
  256.         <map:select>
  257.           <map:when test="one">
  258.             <map:transform src="three"/>
  259.           </map:when>
  260.           <map:otherwise>
  261.             <map:transform src="four"/>
  262.           </map:otherwise>
  263.         </map:select>
  264.         <map:transform src="five"/>
  265.         <map:serialize/>
  266.       </map:handle-errors>
  267.     </map:pipeline>
  268.  
  269.     <!-- Test substitutions -->
  270.     <map:pipeline>
  271.       <map:match type="not-substituted" pattern="substitute-match-pattern-{dummy}">
  272.         <map:generate type="not-substituted" 
  273.             src="substitute-generate-src-{dummy}" label="not-substituted"/>
  274.         <map:transform type="not-substituted" src="substitute-transform-src-{dummy}"/>
  275.  
  276.         <map:act type="not-substituted" src="substitute-act-src-{dummy}"/>
  277.  
  278.         <map:select type="not-substituted">
  279.           <map:when test="substitute-when-test-{dummy}">
  280.             <map:transform src="dummy"/>
  281.           </map:when>
  282.           <map:otherwise>
  283.           </map:otherwise>
  284.         </map:select>
  285.         <map:serialize type="not-substituted" src="substitute-serialize-src-{dummy}"/>
  286.       </map:match>
  287.  
  288.       <map:match pattern="dummy">
  289.         <map:mount
  290.           uri-prefix="substitute-mount-uri-prefix-{dummy}"
  291.           src="substitute-mount-src-{dummy}"
  292.           check-reload="yes"/> <!-- no substitution -->
  293.       </map:match>
  294.  
  295.       <map:match pattern="dummy">
  296.         <map:read mime-type="text/test" type="not-substituted" src="substitute-read-src-{dummy}"/>
  297.       </map:match>
  298.  
  299.       <map:match pattern="dummy">
  300.         <map:redirect-to uri="substitute-redirect-uri-{dummy}"/>
  301.       </map:match>
  302.  
  303.       <map:aggregate 
  304.         element="substitute-aggregate-element-{dummy}" 
  305.         ns="substitute-aggregate-ns-{dummy}"
  306.         prefix="substitute-aggregate-prefix-{dummy}">
  307.         <map:part
  308.           src="substitute-part-src-{dummy}"
  309.           element="substitute-part-element-{dummy}"
  310.           ns="substitute-part-ns-{dummy}"
  311.           prefix="substitute-part-prefix-{dummy}"
  312.           strip-root="substitute-part-strip-root-{dummy}"/>
  313.       </map:aggregate>
  314.       <map:call resource="substitute-call-src-{dummy}"/>
  315.  
  316.     </map:pipeline>
  317.   </map:pipelines>
  318. </map:sitemap>
  319.  
  320. <!-- end of file -->
  321.