Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3193

CachingXmlEventWriter.NSContext supports only one prefix for a namespace (backed by map)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.2
    • 2.3.2
    • Core
    • None
    • redhat tomcat

    • Novice

    Description

      CachingXmlEventWriter.NSContext supports only one prefix for a namespace. As a result we have DOUBLE declaration of the SAMEprefix in an element (output xml). We use xmlbeans binding so that org.apache.cxf.xmlbeans.DataWriterImpl uses StaxUtils.copy. This StaxUtils.copy.writeStartElement writes namespaces from elements and attributes. If we have many different prefixes for the same namespace and the prefixes are used also in attributes then StaxUtils.copy.writeStartElement outputs DOUBLE declaration:

      input
      <a:elem1 a:xmlns="test" b:xmlns="test" a:attr1="value">

      output

      <a:elem1 a:xmlns="test" b:xmlns="test" a:attr1="value" a:xmlns="test">

      invalid: double a:xmlns="test" declaration

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            petekol Peter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified