javax.xml.namespace.NamespaceContext#getPrefix does not seem to following API documents.
According to the following page,
http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/NamespaceContext.html#getPrefix%28java.lang.String%29
XMLConstants.XML_NS_PREFIX ("xml") should be return for XMLConstants.XML_NS_URI ("http://www.w3.org/XML/1998/namespace").
XMLConstants.XMLNS_ATTRIBUTE ("xmlns") should be return for XMLConstants.XMLNS_ATTRIBUTE_NS_URI ("http://www.w3.org/2000/xmlns/").
However, "null" returns for both cases in the attached test case.
CONFIGURATION:
JDK :6u21(and later)
OS : WIndowsXP(SP3, Japanese)
REPRODUCE:
1. Compile the attached test case c.java
2. Invoke "java c"
The following message show up.
F:\temp> java c
null
expected result: xml
null
expected result: xmlns
The above "null"s should be "xml" and "x,lns" respectively.
According to the following page,
http://download.oracle.com/javase/6/docs/api/javax/xml/namespace/NamespaceContext.html#getPrefix%28java.lang.String%29
XMLConstants.XML_NS_PREFIX ("xml") should be return for XMLConstants.XML_NS_URI ("http://www.w3.org/XML/1998/namespace").
XMLConstants.XMLNS_ATTRIBUTE ("xmlns") should be return for XMLConstants.XMLNS_ATTRIBUTE_NS_URI ("http://www.w3.org/2000/xmlns/").
However, "null" returns for both cases in the attached test case.
CONFIGURATION:
JDK :6u21(and later)
OS : WIndowsXP(SP3, Japanese)
REPRODUCE:
1. Compile the attached test case c.java
2. Invoke "java c"
The following message show up.
F:\temp> java c
null
expected result: xml
null
expected result: xmlns
The above "null"s should be "xml" and "x,lns" respectively.