You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by ch...@apache.org on 2004/12/22 02:16:03 UTC
svn commit: r123025 - in forrest/trunk/whiteboard/tests/xsltunit: . content content/code testunits testunits/rss2document.xsl
Author: cheche
Date: Tue Dec 21 17:16:01 2004
New Revision: 123025
URL: http://svn.apache.org/viewcvs?view=rev&rev=123025
Log:
First version for the forrest test suite
just forrest under xsltunit directory
Added:
forrest/trunk/whiteboard/tests/xsltunit/
forrest/trunk/whiteboard/tests/xsltunit/content/
forrest/trunk/whiteboard/tests/xsltunit/content/code/
forrest/trunk/whiteboard/tests/xsltunit/content/code/error.xsl
forrest/trunk/whiteboard/tests/xsltunit/content/code/set_id.xsl
forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit-test.xsl
forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit.xsl
forrest/trunk/whiteboard/tests/xsltunit/content/index.xml
forrest/trunk/whiteboard/tests/xsltunit/content/site.xml
forrest/trunk/whiteboard/tests/xsltunit/content/tabs.xml
forrest/trunk/whiteboard/tests/xsltunit/forrest.properties
forrest/trunk/whiteboard/tests/xsltunit/sitemap.xmap
forrest/trunk/whiteboard/tests/xsltunit/skinconf.xml
forrest/trunk/whiteboard/tests/xsltunit/status.xml
forrest/trunk/whiteboard/tests/xsltunit/test2document.xsl
forrest/trunk/whiteboard/tests/xsltunit/testunits/
forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/
forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-input.xml
forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-output.xml
forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-test.xsl
Added: forrest/trunk/whiteboard/tests/xsltunit/content/code/error.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/code/error.xsl?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/code/error.xsl Tue Dec 21 17:16:01 2004
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:error="http://apache.org/cocoon/error/2.1"
+>
+
+<xsl:param name="element"/> <!-- Root element for test suites. -->
+<xsl:param name="id"/> <!-- Name of the error suite. -->
+
+<!-- Errors are translated into a testsuite, so they are visible in the report. -->
+<xsl:template match="error:notify">
+ <xsl:element name="{$element}">
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
+ <xsl:attribute name="error"><xsl:value-of select="error:title"/></xsl:attribute>
+ <xsl:apply-templates select="@*|node()|text()"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- Throw away extra error information. -->
+<xsl:template match="error:extra">
+</xsl:template>
+
+<!-- Keep all other elements, process content. -->
+<xsl:template match="@*|*">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()|text()"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()">
+ <xsl:value-of select="normalize-space()"/>
+</xsl:template>
+
+</xsl:stylesheet>
Added: forrest/trunk/whiteboard/tests/xsltunit/content/code/set_id.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/code/set_id.xsl?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/code/set_id.xsl Tue Dec 21 17:16:01 2004
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
+
+<xsl:param name="id"/>
+
+<xsl:template match="/*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:attribute name="id">
+ <xsl:value-of select="$id"/>
+ <xsl:if test="@id">
+ <xsl:value-of select="concat(': ', @id)"/>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:copy-of select="node()"/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
Added: forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit-test.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit-test.xsl?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit-test.xsl Tue Dec 21 17:16:01 2004
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xslt="xslt"
+>
+
+<xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>
+
+<xsl:param name="id"/>
+<xsl:param name="xslt"/>
+<xsl:param name="output"/>
+
+<xsl:template match="/*">
+ <xslt:stylesheet version="1.0" xmlns:xsltu="http://xsltunit.org/0/">
+ <xslt:import href="cocoon://test/xsltunit.xsl"/>
+ <xslt:import href="{$xslt}"/>
+ <xslt:strip-space elements="*"/>
+ <xsl:apply-templates select="parameter"/>
+ <xslt:template match="/">
+ <xslt:call-template name="xsltu:assertEqual">
+ <xslt:with-param name="id" select="'{$id}: {@name}'"/>
+ <xslt:with-param name="nodes1"><xslt:apply-imports/></xslt:with-param>
+ <xslt:with-param name="nodes2" select="document('{$output}')"/>
+ </xslt:call-template>
+ </xslt:template>
+ </xslt:stylesheet>
+</xsl:template>
+
+<xsl:template match="parameter">
+ <xslt:param name="{@name}" select="'{@value}'"/>
+</xsl:template>
+
+</xsl:stylesheet>
Added: forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit.xsl?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/code/xsltunit.xsl Tue Dec 21 17:16:01 2004
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
+ xmlns:xsltu="http://xsltunit.org/0/"
+ exclude-result-prefixes="exsl">
+
+ <xsl:template name="xsltu:assertEqual">
+ <xsl:param name="id"/>
+ <xsl:param name="nodes1"/>
+ <xsl:param name="nodes2"/>
+ <xsl:variable name="result">
+ <xsl:call-template name="xsltu:diff">
+ <xsl:with-param name="nodes1" select="exsl:node-set($nodes1)"/>
+ <xsl:with-param name="nodes2" select="exsl:node-set($nodes2)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="xsltu:assert">
+ <xsl:with-param name="id" select="$id"/>
+ <xsl:with-param name="test" select="not(exsl:node-set($result)//xsltu:no-match)"/>
+ <xsl:with-param name="message" select="exsl:node-set($result)"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="xsltu:assertNotEqual">
+ <xsl:param name="id"/>
+ <xsl:param name="nodes1"/>
+ <xsl:param name="nodes2"/>
+ <xsl:variable name="result">
+ <xsl:call-template name="xsltu:diff">
+ <xsl:with-param name="nodes1" select="exsl:node-set($nodes1)"/>
+ <xsl:with-param name="nodes2" select="exsl:node-set($nodes2)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:call-template name="xsltu:assert">
+ <xsl:with-param name="id" select="$id"/>
+ <xsl:with-param name="test" select="exsl:node-set($result)//xsltu:no-match"/>
+ <xsl:with-param name="message">Should have been different!</xsl:with-param>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="xsltu:assert">
+ <xsl:param name="id"/>
+ <xsl:param name="test"/>
+ <xsl:param name="message"/>
+ <xsltu:assert id="{$id}">
+ <xsl:choose>
+ <xsl:when test="$test">
+ <xsl:attribute name="outcome">passed</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="outcome">failed</xsl:attribute>
+ <xsltu:message>
+ <xsl:copy-of select="$message"/>
+ </xsltu:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsltu:assert>
+ </xsl:template>
+ <xsl:template name="xsltu:diff">
+ <xsl:param name="nodes1"/>
+ <xsl:param name="nodes2"/>
+ <xsltu:diff name="{name($nodes1)}">
+ <xsl:choose>
+ <xsl:when test="self::* and (local-name($nodes1) != local-name($nodes2) or namespace-uri($nodes1) != namespace-uri($nodes2))">
+ <xsltu:no-match diff="names">
+ <xsltu:node>
+ <xsl:copy-of select="$nodes1"/>
+ </xsltu:node>
+ <xsltu:node>
+ <xsl:copy-of select="$nodes2"/>
+ </xsltu:node>
+ </xsltu:no-match>
+ </xsl:when>
+ <xsl:when test="count($nodes1/@*) != count($nodes2/@*)">
+ <xsltu:no-match diff="number of children attributes ({count($nodes1/@*)} versus {count($nodes2/@*)} )">
+ <xsltu:node>
+ <xsl:copy-of select="$nodes1"/>
+ </xsltu:node>
+ <xsltu:node>
+ <xsl:copy-of select="$nodes2"/>
+ </xsltu:node>
+ </xsltu:no-match>
+ </xsl:when>
+ <xsl:when test="count($nodes1/*) != count($nodes2/*)">
+ <xsltu:no-match diff="number of children elements ({count($nodes1/*)} versus {count($nodes2/*)} )">
+ <xsltu:node>
+ <xsl:copy-of select="$nodes1"/>
+ </xsltu:node>
+ <xsltu:node>
+ <xsl:copy-of select="$nodes2"/>
+ </xsltu:node>
+ </xsltu:no-match>
+ </xsl:when>
+ <xsl:when test="count($nodes1/text()) != count($nodes2/text())">
+ <xsltu:no-match diff="number of children text nodes ({count($nodes1/text())} versus {count($nodes2/text())} )">
+ <xsltu:node>
+ <xsl:copy-of select="$nodes1"/>
+ </xsltu:node>
+ <xsltu:node>
+ <xsl:copy-of select="$nodes2"/>
+ </xsltu:node>
+ </xsltu:no-match>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$nodes1/@*" mode="xsltu:diff">
+ <xsl:with-param name="nodes2" select="$nodes2"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="$nodes1/*" mode="xsltu:diff">
+ <xsl:with-param name="nodes2" select="$nodes2"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="$nodes1/text()" mode="xsltu:diff">
+ <xsl:with-param name="nodes2" select="$nodes2"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsltu:diff>
+ </xsl:template>
+ <xsl:template match="*" mode="xsltu:diff">
+ <xsl:param name="pos" select="position()"/>
+ <xsl:param name="nodes2"/>
+ <xsl:param name="node2" select="$nodes2/*[position()=$pos]"/>
+ <xsl:call-template name="xsltu:diff">
+ <xsl:with-param name="nodes1" select="."/>
+ <xsl:with-param name="nodes2" select="$node2"/>
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template match="text()" mode="xsltu:diff">
+ <xsl:param name="current" select="."/>
+ <xsl:param name="pos" select="position()"/>
+ <xsl:param name="nodes2"/>
+ <xsl:param name="node2" select="$nodes2/text()[position()=$pos]"/>
+ <xsl:if test="not(. = $node2)">
+ <xsltu:no-match>
+ <xsltu:node>
+ <xsl:copy-of select="."/>
+ </xsltu:node>
+ <xsltu:node>
+ <xsl:copy-of select="$node2"/>
+ </xsltu:node>
+ </xsltu:no-match>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template match="@*" mode="xsltu:diff">
+ <xsl:param name="current" select="."/>
+ <xsl:param name="nodes2"/>
+ <xsl:param name="node2" select="$nodes2/@*[local-name() = local-name(current()) and namespace-uri() = namespace-uri(current())]"/>
+ <xsl:if test="not(. = $node2)">
+ <xsltu:no-match>
+ <xsltu:node>
+ <xsl:copy-of select="."/>
+ </xsltu:node>
+ <xsltu:node>
+ <xsl:copy-of select="$node2"/>
+ </xsltu:node>
+ </xsltu:no-match>
+ </xsl:if>
+ </xsl:template>
+</xsl:stylesheet>
Added: forrest/trunk/whiteboard/tests/xsltunit/content/index.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/index.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/index.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>Test Suite </title>
+ </header>
+ <body>
+ <section>
+ <title>First Attempt</title>
+ <p>This is an Attempt of a Test Suite for forrest.</p>
+ <p>Thanks to NicoVerwer for his initial counit and http://xsltunit.org/</p>
+ </section>
+ </body>
+</document>
Added: forrest/trunk/whiteboard/tests/xsltunit/content/site.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/site.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/site.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
+
+ <about label="About">
+ <index label="Index" href="index.html" description="Welcome to MyProj"/>
+ <changes label="Changes" href="changes.html" description="History of Changes" />
+ <todo label="Todo" href="todo.html" description="Todo List" />
+ <test label="Test Suite" href="testsuite/" description="Test Suite "/>
+ </about>
+
+ <external-refs>
+ <forrest href="http://forrest.apache.org/">
+ <linking href="docs/linking.html"/>
+ <validation href="docs/validation.html"/>
+ <webapp href="docs/your-project.html#webapp"/>
+ <dtd-docs href="docs/dtd-docs.html"/>
+ </forrest>
+ <cocoon href="http://cocoon.apache.org/"/>
+ <xml.apache.org href="http://xml.apache.org/"/>
+ </external-refs>
+
+</site>
Added: forrest/trunk/whiteboard/tests/xsltunit/content/tabs.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/content/tabs.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/content/tabs.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN" "http://forrest.apache.org/dtd/tab-cocoon-v11.dtd">
+
+<tabs software="Forrest"
+ title="Apache Forrest"
+ copyright="2004 The Apache Software Foundation"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <!-- The rules for tabs are:
+ @dir will always have '/@indexfile' added.
+ @indexfile gets appended to @dir if the tab is selected. Defaults to 'index.html'
+ @href is not modified unless it is root-relative and obviously specifies a
+ directory (ends in '/'), in which case /index.html will be added
+ If @id's are present, site.xml entries with a matching @tab will be in that tab.
+
+ Tabs can be embedded to a depth of two. The second level of tabs will only
+ be displayed when their parent tab is selected.
+ -->
+
+ <tab id="home" label="Welcome" dir=""/>
+</tabs>
Added: forrest/trunk/whiteboard/tests/xsltunit/forrest.properties
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/forrest.properties?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/forrest.properties Tue Dec 21 17:16:01 2004
@@ -0,0 +1,3 @@
+project.content-dir=.
+project.xdocs-dir=content
+project.required.plugins=
Added: forrest/trunk/whiteboard/tests/xsltunit/sitemap.xmap
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/sitemap.xmap?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/sitemap.xmap Tue Dec 21 17:16:01 2004
@@ -0,0 +1,39 @@
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:pipelines>
+
+ <map:pipeline>
+
+ <map:match pattern="testsuite/index.xml">
+ <map:aggregate element="testsuite">
+ <map:part src="cocoon://testsuite/rss2document.xsl/01"/>
+ <!-- Add new units over here -->
+ </map:aggregate>
+ <map:transform src="test2document.xsl"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ </map:pipeline>
+
+ <map:pipeline internal-only="true">
+ <!-- Test any XSL stylesheet.
+ The test contains:
+ * {2}-input.xml
+ * {2}-test.xsl
+ * {2}-output.xml (if used by test.xsl)
+ -->
+ <map:match pattern="testsuite/*/*">
+ <map:generate src="testunits/{1}/{2}-input.xml"/>
+ <map:transform src="{forrest:stylesheets}/{1}"/>
+ <map:transform src="testunits/{1}/{2}-test.xsl"/>
+ <map:transform src="{project:content.xdocs}/code/set_id.xsl">
+ <map:parameter name="id" value="{1} / {2}"/>
+ </map:transform>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ </map:pipeline>
+
+ </map:pipelines>
+
+</map:sitemap>
Added: forrest/trunk/whiteboard/tests/xsltunit/skinconf.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/skinconf.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/skinconf.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.6-2//EN" "http://forrest.apache.org/dtd/skinconfig-v06-2.dtd">
+<skinconfig>
+ <project-logo>images/project.png</project-logo>
+</skinconfig>
Added: forrest/trunk/whiteboard/tests/xsltunit/status.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/status.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/status.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<status>
+
+ <developers>
+ <person name="Juan Jose Pablos" email="cheche@apache.org" id="JJP" />
+ <person name="Need Help" email="dev@forrest.apache.org" id="open" />
+ <!-- Add more people here -->
+ </developers>
+
+ <changes>
+ <release version="0.1" date="unreleased">
+ <action dev="JJP" type="add" context="core">
+ Initial Import
+ </action>
+ </release>
+ </changes>
+
+ <todo>
+ <actions priority="medium">
+ <action context="docs" dev="open">
+ </action>
+ </actions>
+ -->
+ </todo>
+
+</status>
Added: forrest/trunk/whiteboard/tests/xsltunit/test2document.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/test2document.xsl?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/test2document.xsl Tue Dec 21 17:16:01 2004
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsltu="http://xstlunit.org/0">
+
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="name(child::node())='testsuite'">
+ <xsl:apply-templates/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <document>
+ <header><title>Error in conversion</title></header>
+ <body>
+ <warning>This file is not in testsuite format, please convert manually.</warning>
+ </body>
+ </document>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="testsuite">
+ <document>
+ <header>Test Suite</header>
+ <body>
+ <table>
+ <th>Test units</th>
+ <xsl:apply-templates />
+ </table>
+ </body>
+ </document>
+ </xsl:template>
+
+ <xsl:template match="node()">
+ <!-- FIXME: this should be xsltu:assert -->
+ <tr><td><xsl:value-of select="@id"/></td><td><xsl:value-of select="@outcome"/></td></tr>
+ </xsl:template>
+
+
+</xsl:stylesheet>
Added: forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-input.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-input.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-input.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+
+<rss>
+<channel>
+<title>prueba</title>
+</channel>
+</rss>
Added: forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-output.xml
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-output.xml?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-output.xml Tue Dec 21 17:16:01 2004
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<document>
+<header>
+<title>prueba</title>
+</header>
+<body></body>
+</document>
Added: forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-test.xsl
Url: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-test.xsl?view=auto&rev=123025
==============================================================================
--- (empty file)
+++ forrest/trunk/whiteboard/tests/xsltunit/testunits/rss2document.xsl/01-test.xsl Tue Dec 21 17:16:01 2004
@@ -0,0 +1,19 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsltu="http://xsltunit.org/0/"
+>
+
+ <xsl:import href="cocoon://code/xsltunit.xsl"/>
+
+ <xsl:strip-space elements="*"/>
+
+ <xsl:template match="/">
+ <xsl:call-template name="xsltu:assertEqual">
+ <xsl:with-param name="id" select="'Title for the channel'"/>
+ <xsl:with-param name="nodes1" select="."/>
+ <xsl:with-param name="nodes2" select="document('01-output.xml')"/>
+ </xsl:call-template>
+ </xsl:template>
+
+</xsl:stylesheet>