bdelacretaz 2004/02/06 03:42:07
Modified: src/webapp/samples/test index.xml sitemap.xmap
src/webapp/samples/test/reader-mime-type explain-test.xml
Added: src/webapp/samples/test dir-links.xsl
Log:
Added a listing of test subdirectories
Revision Changes Path
1.2 +12 -2 cocoon-2.1/src/webapp/samples/test/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/test/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 6 Feb 2004 10:35:36 -0000 1.1
+++ index.xml 6 Feb 2004 11:42:07 -0000 1.2
@@ -5,6 +5,16 @@
<page>
<title>Test pages</title>
<content>
- <para>The pages found in and under this directory are meant for
automated anteater tests.</para>
+ <para>
+ Stuff found in and under this directory is meant for automated
anteater tests.
+ </para>
+ <para>
+ To create a new test set, create a new subdirectory here and add
an <em>explain-test.xml</em>
+ document into it.
+ </para>
+ <para>
+ <b>Available tests</b>:
+ <insert-directories/>
+ </para>
</content>
</page>
1.4 +16 -2 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.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sitemap.xmap 6 Feb 2004 10:35:36 -0000 1.3
+++ sitemap.xmap 6 Feb 2004 11:42:07 -0000 1.4
@@ -25,8 +25,19 @@
<map:redirect-to uri="index.html"/>
</map:match>
- <map:match pattern="*.html">
- <map:generate src="{1}.xml"/>
+ <map:match pattern="directory.xml">
+ <map:generate type="directory" src=".">
+ <depth>1</depth>
+ </map:generate>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ <map:match pattern="index.html">
+ <map:aggregate element="combo">
+ <map:part src="index.xml"/>
+ <map:part src="cocoon:/directory.xml"/>
+ </map:aggregate>
+ <map:transform src="dir-links.xsl"/>
<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}"/>
@@ -38,6 +49,9 @@
</map:match>
<!-- process the explain-test page for subdirectories -->
+ <map:match pattern="**/">
+ <map:redirect-to uri="explain-test.html"/>
+ </map:match>
<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">
1.1 cocoon-2.1/src/webapp/samples/test/dir-links.xsl
Index: dir-links.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Add links to subdirectories to index.xml
CVS $Id: dir-links.xsl,v 1.1 2004/02/06 11:42:07 bdelacretaz Exp $
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dir="http://apache.org/cocoon/directory/2.0"
xmlns="http://www.w3.org/1999/xhtml"
>
<!-- by default copy everything -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="combo">
<xsl:apply-templates select="page"/>
</xsl:template>
<!-- insert links to subdirectories -->
<xsl:template match="insert-directories">
<ul>
<xsl:apply-templates select="//dir:directory/dir:directory"
mode="links"/>
</ul>
</xsl:template>
<!-- ignore directory listing -->
<xsl:template match="dir:directory"/>
<!-- generate link to subdirectory -->
<xsl:template match="dir:directory" mode="links">
<li>
<a href="{concat(@name,'/')}"><xsl:value-of select="@name"/></a>
</li>
</xsl:template>
</xsl:stylesheet>
1.2 +6 -2
cocoon-2.1/src/webapp/samples/test/reader-mime-type/explain-test.xml
Index: explain-test.xml
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/webapp/samples/test/reader-mime-type/explain-test.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- explain-test.xml 6 Feb 2004 10:35:36 -0000 1.1
+++ explain-test.xml 6 Feb 2004 11:42:07 -0000 1.2
@@ -5,7 +5,11 @@
<page>
<title>reader-mime-type test</title>
<content>
- <para>Test harness for bugzilla 25212, test mime-types on
map:reader.</para>
+ <para>Test harness for
+ <a
href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25121">
+ bugzilla 25212
+ </a>, test mime-types on map:reader.
+ </para>
<para>
Test links:
<ul>