JDK-5101859 : setNamespaceContext method of XPath class does not set NamespaceContext
  • Type: Enhancement
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-09-14
  • Updated: 2017-04-21
  • Resolved: 2017-04-21
Description
Name: gm110360			Date: 09/14/2004


A DESCRIPTION OF THE PROBLEM :
The setNamespaceContext(NamespaceContext nsContext) method of the XPath class does not set the NamespaceContext.


XPathFactory factory=XPathFactory.newInstance();
XPath xPath=factory.newXPath();

class NamespaceContextImpl implements NamespaceContext{
//NamespaceContext interface has only the getter methods, does not
//have the setter  methods to set namespace uri and prefix.

}

>>xPath.setNamespaceContext(new NamespaceContextImpl());

The NamespaceContext interface does not have setNamespaceURI and setPrefix methods to set the namespace uri and prefix of the NamespaceContext. The NamespaceContext interface only has the getter methods for NamespaceURI and prefix.


URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/XPath.html#setNamespaceContext(javax.xml.namespace.NamespaceContext)
(Incident Review ID: 302216) 
======================================================================
###@###.### 11/2/04 01:49 GMT

Comments
EVALUATION I think this bug is really about the NamespaceContext interface not having any setters. We're not going to get to do anything about that. But we can revisit in 1.5 what we might do instead.
17-07-2007

EVALUATION the Interface was defined by the JSR 206 Expert Group. any changes to the existing API will need to go through the JCP process as part of a new version of JAXP. this bug is being tagged as an RFE for the next version of JAXP. ###@###.### 2004-11-05 19:38:12 GMT
05-11-2004