You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jh...@apache.org on 2005/11/03 15:00:48 UTC
svn commit: r330548 [80/132] - in
/cocoon/whiteboard/maven2/cocoon-flat-layout: ./ cocoon-ajax-block/
cocoon-ajax-block/api/ cocoon-ajax-block/api/src/
cocoon-ajax-block/api/src/main/ cocoon-ajax-block/api/src/main/java/
cocoon-ajax-block/api/src/main/...
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-2.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,11 @@
+<?xml version="1.0" ?>
+
+<root>
+ <x>X</x>
+ <a>A</a>
+ <a b="c">d</a>
+ <a href="x">x</a>
+ <img src="img/src must not be encoded"/>
+ <a href="href must be encoded"/>
+ <form action="action must be encoded"/>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-input-2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" ?>
+
+<root>
+ <x>X</x>
+ <a>A</a>
+ <a b="c">d</a>
+ <a href="x">x</a>
+</root>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-2.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,11 @@
+<?xml version="1.0" ?>
+
+<root>
+ <x>X</x>
+ <a>A</a>
+ <a b="c">d</a>
+ <a href="x?JSESSIONID=MockSession">x</a>
+ <img src="img/src must not be encoded"/>
+ <a href="href must be encoded?JSESSIONID=MockSession"/>
+ <form action="action must be encoded?JSESSIONID=MockSession"/>
+</root>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/encodeurl-result-2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-input.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-input.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-input.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-input.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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>
+ <leaf>1 Hi</leaf>
+ <leaf>2 Hello</leaf>
+ <leaf>3 Goodbye</leaf>
+ <leaf>4 So long</leaf>
+</root>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-input.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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>
+ <block id="1">
+ <leaf>1 Hi</leaf>
+ </block>
+ <block id="2"/>
+ <block id="3"/>
+ <block id="4"/>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-3.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-3.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-3.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-3.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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>
+ <block id="1"/>
+ <block id="2"/>
+ <block id="3">
+ <leaf>3 Goodbye</leaf>
+ </block>
+ <block id="4"/>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-1-3.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-3-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-3-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-3-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-3-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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>
+ <block id="1">
+ <leaf>1 Hi</leaf>
+ <leaf>2 Hello</leaf>
+ <leaf>3 Goodbye</leaf>
+ </block>
+ <block id="2"/>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/filter-result-3-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,30 @@
+<?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:i18n="http://apache.org/cocoon/i18n/2.1">
+>
+ <title><i18n:text>titletext</i18n:text></title>
+
+ <p>
+ <i18n:text key="a_key">article_text1</i18n:text>
+ </p>
+ <p>
+ <i18n:text key="a_key_which_does_not_exist">article_text2</i18n:text>
+ </p>
+
+</root>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-2.xml Thu Nov 3 05:41:06 2005
@@ -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:i18n="http://apache.org/cocoon/i18n/2.1">
+>
+ <title><i18n:text>titletext</i18n:text></title>
+
+ <p>
+ <i18n:text key="a_key">article_text1</i18n:text>
+ </p>
+ <p>
+ <i18n:text key="a_key_which_does_not_exist">article_text2</i18n:text>
+ </p>
+ <p>
+ <i18n:text i18n:catalogue="menu">Documentation</i18n:text>
+ </p>
+
+</root>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-input-2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-menu.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-menu.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-menu.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-menu.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<!--+
+ | Default (English) message catalogue file for menu in Cocoon 2 i18n sample
+ |
+ | CVS $Id: i18n-menu.xml 30942 2004-07-29 20:16:54Z vgritsenko $
+ +-->
+
+<catalogue xml:lang="en">
+ <message key="Documentation">Documentation For I18NTransformerTestCase</message>
+</catalogue>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-menu.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-messages.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-messages.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-messages.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-messages.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<!--+
+ | Default (English) message catalogue file for Cocoon 2 i18n sample
+ |
+ | CVS $Id: i18n-messages.xml 30942 2004-07-29 20:16:54Z vgritsenko $
+ +-->
+
+<catalogue xml:lang="en">
+ <message key="a_key">This is a key value.</message>
+ <message key="language">English</message>
+ <message key="titletext">Hello, internationalization!</message>
+</catalogue>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-messages.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,30 @@
+<?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:i18n="http://apache.org/cocoon/i18n/2.1">
+>
+ <title>Hello, internationalization!</title>
+
+ <p>
+ This is a key value.
+ </p>
+ <p>
+ article_text2
+ </p>
+
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-2.xml Thu Nov 3 05:41:06 2005
@@ -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:i18n="http://apache.org/cocoon/i18n/2.1">
+>
+ <title>Hello, internationalization!</title>
+
+ <p>
+ This is a key value.
+ </p>
+ <p>
+ article_text2
+ </p>
+ <p>
+ Documentation For I18NTransformerTestCase
+ </p>
+
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/i18n-result-2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-input.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-input.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-input.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-input.xml Thu Nov 3 05:41:06 2005
@@ -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>
+
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-input.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-result.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-result.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-result.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-result.xml Thu Nov 3 05:41:06 2005
@@ -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>
+
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-result.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-style.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-style.xsl?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-style.xsl (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-style.xsl Thu Nov 3 05:41:06 2005
@@ -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>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/traxtest-style.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-include.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-include.xsl?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-include.xsl (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-include.xsl Thu Nov 3 05:41:06 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:param name="file"/>
+
+ <xsl:template match="/test">
+ <test>
+ <xsl:copy-of select="*"/>
+ <xsl:copy-of select="document($file)"/>
+ </test>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-include.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-sitemap.xmap Thu Nov 3 05:41:06 2005
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<!-- SVN $Id$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:components>
+ <map:generators default="file">
+ <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+ </map:generators>
+
+ <map:transformers default="xslt">
+ <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
+ <xslt-processor-role>xalan</xslt-processor-role>
+ </map:transformer>
+ <map:transformer name="virtual1" src="org.apache.cocoon.transformation.VirtualPipelineTransformer">
+ <map:transform src="vpc-transform.xsl"/>
+ </map:transformer>
+ <map:transformer name="virtual2" src="org.apache.cocoon.transformation.VirtualPipelineTransformer">
+ <map:source param="src2"/>
+ <map:transform src="vpc-include.xsl">
+ <map:parameter name="file" value="{src}"/>
+ </map:transform>
+ <map:transform src="vpc-include.xsl">
+ <map:parameter name="file" value="{src2}"/>
+ </map:transform>
+ </map:transformer>
+ </map:transformers>
+
+ <map:serializers default="xml">
+ <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+ </map:serializers>
+
+ <map:matchers default="wildcard">
+ <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+ </map:matchers>
+
+ <map:pipes default="noncaching">
+ <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+ </map:pipe>
+ </map:pipes>
+ </map:components>
+
+ <map:pipelines>
+ <map:pipeline>
+
+ <map:match pattern="v1">
+ <map:generate src="vpc-test.xml"/>
+ <map:transform type="virtual1"/>
+ <map:serialize/>
+ </map:match>
+
+ <map:match pattern="v2">
+ <map:generate src="vpc-test.xml"/>
+ <map:transform type="virtual2" src="vpc-test.xml">
+ <map:parameter name="src2" value="vpc-test2.xml"/>
+ </map:transform>
+ <map:serialize/>
+ </map:match>
+
+ </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-sitemap.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test/>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test2.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test2/>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-test2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-transform.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-transform.xsl?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-transform.xsl (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-transform.xsl Thu Nov 3 05:41:06 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="/test">
+ <test/>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-transform.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-v2-expected.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-v2-expected.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-v2-expected.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-v2-expected.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><test><test/><test2/></test>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/vpc-v2-expected.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.txt
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.txt?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.txt (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.txt Thu Nov 3 05:41:06 2005
@@ -0,0 +1 @@
+Only some text getting included.
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,23 @@
+<?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-include>
+ <p>include 1</p>
+ <p>include 2</p>
+ <p>include 3</p>
+ <p>include 4</p>
+</root-include>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-incl.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,28 @@
+<?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="resource://org/apache/cocoon/transformation/xinclude-incl.xml"
+/>
+
+ <p>P3</p>
+ <p>P4</p>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-2.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,29 @@
+<?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>
+<p>
+<xi:include parse="text" href="resource://org/apache/cocoon/transformation/xinclude-incl.txt"
+/>
+</p>
+
+ <p>P3</p>
+ <p>P4</p>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-input-2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-1.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-1.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-1.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-1.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,32 @@
+<?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>
+ <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>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-2.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-2.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-2.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-2.xml Thu Nov 3 05:41:06 2005
@@ -0,0 +1,29 @@
+<?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>
+
+<p>
+Only some text getting included.
+</p>
+
+ <p>P3</p>
+ <p>P4</p>
+</root>
\ No newline at end of file
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/transformation/xinclude-result-2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/location/LocationTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/location/LocationTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/location/LocationTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/location/LocationTestCase.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.cocoon.util.location;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import junit.framework.TestCase;
+
+public class LocationTestCase extends TestCase {
+
+ public LocationTestCase(String name) {
+ super(name);
+ }
+
+ static final String str = "path/to/file.xml:1:40";
+
+ public void testParse() throws Exception {
+ String str = "<map:generate> - path/to/file.xml:1:40";
+ Location loc = LocationUtils.getLocation(str);
+
+ assertEquals("<map:generate>", loc.getDescription());
+ assertEquals("URI", "path/to/file.xml", loc.getURI());
+ assertEquals("line", 1, loc.getLineNumber());
+ assertEquals("column", 40, loc.getColumnNumber());
+ assertEquals("string representation", str, loc.toString());
+ }
+
+ public void testEquals() throws Exception {
+ Location loc1 = LocationUtils.getLocation(str);
+ Location loc2 = new LocationImpl(null, "path/to/file.xml", 1, 40);
+
+ assertEquals("locations", loc1, loc2);
+ assertEquals("hashcode", loc1.hashCode(), loc2.hashCode());
+ assertEquals("string representation", loc1.toString(), loc2.toString());
+ }
+
+ /**
+ * Test that Location.UNKNOWN is kept identical on deserialization
+ */
+ public void testSerializeUnknown() throws Exception {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(bos);
+
+ oos.writeObject(Location.UNKNOWN);
+ oos.close();
+ bos.close();
+
+ ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
+ ObjectInputStream ois = new ObjectInputStream(bis);
+
+ Object obj = ois.readObject();
+
+ assertSame("unknown location", Location.UNKNOWN, obj);
+ }
+}
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/location/LocationTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/IOUtilsTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/IOUtilsTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/IOUtilsTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/IOUtilsTestCase.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.util.test;
+
+import java.io.File;
+import junit.framework.TestCase;
+import org.apache.cocoon.util.IOUtils;
+
+/**
+ * Test Cases for the IOUtils Class.
+ * @see org.apache.cocoon.util.IOUtils
+ *
+ * @author <a href="mailto:stuart.roebuck@adolos.com">Stuart Roebuck</a>
+ * @author <a href="mailto:berni_huber@a1.net">Bernhard Huber</a>
+ * @version CVS $Id: IOUtilsTestCase.java 30941 2004-07-29 19:56:58Z vgritsenko $
+ */
+public class IOUtilsTestCase extends TestCase
+{
+
+ /**
+ *Constructor for the IOUtilsTestCase object
+ *
+ * @param name Description of Parameter
+ * @since
+ */
+ public IOUtilsTestCase(String name) {
+ super(name);
+ }
+
+
+ /**
+ *Description of the Method
+ *
+ * @param args Description of Parameter
+ * @since
+ */
+ public static void main(String args[]) {
+ junit.textui.TestRunner.run(IOUtilsTestCase.class);
+ }
+
+
+ /**
+ * A unit test for <code>normalizedFilename()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testNormalizedFilename() throws Exception {
+ Object[] test_values = {
+ new String[]{".", "__"},
+ new String[]{"", ""},
+ new String[]{"file://", "file_"},
+ // was new String[]{"file://", "file_" + File.separator + "_" + File.separator + "_"},
+ new String[]{"/a/b/c", "a" + File.separator + "b" + File.separator + "c"},
+ new String[]{"\\a\\b\\c", "a" + File.separator + "b" + File.separator + "c"},
+ new String[]{"a/b/c", "a" + File.separator + "b" + File.separator + "c"},
+ new String[]{"a\\b\\c", "a" + File.separator + "b" + File.separator + "c"},
+
+ new String[]{"a/b/../c", "a" + File.separator + "c"},
+ new String[]{"public/final.xml", "public_" + File.separator + "final_xml"},
+ new String[]{"123", "_123"}
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test = tests[0];
+ String expected = tests[1];
+
+ String result = IOUtils.normalizedFilename(test);
+ String message = "Test " + "'" + test + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>getContextFilePath()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testGetContextFilePath() throws Exception {
+ Object[] test_values = {
+ new String[]{"a", "a" + File.separator + "b", "b"},
+ new String[]{"a\\b", "a\\b" + File.separator + "c/d", "c" + File.separator + "d"},
+ new String[]{"a/b", "a/b" + File.separator + "c\\d", "c" + File.separator + "d"},
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test_directory_path = tests[0];
+ String test_file_path = tests[1];
+ String expected = tests[2];
+
+ String result = IOUtils.getContextFilePath(test_directory_path, test_file_path);
+ String message = "Test " + "'" + test_directory_path + "'" + ", " +
+ "'" + test_file_path + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+}
+
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/IOUtilsTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/MIMEUtilsTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/MIMEUtilsTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/MIMEUtilsTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/MIMEUtilsTestCase.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.util.test;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.io.StringReader;
+import junit.framework.TestCase;
+
+import org.apache.cocoon.util.MIMEUtils;
+import org.apache.commons.lang.SystemUtils;
+
+/**
+ * Test Cases for the MIMEUtils class.
+ * @see org.apache.cocoon.util.MIMEUtils
+ * Specifically, code for testing the parsing of mime.types files.
+ *
+ * @author <a href="mailto:jefft@apache.org">Jeff Turner</a>
+ * @version CVS $Id: MIMEUtilsTestCase.java 165517 2005-05-01 15:39:38Z antonio $
+ */
+public class MIMEUtilsTestCase extends TestCase
+{
+ final String NL = SystemUtils.LINE_SEPARATOR;
+ Map mimeMap;
+ Map extMap;
+ static final String M2E = "MIME to extension mappings";
+ static final String E2M = "Extension to MIME mappings";
+
+ public MIMEUtilsTestCase(String name) {
+ super(name);
+ }
+
+ public static void main(String args[]) {
+ junit.textui.TestRunner.run(MIMEUtilsTestCase.class);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ mimeMap = new HashMap();
+ extMap = new HashMap();
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ mimeMap = null;
+ extMap = null;
+ }
+
+ public void tstGetMimeType() {
+ assertEquals(E2M, "text/plain", MIMEUtils.getMIMEType(".txt"));
+ assertEquals(E2M, "image/jpeg", MIMEUtils.getMIMEType(".jpg"));
+ assertEquals(E2M, "video/mpeg", MIMEUtils.getMIMEType(".mpg"));
+ assertEquals(E2M, null, MIMEUtils.getMIMEType(".undefined"));
+ assertEquals(M2E, ".txt", MIMEUtils.getDefaultExtension("text/plain"));
+ assertEquals(M2E, ".jpeg", MIMEUtils.getDefaultExtension("image/jpeg"));
+ assertEquals(M2E, ".mpeg", MIMEUtils.getDefaultExtension("video/mpeg"));
+ assertEquals(M2E, null, MIMEUtils.getDefaultExtension("application/octet-stream"));
+
+ }
+
+ public void testTypicalUsage() throws Exception {
+ String mime_types="# MIME type mappings"+ NL +
+ "text/plain txt text "+ NL +
+ "text/html html htm"+ NL +
+ " "+ NL +
+ "text/xml xml"+ NL +
+ "text/css css"+ NL +
+ "text/javascript js "+ NL +
+ "application/x-javascript js";
+
+ MIMEUtils.loadMimeTypes(new StringReader(mime_types), extMap, mimeMap);
+ assertEquals(".txt", extMap.get("text/plain"));
+ assertEquals(".html", extMap.get("text/html"));
+ assertEquals(".xml", extMap.get("text/xml"));
+ assertEquals(".css", extMap.get("text/css"));
+ assertEquals(".js", extMap.get("text/javascript"));
+ assertEquals(".js", extMap.get("application/x-javascript"));
+
+ assertEquals("text/plain", mimeMap.get(".text"));
+ assertEquals("text/plain", mimeMap.get(".txt"));
+ assertEquals("text/html", mimeMap.get(".html"));
+ assertEquals("text/html", mimeMap.get(".htm"));
+ assertEquals("text/xml", mimeMap.get(".xml"));
+ assertEquals("text/css", mimeMap.get(".css"));
+ assertEquals("text/javascript", mimeMap.get(".js"));
+
+ assertEquals(M2E, 6, extMap.size());
+ assertEquals(E2M, 7, mimeMap.size());
+ }
+
+ public void tstEmpty() throws Exception {
+ String mime_types="";
+ MIMEUtils.loadMimeTypes(new StringReader(mime_types), extMap, mimeMap);
+ assertEquals(M2E, 0, extMap.size());
+ assertEquals(E2M, 0, mimeMap.size());
+ }
+
+ public void tstCommentsAndWhitespace() throws Exception {
+ String mime_types="## A commented line"+NL+
+ " "+ NL +
+ "# Another comment";
+ MIMEUtils.loadMimeTypes(new StringReader(mime_types), extMap, mimeMap);
+ assertEquals(M2E, 0, extMap.size());
+ assertEquals(E2M, 0, mimeMap.size());
+ }
+
+ public void tstMimeTypeWithoutExtension() throws Exception {
+ String mime_types=
+ "text/plain txt text"+ NL +
+ "application/octet-stream"+ NL + NL;
+ MIMEUtils.loadMimeTypes(new StringReader(mime_types), extMap, mimeMap);
+ assertEquals(".txt", extMap.get("text/plain"));
+ assertEquals("text/plain", mimeMap.get(".txt"));
+ assertEquals("text/plain", mimeMap.get(".text"));
+ assertEquals(M2E, 1, extMap.size());
+ assertEquals(E2M, 2, mimeMap.size());
+ }
+}
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/MIMEUtilsTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/NetUtilsTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/NetUtilsTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/NetUtilsTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/NetUtilsTestCase.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,309 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.util.test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.cocoon.util.NetUtils;
+
+/**
+ * Test Cases for the NetUtils class.
+ * @see org.apache.cocoon.util.NetUtils
+ *
+ * @author <a href="mailto:berni_huber@a1.net">Bernhard Huber</a>
+ * @author <a href="mailto:nicolaken@apache.org">Nicola Ken Barozzi</a>
+ * @version CVS $Id: NetUtilsTestCase.java 30941 2004-07-29 19:56:58Z vgritsenko $
+ */
+public class NetUtilsTestCase extends TestCase
+{
+
+ /**
+ *Constructor for the IOUtilsTestCase object
+ *
+ * @param name Description of Parameter
+ * @since
+ */
+ public NetUtilsTestCase(String name) {
+ super(name);
+ }
+
+
+ /**
+ *Description of the Method
+ *
+ * @param args Description of Parameter
+ * @since
+ */
+ public static void main(String args[]) {
+ junit.textui.TestRunner.run(NetUtilsTestCase.class);
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.getPath()</code>.
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testGetPath() throws Exception {
+ Object[] test_values = {
+ new String[]{"", ""},
+ new String[]{"/", ""},
+ new String[]{"/foo.bar", ""},
+ new String[]{"foo/bar", "foo"},
+ new String[]{"/foo/bar", "/foo"}
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test = tests[0];
+ String expected = tests[1];
+
+ String result = NetUtils.getPath(test);
+ String message = "Test " + "'" + test + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.getExtension()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testGetExtension() throws Exception {
+ Object[] test_values = {
+ new String[]{"/foo.bar", ".bar"},
+ new String[]{"foo.bar#a", ".bar"},
+ new String[]{"foo.bar?b=c", ".bar"},
+ new String[]{"foo.bar#a?b=c", ".bar"},
+ new String[]{"foo.bar", ".bar"},
+ new String[]{"foo/bar", null},
+ new String[]{"/x.html", ".html"},
+ new String[]{"/foo.bar.org/x.y.z.html", ".html"}
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test = tests[0];
+ String expected = tests[1];
+
+ String result = NetUtils.getExtension(test);
+ String message = "Test " + "'" + test + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.absolutize()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testAbsolutize() throws Exception {
+
+ Object[] test_values = {
+ new String[]{"/base/path", "foo.bar", "/base/path/foo.bar"},
+ new String[]{"/base/path/", "foo.bar", "/base/path/foo.bar"},
+ new String[]{"/base/path", "/foo.bar", "/foo.bar"},
+
+ new String[]{"/base/path", "", "/base/path"},
+ new String[]{"/base/path", null, "/base/path"},
+
+ new String[]{"", "foo.bar", "foo.bar"},
+ new String[]{null, "foo.bar", "foo.bar"},
+ };
+
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test_path = tests[0];
+ String test_rel_resource = tests[1];
+ String expected = tests[2];
+
+ String result = NetUtils.absolutize(test_path, test_rel_resource);
+ String message = "Test " +
+ " path " + "'" + test_path + "'" +
+ " relativeResource " + "'" + test_rel_resource;
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.testEncodePath()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testEncodePath() throws Exception {
+
+ Object[] test_values = {
+ new String[]{"abc def", "abc%20def"},
+ new String[]{"foo/bar?n=v&N=V", "foo/bar%3Fn=v&N=V"}
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String original = tests[0];
+ String expected = tests[1];
+
+ String result = NetUtils.encodePath(original);
+ String message = "Test " +
+ " original " + "'" + original + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.relativize()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testRelativize() throws Exception {
+
+ Object[] test_values = {
+ new String[]{"/xml.apache.org", "/xml.apache.org/foo.bar", "foo.bar"},
+ new String[]{"/xml.apache.org", "/xml.apache.org/foo.bar", "foo.bar"},
+ new String[]{"/xml.apache.org", "/xml.apache.org/foo.bar", "foo.bar"},
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test_path = tests[0];
+ String test_abs_resource = tests[1];
+ String expected = tests[2];
+
+ String result = NetUtils.relativize(test_path, test_abs_resource);
+ String message = "Test " +
+ " path " + "'" + test_path + "'" +
+ " absoluteResource " + "'" + test_abs_resource;
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for {@link NetUtils#normalize(String)}
+ */
+ public void testNormalize() throws Exception {
+ Object[] test_values = {
+ new String[]{"", ""},
+ new String[]{"/", "/"},
+ new String[]{"/../", "/../"},
+ new String[]{"/../../", "/../../"},
+ new String[]{"/../../foo", "/../../foo"},
+ new String[]{"/../../foo//./../bar", "/../../bar"},
+ new String[]{"//foo//bar", "//foo/bar"},
+ new String[]{"//foo//./bar", "//foo/bar"},
+ new String[]{"/foo/bar", "/foo/bar"},
+ new String[]{"/foo/bar/", "/foo/bar/"},
+ new String[]{"/foo/../bar", "/bar"},
+ new String[]{"/foo/../bar/", "/bar/"},
+ new String[]{"bar", "bar"},
+ new String[]{"foo/../bar", "bar"},
+ new String[]{"foo/./bar", "foo/bar"},
+ new String[]{"foo/bar1/bar2/bar3/../../..", "foo/"},
+ };
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test = tests[0];
+ String expected = tests[1];
+ // alternative for JDK 1.4
+ //String expected = new java.net.URI(test).normalize().toString();
+
+ String result = NetUtils.normalize(test);
+ String message = "Test " + "'" + test + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.deparameterize()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testDeparameterize() throws Exception {
+ Map parameters = new HashMap();
+
+ Object[] test_values = {
+ new String[]{"/foo/bar", "/foo/bar"},
+ new String[]{"bar?a=b&c=d", "bar"},
+ };
+
+ for (int i = 0; i < test_values.length; i++) {
+ String tests[] = (String[]) test_values[i];
+ String test = tests[0];
+ String expected = tests[1];
+
+ parameters.clear();
+ String result = NetUtils.deparameterize(test, parameters);
+ if (test.indexOf('?') > -1) {
+ assertTrue(parameters.size() > 0);
+ }
+ String message = "Test " + "'" + test + "'";
+ assertEquals(message, expected, result);
+ }
+ }
+
+
+ /**
+ * A unit test for <code>NetUtils.parameterize()</code>
+ *
+ * @exception Exception Description of Exception
+ * @since
+ */
+ public void testParameterize() throws Exception {
+ Map parameters1 = new HashMap();
+
+ Object[] test_values = {
+ new Object[]{"/foo/bar", parameters1, "/foo/bar"},
+ };
+
+ for (int i = 0; i < test_values.length; i++) {
+ Object tests[] = (Object[]) test_values[i];
+ String test = (String) tests[0];
+ Map parameters = (Map) tests[1];
+ String expected = (String) tests[2];
+
+ String result = NetUtils.parameterize(test, parameters);
+ String message = "Test " + "'" + test + "'";
+ assertEquals(message, expected, result);
+ }
+
+ Map parameters2 = new HashMap();
+ parameters2.put("a", "b");
+ parameters2.put("c", "d");
+
+ String test = "bar";
+ String expected1 = "bar?a=b&c=d";
+ String expected2 = "bar?c=d&a=b";
+
+ String message = "Test " + "'" + test + "'";
+
+ String result = NetUtils.parameterize(test, parameters2);
+
+ if (expected1.equals(result)) {
+ assertEquals(message, expected1, result);
+ } else {
+ assertEquals(message, expected2, result);
+ }
+ }
+}
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/util/test/NetUtilsTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/AbstractXMLTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/AbstractXMLTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/AbstractXMLTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/AbstractXMLTestCase.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.xml;
+
+import org.custommonkey.xmlunit.XMLTestCase;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+import org.apache.cocoon.xml.dom.DOMBuilder;
+
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.Source;
+import javax.xml.transform.Result;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.dom.DOMSource;
+import java.io.ByteArrayOutputStream;
+
+
+/**
+ * general functions for XML related Testcases
+ *
+ * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
+ * @version
+ */
+
+public abstract class AbstractXMLTestCase extends XMLTestCase {
+
+ public AbstractXMLTestCase(String s) {
+ super(s);
+ }
+
+ protected void generateLargeSAX( ContentHandler consumer ) throws SAXException {
+ AttributesImpl atts = new AttributesImpl();
+
+ final int size = 65000;
+ char[] large = new char[size];
+ for(int i=0;i<size;i++) {
+ large[i] = 'x';
+ }
+
+ consumer.startDocument();
+ consumer.startElement("", "root", "root", atts);
+ consumer.characters(large,0,size);
+ consumer.endElement("", "root", "root");
+ consumer.endDocument();
+ }
+
+ protected void generateSmallSAX( ContentHandler consumer ) throws SAXException {
+ AttributesImpl atts = new AttributesImpl();
+
+ consumer.startDocument();
+ consumer.startElement("", "root", "root", atts);
+ consumer.characters("test".toCharArray(),0,4);
+ consumer.endElement("", "root", "root");
+ consumer.endDocument();
+ }
+
+ protected byte[] generateByteArray() throws Exception {
+ DOMBuilder in = new DOMBuilder();
+ generateSmallSAX(in);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ TransformerFactory tFactory = TransformerFactory.newInstance();
+ Transformer t = tFactory.newTransformer();
+ Source input = new DOMSource(in.getDocument());
+ Result output = new StreamResult(bos);
+ t.transform(input, output);
+ bos.close();
+
+ return bos.toByteArray();
+ }
+}
+
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/AbstractXMLTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/DefaultHandlerWrapper.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/DefaultHandlerWrapper.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/DefaultHandlerWrapper.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/DefaultHandlerWrapper.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.xml;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Wrap a ContentHandler in a DefaultHandler
+ *
+ * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
+ */
+
+
+public final class DefaultHandlerWrapper extends DefaultHandler {
+ private final ContentHandler handler;
+
+ public DefaultHandlerWrapper( ContentHandler handler ) {
+ this.handler = handler;
+ }
+
+ public void setDocumentLocator(Locator locator) {
+ handler.setDocumentLocator(locator);
+ }
+
+ public void startDocument() throws SAXException {
+ handler.startDocument();
+ }
+
+ public void endDocument() throws SAXException {
+ handler.endDocument();
+ }
+
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ handler.startPrefixMapping(prefix,uri);
+ }
+
+ public void endPrefixMapping(String prefix) throws SAXException {
+ handler.endPrefixMapping(prefix);
+ }
+
+ public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+ handler.startElement(namespaceURI,localName,qName,atts);
+ }
+
+ public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
+ handler.endElement(namespaceURI,localName,qName);
+ }
+
+ public void characters(char ch[], int start, int length) throws SAXException {
+ handler.characters(ch,start,length);
+ }
+
+ public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
+ handler.ignorableWhitespace(ch,start, length);
+ }
+
+ public void processingInstruction(String target, String data) throws SAXException {
+ handler.processingInstruction(target,data);
+ }
+
+ public void skippedEntity(String name) throws SAXException {
+ handler.skippedEntity(name);
+ }
+
+
+}
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/DefaultHandlerWrapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/NamespacesTableTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/NamespacesTableTestCase.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/NamespacesTableTestCase.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/NamespacesTableTestCase.java Thu Nov 3 05:41:06 2005
@@ -0,0 +1,194 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.xml;
+
+import junit.framework.TestCase;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Test case for NamespacesTable
+ *
+ * @version $Id: NamespacesTableTestCase.java 240198 2005-08-26 10:06:01Z cziegeler $
+ */
+public class NamespacesTableTestCase extends TestCase {
+ public NamespacesTableTestCase(String name) {
+ super(name);
+ }
+
+ public void testSimple() {
+ NamespacesTable ns = new NamespacesTable();
+
+ ns.addDeclaration("ns1", "http://ns1");
+ ns.addDeclaration("ns2", "http://ns2");
+
+ ns.enterScope();
+
+ assertEquals("http://ns1", ns.getUri("ns1"));
+ assertEquals("ns1", ns.getPrefix("http://ns1"));
+
+ assertEquals("http://ns2", ns.getUri("ns2"));
+ assertEquals("ns2", ns.getPrefix("http://ns2"));
+
+ ns.enterScope();
+
+ ns.addDeclaration("ns3", "http://ns3");
+ ns.enterScope();
+
+ assertEquals("ns1", ns.getPrefix("http://ns1"));
+ assertEquals("ns3", ns.getPrefix("http://ns3"));
+ assertEquals(0, ns.getCurrentScopeDeclarations().length);
+ ns.leaveScope();
+
+ // Declarations in this scope are no more visible...
+ assertNull(ns.getUri("ns3"));
+ // ... but still listed in the declared mappings
+ assertEquals(1, ns.getCurrentScopeDeclarations().length);
+ assertEquals("ns3", ns.getCurrentScopeDeclarations()[0].getPrefix());
+
+ ns.leaveScope();
+
+ assertNull(ns.getPrefix(ns.getPrefix("http://ns3")));
+ assertNull(ns.getUri("ns3"));
+
+ ns.leaveScope();
+ // Declarations that occured before this scope are no more visible...
+ assertNull(ns.getUri("ns1"));
+ assertNull(ns.getPrefix("http://ns1"));
+
+ assertNull(ns.getUri("ns2"));
+ assertNull(ns.getPrefix("http://ns2"));
+
+ //... but are still available in getDeclaredPrefixes
+ NamespacesTable.Declaration[] prefixes = ns.getCurrentScopeDeclarations();
+ assertEquals(2, prefixes.length);
+
+ assertEquals("ns2", prefixes[0].getPrefix());
+ assertEquals("http://ns2", prefixes[0].getUri());
+ assertEquals("ns1", prefixes[1].getPrefix());
+ assertEquals("http://ns1", prefixes[1].getUri());
+
+ }
+
+ public void testOverride() {
+ NamespacesTable ns = new NamespacesTable();
+
+ ns.addDeclaration("ns1", "http://ns1");
+ ns.enterScope();
+ ns.addDeclaration("ns1", "http://otherns1");
+ ns.enterScope();
+ ns.addDeclaration("ns1", "http://yetanotherns1");
+ ns.enterScope();
+
+ assertEquals("http://yetanotherns1", ns.getUri("ns1"));
+ assertEquals(0, ns.getPrefixes("http://ns1").length);
+
+ ns.leaveScope();
+ ns.leaveScope();
+
+ assertEquals("http://ns1", ns.getUri("ns1"));
+ assertEquals(1, ns.getPrefixes("http://ns1").length);
+
+ ns.leaveScope();
+ assertNull(ns.getUri("ns1"));
+ }
+
+ public void testMultiDeclaration() {
+ NamespacesTable ns = new NamespacesTable();
+ ns.addDeclaration("ns1", "http://ns1");
+ ns.enterScope();
+ // two in the same scope
+ ns.addDeclaration("ns2", "http://ns1");
+ ns.addDeclaration("ns3", "http://ns1");
+ ns.enterScope();
+
+ String[] prefixes = ns.getPrefixes("http://ns1");
+ assertEquals(3, prefixes.length);
+ assertEquals("ns3", prefixes[0]);
+ assertEquals("ns2", prefixes[1]);
+ assertEquals("ns1", prefixes[2]);
+ }
+
+ public void testStreamDeclarations() throws Exception {
+ NamespacesTable ns = new NamespacesTable();
+ ns.addDeclaration("ns1", "http://ns1");
+ ns.enterScope();
+ ns.addDeclaration("ns2", "http://ns2");
+ ns.enterScope(new DefaultHandler() {
+ public void startPrefixMapping(String prefix, String uri) throws org.xml.sax.SAXException {
+ assertEquals("ns2", prefix);
+ assertEquals("http://ns2", uri);
+ }
+ });
+
+ // Enter and leave a nested scope
+ ns.addDeclaration("ns3", "http://ns3");
+ ns.enterScope();
+ ns.leaveScope();
+
+ ns.leaveScope(new DefaultHandler() {
+ public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException {
+ assertEquals("ns2", prefix);
+ }
+ });
+ }
+
+ /**
+ * A scenario that occurs in with jx:import where some prefixes are started but not used.
+ * @throws Exception
+ */
+ public void testJXImport() throws Exception {
+ NamespacesTable ns = new NamespacesTable();
+ ContentHandler handler = new DefaultHandler();
+
+ ns.addDeclaration("ft", "http://apache.org/cocoon/forms/1.0#template");
+ ns.addDeclaration("fi", "http://apache.org/cocoon/forms/1.0#instance");
+ ns.addDeclaration("jx", "http://apache.org/cocoon/templates/jx/1.0");
+ ns.enterScope(handler);
+ assertEquals("ft", ns.getPrefix("http://apache.org/cocoon/forms/1.0#template"));
+ assertEquals("fi", ns.getPrefix("http://apache.org/cocoon/forms/1.0#instance"));
+ assertEquals("jx", ns.getPrefix("http://apache.org/cocoon/templates/jx/1.0"));
+
+ // Add declarations that won't be used
+ ns.addDeclaration("jx", "http://apache.org/cocoon/templates/jx/1.0");
+ ns.addDeclaration("fi", "http://apache.org/cocoon/forms/1.0#instance");
+ ns.addDeclaration("bu", "http://apache.org/cocoon/browser-update/1.0");
+
+ ns.leaveScope(handler);
+ assertNull(ns.getPrefix("http://apache.org/cocoon/forms/1.0#template"));
+ assertNull(ns.getPrefix("http://apache.org/cocoon/forms/1.0#instance"));
+ assertNull(ns.getPrefix("http://apache.org/cocoon/templates/jx/1.0"));
+ assertEquals(3, ns.getCurrentScopeDeclarations().length);
+
+ }
+
+ public void testDuplicate() throws Exception {
+ NamespacesTable ns = new NamespacesTable();
+
+ ns.addDeclaration("ns1", "http://ns1");
+ ns.enterScope();
+ ns.addDeclaration("ns1", "http://ns1");
+ ns.enterScope();
+ ns.leaveScope();
+ ns.removeDeclaration("ns1");
+ assertEquals("http://ns1", ns.getUri("ns1"));
+ ns.leaveScope();
+ ns.removeDeclaration("ns1");
+ assertNull(ns.getUri("ns1"));
+ }
+
+}
Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-core/src/test/java/org/apache/cocoon/xml/NamespacesTableTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native