Initial impport of Butterfly git-svn-id: https://svn.apache.org/repos/asf/cocoon/branches/testdata@30863 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test1.xml b/test1.xml new file mode 100644 index 0000000..bf7d5fb --- /dev/null +++ b/test1.xml
@@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!-- A comment --> +<root attribute="1"> + <child id="X">Text</child> + Mixed content + <child id="Y"/> +</root> \ No newline at end of file
diff --git a/traxtest-input.xml b/traxtest-input.xml new file mode 100644 index 0000000..f0eb796 --- /dev/null +++ b/traxtest-input.xml
@@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<!-- + Copyright 1999-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. +--> +<hello-world> + <title>Title of the example</title> + <some-text>This is a litte test file!</some-text> + <some-text>And will transformed into a HTML page.</some-text> +</hello-world> +
diff --git a/traxtest-result.xml b/traxtest-result.xml new file mode 100644 index 0000000..02cc1ae --- /dev/null +++ b/traxtest-result.xml
@@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- + Copyright 1999-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. +--> +<page> + <tab title="Overview" href="welcome"/> + <row> + <column title="Title of the example"> + <p>This is a litte test file!</p> + <p>And will transformed into a HTML page.</p> + </column> + </row> +</page> +
diff --git a/traxtest-style.xsl b/traxtest-style.xsl new file mode 100644 index 0000000..01e9919 --- /dev/null +++ b/traxtest-style.xsl
@@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- + Copyright 1999-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"> + + <xsl:template match="hello-world"> + <page> + <tab title="Overview" href="welcome"/> + + <row> + <column title="{title}"> + <xsl:apply-templates select="some-text"/> + </column> + </row> + + </page> + </xsl:template> + + <xsl:template match="some-text"> + <p> + <xsl:apply-templates/> + </p> + </xsl:template> + +</xsl:stylesheet>