Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1697

xml:* attributes duplication

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.6.0
    • 2.7.0
    • SAX/SAX2
    • None
    • Microsoft Windows XP Pro SP2, Microsoft Visual C++ .NET

    Description

      Xerces doesn't check if attributes from
      "http://www.w3.org/XML/1998/namespace" namespace which can have default value
      (e.g., xml:space) are directly specified in the data. So it leads to xml:space
      duplication in attributes list during startElement event.

      Sample .xml & .xsd are attached.

      For schema fragment
      ...
      <xsd:element name="name">
      <xsd:complexType>
      <xsd:simpleContent>
      <xsd:extension base="xsd:string">
      <xsd:attribute ref="xml:space"/>
      </xsd:extension>
      </xsd:simpleContent>
      </xsd:complexType>
      </xsd:element>
      ...

      and following data fragment
      ...
      <name xml:space="preserve">John Abraham Smith</name>
      ...

      Xerces reports 2 attributes xml:space within attributes container.

      Attachments

        1. xml_space_duplication.zip
          2 kB
          Anton Nikolaevsky

        Activity

          People

            amassari Alberto Massari
            antonn Anton Nikolaevsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: