Uploaded image for project: 'Cocoon 3 (Retired)'
  1. Cocoon 3 (Retired)
  2. COCOON3-123

schema validation error with namespaces provoke a double declaration of <?xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.0.0-beta-1
    • 3.1.0
    • cocoon-sax, cocoon-sitemap
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            thorsten Thorsten Scherler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: