Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8148350

Element.setAttributeNS() empty namespace does not throw exception

    XMLWordPrintable

    Details

    • Subcomponent:

      Description

      W3 specs states that empty strings can not be used as a namespace names [1], but Element.setAttributeNS() wrongly allows it.

      org.w3c.org.Element#setAttributeNS should honor this requirement by throwing NAMESPACE_ERR DomException [2]

      [1] https://www.w3.org/TR/xml-names/#iri-use
      [2] https://docs.oracle.com/javase/8/docs/api/org/w3c/dom/Element.html#setAttributeNS-java.lang.String-java.lang.String-java.lang.String-

        Attachments

          Activity

            People

            Assignee:
            aefimov Aleksej Efimov
            Reporter:
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: