Closed spring-operator closed 11 years ago
Mark Fisher commented
Can you please provide a bit more detail about the particular area where you'd like to see clarification? Is it the comparison of a plain header-enricher with "expression" attributes compared to the xpath-header-enricher? Something else?
Džiugas Baltrūnas commented
The main question is "how it actually works", since we talk about two different expression languages, so from the first sight it's unclear how can they be mixed together. In particular, I think following questions should be explained:
1) In what context (xpath-expression, xpath-header-enricher) mixing of SpEL and XPath expressions is allowed;
2) More examples (the only one is expression="/person/@age
* 2");
3) Syntax, context, scope, features and limitations, i.e. are constructs like "new String(/person/@age
).length()" possible or not and if is, how ApplicationContext's @bean
is separated from XML @attribute
(syntax collisions).
By the way, xpath-header-enricher is undocumented either, I've added a comment to #5174.
Thanks, Džiugas
Gunnar Hillert commented
Documentation for #6118 will be done on the same Git branch #5903
Gunnar Hillert commented
Just issued pull request: https://github.com/SpringSource/spring-integration/pull/142 as part of the parent issue.
As it turns out this was a documentation error. Spring Integration XPath Expressions do NOT presently support SpEL. I removed the respective reference from the Reference Manual.
If there is an urgent request to provide SpEL support for XPath Expressions, please open a separate Jira issue.
Jeffrey R Phillips commented
Did the ability to use SpEL and XPath together ever get added to Spring Integration? My scenerio is I have an xml value the form 123456-234343, I need to strip off the first part of the value in a header enricher. I need to use XPath to get to the value, then SpEL to do the string manipulations.
Thanks!
Artem Bilan commented
Here, please: #7052 Will be done soon. However you can do it on your own now with new SpEL functions support from SI 3.0.M3
Džiugas Baltrūnas opened INT-1917 and commented
There is no explanation in documentation about combination of SpEL and XPath expressions, i.e. what constructs are possible and how they should be used.
Affects: 2.0.4
This issue is a sub-task of #6138
Issue Links:
6043 Refactor and Standardize possible XSD Schema Attributes across all Routers
6033 xpath-router needs apply-sequence
6118 Add documentation for XPath Filter
7052 Add out-of-the-box #xpath() SpEL function