-
Bug
-
Resolution: Fixed
-
P2
-
7
-
1.4
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2207329 | 7 | Joe Wang | P2 | Closed | Fixed | b112 |
JDK-2192492 | 6u21 | Abhijit Saha | P2 | Closed | Fixed | b05 |
Refer to: https://jaxp.dev.java.net/issues/show_bug.cgi?id=63
attributes with defined prefix (namespace) is accessible with "empty" namespace.
for example
xml: <prefix:rootElem xmlns:prefix="something" prefix:attr="attrValue" />
code:
public void startElement(String uri, String localName, String qName,
Attributes atts) throws SAXException {
super.startElement(uri, localName, qName, atts);
String attr_WithNs = atts.getValue("something", "attr");
String attr_NoNs = atts.getValue("", "attr");
}
attr_NoNs should be null but atts.getValue returns same thing as is set in
attr_WithNs.
This is confirmed regression (introduced in JDK6_18, present in OpenJDK7).
attributes with defined prefix (namespace) is accessible with "empty" namespace.
for example
xml: <prefix:rootElem xmlns:prefix="something" prefix:attr="attrValue" />
code:
public void startElement(String uri, String localName, String qName,
Attributes atts) throws SAXException {
super.startElement(uri, localName, qName, atts);
String attr_WithNs = atts.getValue("something", "attr");
String attr_NoNs = atts.getValue("", "attr");
}
attr_NoNs should be null but atts.getValue returns same thing as is set in
attr_WithNs.
This is confirmed regression (introduced in JDK6_18, present in OpenJDK7).
- backported by
-
JDK-2192492 JAXP issue 63 : attribute is accessible with invalid namespace
- Closed
-
JDK-2207329 JAXP issue 63 : attribute is accessible with invalid namespace
- Closed
- relates to
-
JDK-6840792 sjsxp issue 70 XmlStreamReaderImpl.getAttributeValue namespace arg. not interpreted properly
- Closed