[SPR-6017] a few more tweaks to how getLocalName is handled
This commit is contained in:
@@ -59,7 +59,8 @@ public abstract class AbstractBeanDefinitionParser implements BeanDefinitionPars
|
||||
String id = resolveId(element, definition, parserContext);
|
||||
if (!StringUtils.hasText(id)) {
|
||||
parserContext.getReaderContext().error(
|
||||
"Id is required for element '" + element.getLocalName() + "' when used as a top-level tag", element);
|
||||
"Id is required for element '" + parserContext.getDelegate().getLocalName(element)
|
||||
+ "' when used as a top-level tag", element);
|
||||
}
|
||||
BeanDefinitionHolder holder = new BeanDefinitionHolder(definition, id);
|
||||
registerBeanDefinition(holder, parserContext.getRegistry());
|
||||
|
||||
@@ -63,7 +63,7 @@ public class SimplePropertyNamespaceHandler implements NamespaceHandler {
|
||||
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) {
|
||||
if (node instanceof Attr) {
|
||||
Attr attr = (Attr) node;
|
||||
String propertyName = attr.getLocalName();
|
||||
String propertyName = parserContext.getDelegate().getLocalName(attr);
|
||||
String propertyValue = attr.getValue();
|
||||
MutablePropertyValues pvs = definition.getBeanDefinition().getPropertyValues();
|
||||
if (pvs.contains(propertyName)) {
|
||||
|
||||
Reference in New Issue
Block a user