sjsxp
  1. sjsxp
  2. SJSXP-49

Repairing XMLStreamWriter tries to use default namespace for attributes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      49

      Description

      It looks like the repairing writer does not consider the fact that attributes
      newer use default namespace (ie. if attribute has no prefix, it is not in any
      namespace, independent of there is a default namespace binding or not), and
      instead of assumes default namespace does apply to attributes.
      A demonstration of this can be found from StaxTest (available from
      http://stax.codehaus.org), test TestRepairingWriter#testAttributes.
      (I can try to come up with a shorter snippet too, but this should be easy enough
      to reproduce)

        Activity

        Hide
        Joe Wang added a comment -

        assign to me.

        Show
        Joe Wang added a comment - assign to me.
        Hide
        cowtowncoder added a comment -

        (fixed a typo in title)

        Show
        cowtowncoder added a comment - (fixed a typo in title)
        Hide
        Joe Wang added a comment -

        The javadoc for the XMLStreamWriter in jdk6 states that:
        writeAttribute(namespaceURI, localName, value) should output
        prefix:localName="value" [1] when namespaceURI is bound, where note [1]
        states "if namespaceURI == default Namespace URI, then no prefix is written"

        This statement is a violation of Namespaces in XML 1.0. I will file a request
        to get this corrected in the javadoc and then fix this bug.

        Show
        Joe Wang added a comment - The javadoc for the XMLStreamWriter in jdk6 states that: writeAttribute(namespaceURI, localName, value) should output prefix:localName="value" [1] when namespaceURI is bound, where note [1] states "if namespaceURI == default Namespace URI, then no prefix is written" This statement is a violation of Namespaces in XML 1.0. I will file a request to get this corrected in the javadoc and then fix this bug.
        Hide
        Joe Wang added a comment -

        it was fixed on 12/20/2009, rev 2021.

        Show
        Joe Wang added a comment - it was fixed on 12/20/2009, rev 2021.

          People

          • Assignee:
            Joe Wang
            Reporter:
            cowtowncoder
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: