This is an automated email from the ASF dual-hosted git repository.

igarashitm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new e1518a4dcef CAMEL-20564: follow-up: adding variable usage example in 
component adoc
e1518a4dcef is described below

commit e1518a4dcef5b4f74861f06f4d99f09800994f4b
Author: Tomohisa Igarashi <tm.igara...@gmail.com>
AuthorDate: Wed Jan 22 10:53:52 2025 -0500

    CAMEL-20564: follow-up: adding variable usage example in component adoc
---
 .../camel-xslt-saxon/src/main/docs/xslt-saxon-component.adoc | 12 +++++++++++-
 components/camel-xslt/src/main/docs/xslt-component.adoc      | 12 +++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-xslt-saxon/src/main/docs/xslt-saxon-component.adoc 
b/components/camel-xslt-saxon/src/main/docs/xslt-saxon-component.adoc
index e50aebb7eb1..43c5c561541 100644
--- a/components/camel-xslt-saxon/src/main/docs/xslt-saxon-component.adoc
+++ b/components/camel-xslt-saxon/src/main/docs/xslt-saxon-component.adoc
@@ -84,16 +84,26 @@ from("activemq:My.Queue").
 
 === Getting Usable Parameters into the XSLT
 
-By default, all headers are added as parameters which are then available in
+By default, all headers and variables are added as parameters which are then 
available in
 the XSLT. +
 To make the parameters usable, you will need to declare them.
 
+- Header
+
 [source,xml]
 ----
 <setHeader name="myParam"><constant>42</constant></setHeader>
 <to uri="xslt-saxon:MyTransform.xsl"/>
 ----
 
+- Variable
+
+[source,xml]
+----
+<setVariable name="myParam"><constant>42</constant></setVariable>
+<to uri="xslt-saxon:MyTransform.xsl"/>
+----
+
 The parameter also needs to be declared in the top level of the XSLT for it to 
be
 available:
 
diff --git a/components/camel-xslt/src/main/docs/xslt-component.adoc 
b/components/camel-xslt/src/main/docs/xslt-component.adoc
index 3dd67ee5295..515a4a7e3fc 100644
--- a/components/camel-xslt/src/main/docs/xslt-component.adoc
+++ b/components/camel-xslt/src/main/docs/xslt-component.adoc
@@ -86,16 +86,26 @@ from("activemq:My.Queue").
 
 == Getting Usable Parameters into the XSLT
 
-By default, all headers are added as parameters which are then available in
+By default, all headers and variables are added as parameters which are then 
available in
 the XSLT. +
 To make the parameters usable, you will need to declare them.
 
+- Header
+
 [source,xml]
 ----
 <setHeader name="myParam"><constant>42</constant></setHeader>
 <to uri="xslt:MyTransform.xsl"/>
 ----
 
+- Variable
+
+[source,xml]
+----
+<setVariable name="myParam"><constant>42</constant></setVariable>
+<to uri="xslt:MyTransform.xsl"/>
+----
+
 The parameter also needs to be declared in the top level of the XSLT for it to 
be
 available:
 

Reply via email to