diff --git a/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java b/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java index d00aa3fc95..540631e905 100644 --- a/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java +++ b/spring-integration-xml/src/main/java/org/springframework/integration/xml/config/XPathTransformerParser.java @@ -40,11 +40,11 @@ public class XPathTransformerParser extends AbstractTransformerParser { @Override protected void parseTransformer(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { - String expression = element.getAttribute("expression"); - String expressionRef = element.getAttribute("expression-ref"); + String expression = element.getAttribute("xpath-expression"); + String expressionRef = element.getAttribute("xpath-expression-ref"); boolean hasRef = StringUtils.hasText(expressionRef); Assert.isTrue(hasRef ^ StringUtils.hasText(expression), - "Exactly one of the 'expression' or 'expression-ref' attributes is required."); + "Exactly one of the 'xpath-expression' or 'xpath-expression-ref' attributes is required."); if (hasRef) { builder.addConstructorArgReference(expressionRef); } diff --git a/spring-integration-xml/src/main/resources/org/springframework/integration/xml/config/spring-integration-xml-2.0.xsd b/spring-integration-xml/src/main/resources/org/springframework/integration/xml/config/spring-integration-xml-2.0.xsd index 4cb12775ee..713c2c5669 100644 --- a/spring-integration-xml/src/main/resources/org/springframework/integration/xml/config/spring-integration-xml-2.0.xsd +++ b/spring-integration-xml/src/main/resources/org/springframework/integration/xml/config/spring-integration-xml-2.0.xsd @@ -166,19 +166,19 @@ - + The XPath expression string to be evaluated against the input Message's payload. - Either this or 'expression-ref' must be provided, but not both. + Either this or 'xpath-expression-ref' must be provided, but not both. - + Reference to the XPathExpression instance to be evaluated against the input Message's payload. - Either this or 'expression' must be provided, but not both. + Either this or 'xpath-expression' must be provided, but not both. @@ -302,6 +302,11 @@ The XPath Expression reference. Either this or 'xpath-expression' must be provided, but not both. + + + + + diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathTransformerParserTests-context.xml b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathTransformerParserTests-context.xml index 48e78380e2..5975b40ce0 100644 --- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathTransformerParserTests-context.xml +++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XPathTransformerParserTests-context.xml @@ -14,21 +14,21 @@ - + - + - + - + - + - + - + - +