This is an automated email from the ASF dual-hosted git repository. valdar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 1e81303 adding an example about using camel headers new 166e33e Merge pull request #2979 from Bican007/patch-1 1e81303 is described below commit 1e81303bb19b8d6d4de537a200c25136e76f8392 Author: Bican007 <rbici...@gmail.com> AuthorDate: Mon Jun 17 07:52:02 2019 +0200 adding an example about using camel headers --- components/camel-saxon/src/main/docs/xquery-component.adoc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/camel-saxon/src/main/docs/xquery-component.adoc b/components/camel-saxon/src/main/docs/xquery-component.adoc index fb4e5d7..fc267f0 100644 --- a/components/camel-saxon/src/main/docs/xquery-component.adoc +++ b/components/camel-saxon/src/main/docs/xquery-component.adoc @@ -235,7 +235,17 @@ from("direct:start"). transform().xquery("/people/person/text()", String.class); ------------------------------------------------------------- - +If you want to use camel variables like headers, you have to explicitly declare them in the xquery expression. +[source,xml] +------------------------------------------------------------- +<transform> + <xquery> + declare variable $in.headers.foo external; + element item {$in.headers.foo} + </xquery> +</transform> +------------------------------------------------------------- + ### Using XQuery as an endpoint