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

The setNamedItemNS of the NamedNodeMap Interface does not work as per the spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.1
    • 1.1
    • xml
    • 1.1fcs
    • sparc
    • solaris_8
    • Verified

      The setNamedItemNS of the NamedNodeMap interface does not fulfil the requirements of the Dom Level 2 spec

      According to the spec this method is supposed to add a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. and the replaced Node is returned

      I am attaching files NamedNodeMap01.java and NamedNodeMap01.xml which show that
      it throws a NullPointerException if a Node with that namespaceURI and local name is present and does not return the replaced Node.

      Secondly the new node should later be accessible using the value of its namespaceURI and localName attributes as per the spec.

      I am attaching files NamedNodeMap02.java and NamedNodeMap02.xml which show that
      when I try to access it using getNamedItemNS method it returns nothing

            egoei Edwin Goei (Inactive)
            bhamehta Bhakti Mehta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: