cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r230817 - in /cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities: ./ entity.xml explain-test.xml identity.xsl simple.xml sitemap.xmap
Date Mon, 08 Aug 2005 16:48:36 GMT
Author: sylvain
Date: Mon Aug  8 09:48:30 2005
New Revision: 230817

URL: http://svn.apache.org/viewcvs?rev=230817&view=rev
Log:
Test sample for some weird bugs related to entities and XML serializer

Added:
    cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/
    cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml  
(with props)
    cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml
  (with props)
    cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl
  (with props)
    cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml  
(with props)
    cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap
  (with props)

Added: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml?rev=230817&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml (added)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml Mon
Aug  8 09:48:30 2005
@@ -0,0 +1,3 @@
+<para>
+   text coming from the entity
+</para>
\ No newline at end of file

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/entity.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml?rev=230817&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml
Mon Aug  8 09:48:30 2005
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<!-- $Id$ -->
+
+<page>
+    <title>Serialized entities test</title>
+    <content>
+        <para>
+            Test how the XML serializer manages startEntity() and endEntity() SAX events.
The XML serializer
+            only ouputs the characters events received between these two events, and totally
ignores the
+            startElement() and endElement() events.
+            <ul>
+                <li>
+                  <link href="file-xml">Bogus result</link>: a pipeline with
just a file generator followed by
+                  an XML serializer. The file references and entity containing XML markup.
+                </li>
+                <li>
+                  <link href="file-xsl-xml">Correct result</link>: a XSL performing
an identity transformation
+                  is inserted between the generator and the serializer. It has the effect
of removing the
+                  startEntity() and endEntity() events from the SAX stream, and the XML serializer
therefore
+                  correcly does its job.
+                </li>
+            </ul>
+        </para>
+    </content>
+</page>
\ No newline at end of file

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/explain-test.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl?rev=230817&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl
Mon Aug  8 09:48:30 2005
@@ -0,0 +1,32 @@
+<?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.
+-->
+
+<!--
+  Identity transformation
+  $Id$
+ -->
+
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  >
+
+  <xsl:template match="/">
+    <xsl:copy-of select="."/>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/identity.xsl
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml?rev=230817&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml (added)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml Mon
Aug  8 09:48:30 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.
+-->
+
+<!-- $Id$ -->
+
+<!DOCTYPE content [
+<!ENTITY included SYSTEM "entity.xml">
+]>
+<page>
+    <title>Serialized entities test</title>
+    <content>
+        <para>
+           This is a simple XML file that references an entity that contains markup. There
should be an additional
+           "para" tag below with "text coming from the entity" inside.
+        </para>
+        &included;
+    </content>
+</page>
\ No newline at end of file

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/simple.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap?rev=230817&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap
Mon Aug  8 09:48:30 2005
@@ -0,0 +1,39 @@
+<?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.
+-->
+
+<!-- $Id$ -->
+
+<map:sitemap
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0" >
+  <map:pipelines>
+    
+    <map:pipeline>
+
+      <map:match pattern="file-xml">
+        <map:generate type="file" src="simple.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="file-xsl-xml">
+        <map:generate type="file" src="simple.xml"/>
+        <map:transform type="xslt" src="identity.xsl"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>
\ No newline at end of file

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/webapp/samples/test/serialized-entities/sitemap.xmap
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message