Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.18.2
-
None
-
None
-
Unknown
Description
I like to use a split step with the XPathBuilder in a routetemplate.
It's possible to create a template with a split like this:
routeTemplate("split-xpath-router")
.templateOptionalParameter("expression")
.templateParameter("in")
.templateParameter("out")
.from("in")
.split().xpath("expression")
.to("out")
.end()
However, it doesn't seem possible to use XPathBuilder in the template, because the template parameter doesn't get interpolated. This leads to:
javax.xml.xpath.XPathExpressionException: net.sf.saxon.trans.XPathException: Unexpected token "{" at start of expression
I tried with:
routeTemplate("split-xpath-router")
.templateOptionalParameter("expression")
.templateParameter("in")
.templateParameter("out")
.from("in")
.split().xpath("expression")
.to("out")
.end()
I tried it like this:
.split(new XPathBuilder("").saxon().threadSafety(true))
And
.split().method(new XPathBuilder(""))
I expected it something like this:
routeTemplate("split-xpath-router")
.templateOptionalParameter("expression")
.templateParameter("in")
.templateParameter("out")
.from("in")
.split().xpathBuilder("expression").saxon().threadSafety("true")
.to("out")
.end()
Attachments
Issue Links
- is fixed by
-
CAMEL-18697 camel-core - Propose a DSL for languages
- Resolved
- relates to
-
CAMEL-18615 Using CSVDataformat in a Route Template
- Resolved