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

cvs commit: cocoon-2.1/src/webapp/samples/test/reader-mime-type explain-test.xml sitemap.xmap test10.html

bdelacretaz    2004/02/06 02:35:37

  Modified:    src/webapp/samples/test sitemap.xmap
  Added:       src/webapp/samples/test index.xml
               src/webapp/samples/test/reader-mime-type explain-test.xml
                        sitemap.xmap test10.html
  Log:
  refactoring + added test pages for bug 25121
  
  Revision  Changes    Path
  1.3       +58 -24    cocoon-2.1/src/webapp/samples/test/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/test/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap	6 Dec 2003 06:55:34 -0000	1.2
  +++ sitemap.xmap	6 Feb 2004 10:35:36 -0000	1.3
  @@ -1,27 +1,61 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
   <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:selectors default="browser"/>
  -    <map:matchers default="wildcard"/>
  -  </map:components>
  -  <map:pipelines>
  -    <map:pipeline>
  -      <map:match pattern="simpletest-content/**">
  -        <map:generate src="{1}"/>
  -        <map:serialize type="xml"/>
  -      </map:match>
  -      <map:match pattern="simpletest-mounted/**">
  -        <map:mount src="simpletest-mounted/" uri-prefix="simpletest-mounted"/>
  -      </map:match>
  -      <map:match pattern="simpletest">
  -        <map:generate src="cocoon:/simpletest-content/a.xml"/>
  -        <map:transform type="cinclude"/>
  -        <map:serialize type="xml"/>
  -      </map:match>
  -    </map:pipeline>
  -  </map:pipelines>
  +
  +    <map:pipelines>
  +
  +        <!-- used by the internalRequest anteater test -->
  +        <map:pipeline>
  +            <map:match pattern="simpletest-content/**">
  +                <map:generate src="{1}"/>
  +                <map:serialize type="xml"/>
  +            </map:match>
  +            <map:match pattern="simpletest-mounted/**">
  +                <map:mount src="simpletest-mounted/" uri-prefix="simpletest-mounted"/>
  +            </map:match>
  +            <map:match pattern="simpletest">
  +                <map:generate src="cocoon:/simpletest-content/a.xml"/>
  +                <map:transform type="cinclude"/>
  +                <map:serialize type="xml"/>
  +            </map:match>
  +        </map:pipeline>
  +
  +        <!-- explain what this is -->
  +        <map:pipeline>
  +            <map:match pattern="">
  +                <map:redirect-to uri="index.html"/>
  +            </map:match>
  +
  +            <map:match pattern="*.html">
  +                <map:generate src="{1}.xml"/>
  +                <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
  +                    <map:parameter name="servletPath" value="{request:servletPath}"/>
  +                    <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  +                    <map:parameter name="contextPath" value="{request:contextPath}"/>
  +                    <map:parameter name="file" value="{1}/{2}.xml"/>
  +                    <map:parameter name="remove" value="{0}"/>
  +                </map:transform>
  +                <map:serialize type="html"/>
  +            </map:match>
  +
  +            <!-- process the explain-test page for subdirectories -->
  +            <map:match pattern="**/explain-test.html">
  +                <map:generate src="{1}/explain-test.xml"/>
  +                <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
  +                    <map:parameter name="servletPath" value="{request:servletPath}"/>
  +                    <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  +                    <map:parameter name="contextPath" value="{request:contextPath}"/>
  +                    <map:parameter name="file" value="{1}/{2}.xml"/>
  +                    <map:parameter name="remove" value="{0}"/>
  +                </map:transform>
  +                <map:serialize type="html"/>
  +            </map:match>
  +
  +            <!-- mount subdirectories to contain tests -->
  +            <map:match pattern="*/**">
  +              <map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/>
  +            </map:match>
  +
  +        </map:pipeline>
  +
  +    </map:pipelines>
   </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/test/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- CVS $Id: index.xml,v 1.1 2004/02/06 10:35:36 bdelacretaz Exp $ -->
  
  <page>
      <title>Test pages</title>
      <content>
          <para>The pages found in and under this directory are meant for automated anteater tests.</para>
      </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/test/reader-mime-type/explain-test.xml
  
  Index: explain-test.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- CVS $Id: explain-test.xml,v 1.1 2004/02/06 10:35:36 bdelacretaz Exp $ -->
  
  <page>
      <title>reader-mime-type test</title>
      <content>
          <para>Test harness for bugzilla 25212, test mime-types on map:reader.</para>
          <para>
              Test links:
              <ul>
                  <li><link href="test10.html">test10.html</link></li>
                  <li><link href="test20.html">test20.html</link></li>
                  <li><link href="test30">test30</link></li>
                  <li><link href="test40.html">test40.html</link></li>
                  <li><link href="test50.html">test50.html</link></li>
                  <li><link href="test60.html">test60.html</link></li>
                  <li><link href="test70.html">test70.html</link></li>
              </ul>
          </para>
      </content>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/test/reader-mime-type/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
      <map:pipelines>
          <map:pipeline>
              <map:match pattern="test10.html">
                <map:read src="test10.html"/>
              </map:match>
              <map:match pattern="test20.html">
                <map:read src="cocoon:/test10.html"/>
              </map:match>
              <map:match pattern="test30">
                <map:read src="test10.html"/>
              </map:match>
          </map:pipeline>
  
          <map:pipeline>
              <map:match pattern="test40.html">
                <map:read src="cocoon:/test10.html"/>
              </map:match>
          </map:pipeline>
  
          <map:pipeline>
              <map:match pattern="test50.html">
                <map:read src="cocoon:/test30"/>
              </map:match>
          </map:pipeline>
  
          <map:pipeline>
              <map:match pattern="test60.html">
                <map:read src="cocoon:/test10.html" mime-type="text/html"/>
              </map:match>
          </map:pipeline>
  
          <map:pipeline>
              <map:match pattern="test70.html">
                <map:read src="cocoon:/test30" mime-type="text/html"/>
              </map:match>
          </map:pipeline>
      </map:pipelines>
  
  </map:sitemap>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/test/reader-mime-type/test10.html
  
  Index: test10.html
  ===================================================================
  <html>
  <body>
  This should have the text/html mime type.
  </body>
  </html>