You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2006/05/28 06:33:08 UTC
svn commit: r409920 -
/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/
Author: antonio
Date: Sat May 27 21:33:08 2006
New Revision: 409920
URL: http://svn.apache.org/viewvc?rev=409920&view=rev
Log:
Add new testcase for nested <xi:include> in a <xi:fallback>.
Added:
cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml (with props)
cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-nestedXincludeFallbackTest.xml (with props)
Modified:
cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java
cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-incl.xml
cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml
Modified: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java?rev=409920&r1=409919&r2=409920&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/XIncludeTransformerTestCase.java Sat May 27 21:33:08 2006
@@ -96,9 +96,19 @@
*
* @throws Exception if ComponentManager enterEnvironment fails
*/
- public void testXIncludeFallbackTest() throws Exception {
- getLogger().debug("testXIncludeFallbackTest");
+ public void testXIncludeSimpleFallbackTest() throws Exception {
+ getLogger().debug("testXIncludeSimpleFallbackTest");
xincludeTest("resource://org/apache/cocoon/transformation/xinclude-input-fallbackTest.xml",
"resource://org/apache/cocoon/transformation/xinclude-result-fallbackTest.xml");
}
+
+ /** Testcase for xinclude with a nested xinclude elemento into the fallback
+ *
+ * @throws Exception if ComponentManager enterEnvironment fails
+ */
+ public void testXIncludeNestedXincludeElementInAFallbackTest() throws Exception {
+ getLogger().debug("testXIncludeNestedXincludeElementInAFallbackTest");
+ xincludeTest("resource://org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml",
+ "resource://org/apache/cocoon/transformation/xinclude-result-fallbackTest.xml");
+ }
}
Modified: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-incl.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-incl.xml?rev=409920&r1=409919&r2=409920&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-incl.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-incl.xml Sat May 27 21:33:08 2006
@@ -16,6 +16,7 @@
-->
<root-include>
+ <br/>
<p>include 1</p>
<p>include 2</p>
<p>include 3</p>
Added: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml?rev=409920&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml (added)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml Sat May 27 21:33:08 2006
@@ -0,0 +1,31 @@
+<?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.
+-->
+
+<root
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <p>P1</p>
+ <p>P2</p>
+
+ <xi:include href="this_file_does_not_exist.xml">
+ <xi:fallback>
+ <xi:include href="resource://org/apache/cocoon/transformation/xinclude-incl.xml"/>
+ </xi:fallback>
+ </xi:include>
+
+ <p>P3</p>
+ <p>P4</p>
+</root>
\ No newline at end of file
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-input-nestedXincludeFallbackTest.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml?rev=409920&r1=409919&r2=409920&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml Sat May 27 21:33:08 2006
@@ -21,6 +21,7 @@
<p>P2</p>
<root-include>
+ <br/>
<p>include 1</p>
<p>include 2</p>
<p>include 3</p>
Added: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-nestedXincludeFallbackTest.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-nestedXincludeFallbackTest.xml?rev=409920&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-nestedXincludeFallbackTest.xml (added)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-nestedXincludeFallbackTest.xml Sat May 27 21:33:08 2006
@@ -0,0 +1,33 @@
+<?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.
+-->
+
+<root
+ xmlns:xi="http://apache.org/cocoon/include/1.0">
+ <p>P1</p>
+ <p>P2</p>
+
+<root-include>
+ <br/>
+ <p>include 1</p>
+ <p>include 2</p>
+ <p>include 3</p>
+ <p>include 4</p>
+</root-include>
+
+ <p>P3</p>
+ <p>P4</p>
+</root>
Propchange: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/transformation/xinclude-result-nestedXincludeFallbackTest.xml
------------------------------------------------------------------------------
svn:eol-style = native