Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.9.0
-
None
Description
If normalizeDocument() is called on a Document containing non-namespace aware Attr nodes an NPE will be thrown from the normalizer during namespace fixup. This bug is causing two test cases (infoset07 and wellformed03) in the W3C DOM Level 3 Core test suite to fail:
1) http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset07(org.w3c.domts.JUnitTestCaseAdapter)
java.lang.NullPointerException
at org.apache.xerces.util.XMLChar.isValidNCName(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.checkQName(Unknown Source)
at org.apache.xerces.dom.DOMNormalizer.namespaceFixUp(Unknown Source)
at org.apache.xerces.dom.DOMNormalizer.normalizeNode(Unknown Source)
at org.apache.xerces.dom.DOMNormalizer.normalizeDocument(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.normalizeDocument(Unknown Source)
at org.w3c.domts.level3.core.infoset07.runTest(infoset07.java:108)
at org.w3c.domts.JUnitTestCaseAdapter.runTest(JUnitTestCaseAdapter.java:41)
2) http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed03(org.w3c.domts.JUnitTestCaseAdapter)
java.lang.NullPointerException
at org.apache.xerces.util.XMLChar.isValidNCName(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.checkQName(Unknown Source)
at org.apache.xerces.dom.DOMNormalizer.namespaceFixUp(Unknown Source)
at org.apache.xerces.dom.DOMNormalizer.normalizeNode(Unknown Source)
at org.apache.xerces.dom.DOMNormalizer.normalizeDocument(Unknown Source)
at org.apache.xerces.dom.CoreDocumentImpl.normalizeDocument(Unknown Source)
at org.w3c.domts.level3.core.wellformed03.runTest(wellformed03.java:108)
at org.w3c.domts.JUnitTestCaseAdapter.runTest(JUnitTestCaseAdapter.java:41)