Description
Tuomas Kiviaho opened SPR-6017 and commented
BeanDefinitionParserDelegate and DefaultBeanDefinitionDocumentReader currently use node.getNamespaceURI & getLocalName() without considering that namespace awareness might be turned off (or DOM 1 is in use) leading these methods to return null values. The code is robust enough to avoid NPE:s but all elements belong to default namespace when namespace awareness is off since isDefaultNamespace(String) method will always receive null.
By providing middle-man methods getNamespaceURI(Node) and getLocalName(Node) in delegate as public methods (or alternatively as protected with additional public isDefaultNamespace(Node)) would solve the problem when namespace awareness is turned off (or DOM 1 is used). These methods could be overridden to provide means other means to solve namespace and localname while Spring could by default still stick with DOM 2 implementations.
Affects: 2.5.6