From 7e253449fa3bc9410e6a8292e4f6b369d718cde7 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 16 Jun 2010 00:05:05 +0000 Subject: [PATCH] INT-1156 renamed 'expression' and 'expression-ref' attributes on the to 'xpath-expression' and 'xpath-expression-ref' respectively in order to be consistent with other elements (splitter, router, header-enricher, etc.) --- .../xml/config/XPathTransformerParser.java | 6 +++--- .../xml/config/spring-integration-xml-2.0.xsd | 13 +++++++++---- .../XPathTransformerParserTests-context.xml | 16 ++++++++-------- 3 files changed, 20 insertions(+), 15 deletions(-) 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 @@ - + - + - + - + - + - + - + - +