Thorsten Scherler created COCOON3-123:
-----------------------------------------

             Summary: schema validation error with namespaces provoke a double 
declaration of <?xml
                 Key: COCOON3-123
                 URL: https://issues.apache.org/jira/browse/COCOON3-123
             Project: Cocoon 3
          Issue Type: Bug
          Components: cocoon-sax, cocoon-sitemap
    Affects Versions: 3.0.0-beta-1
            Reporter: Thorsten Scherler
            Priority: Critical
             Fix For: 3.1.0


thorsten@bulldozer:~/src/apache/c3$ svnd
Index: cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xsd
===================================================================
--- cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xsd    
(revision 1455575)
+++ cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xsd    
(working copy)
@@ -18,4 +18,6 @@
 <!-- $Id$ -->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
     <xs:element name="simple"/>
-</xs:schema>
+    <xs:attribute type="xs:int" name="id" />
+    <xs:attribute type="xs:int" name="sum" />
+</xs:schema>
\ No newline at end of file
Index: cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
===================================================================
--- cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml    
(revision 1455575)
+++ cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml    
(working copy)
@@ -15,4 +15,4 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<simple>simple-text</simple>
+<simple xmlns:x="http://www.w3.org/1999/xhtml"; id="d">simple-text</simple>

If you request http://localhost:8888/sax-pipeline/simple-xsd you will get:

<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?>

If you do 
Index: cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
===================================================================
--- cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml    
(revision 1455575)
+++ cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml    
(working copy)
@@ -15,4 +15,4 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<simple>simple-text</simple>
+<simple id="b">simple-text</simple>

you only get one xml declaration

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to