United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5101859 : setNamespaceContext method of XPath class does not set NamespaceContext

Details
Type:
Enhancement
Submit Date:
2004-09-14
Status:
Open
Updated Date:
2013-04-06
Project Name:
JDK
Resolved Date:
Component:
xml
OS:
windows_2000
Sub-Component:
jaxp
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
5.0
Targeted Versions:
5.0

Related Reports

Sub Tasks

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.
                                     
2007-07-17
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
                                     
2004-11-05



Hardware and Software, Engineered to Work Together