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

davsclaus 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 6e957f671aaf CAMEL-25265: docs - language pages show their examples in 
Java, XML and YAML tabs (#27278)
6e957f671aaf is described below

commit 6e957f671aaff90146da005d306dffc76217ccc9
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Oct 2 14:31:18 2026 +0200

    CAMEL-25265: docs - language pages show their examples in Java, XML and 
YAML tabs (#27278)
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---
 .../apache/camel/catalog/docs/bean-language.adoc   |  37 +++-
 .../camel/catalog/docs/constant-language.adoc      |  50 ++++-
 .../camel/catalog/docs/datasonnet-language.adoc    |  35 +++-
 .../apache/camel/catalog/docs/groovy-language.adoc |  30 ++-
 .../camel/catalog/docs/hl7terser-language.adoc     |  44 +++-
 .../apache/camel/catalog/docs/jactl-language.adoc  |  41 +++-
 .../apache/camel/catalog/docs/java-language.adoc   | 201 +++++++++++++++---
 .../org/apache/camel/catalog/docs/jq-language.adoc | 223 +++++++++++++++++++-
 .../camel/catalog/docs/jsonpath-language.adoc      | 231 ++++++++++++++++++---
 .../camel/catalog/docs/python3-language.adoc       |  45 ++++
 .../camel/catalog/docs/quickjs-language.adoc       | 113 ++++++++++
 .../apache/camel/catalog/docs/spel-language.adoc   |  35 +++-
 .../camel/catalog/docs/typesafe-ai-language.adoc   |  57 +++--
 .../apache/camel/catalog/docs/wasm-language.adoc   |  32 +++
 .../apache/camel/catalog/docs/xpath-language.adoc  | 134 +++++++++++-
 .../apache/camel/catalog/docs/xquery-language.adoc | 138 +++++++++++-
 .../camel/catalog/docs/xtokenize-language.adoc     |  12 ++
 .../src/main/docs/typesafe-ai-language.adoc        |  57 +++--
 .../camel-bean/src/main/docs/bean-language.adoc    |  37 +++-
 .../src/main/docs/datasonnet-language.adoc         |  35 +++-
 .../src/main/docs/groovy-language.adoc             |  30 ++-
 .../src/main/docs/hl7terser-language.adoc          |  44 +++-
 .../camel-jactl/src/main/docs/jactl-language.adoc  |  41 +++-
 .../camel-joor/src/main/docs/java-language.adoc    | 201 +++++++++++++++---
 components/camel-jq/src/main/docs/jq-language.adoc | 223 +++++++++++++++++++-
 .../src/main/docs/jsonpath-language.adoc           | 231 ++++++++++++++++++---
 .../src/main/docs/python3-language.adoc            |  45 ++++
 .../src/main/docs/quickjs-language.adoc            | 113 ++++++++++
 .../camel-saxon/src/main/docs/xquery-language.adoc | 138 +++++++++++-
 .../camel-spring/src/main/docs/spel-language.adoc  |  35 +++-
 .../src/main/docs/xtokenize-language.adoc          |  12 ++
 .../camel-wasm/src/main/docs/wasm-language.adoc    |  32 +++
 .../camel-xpath/src/main/docs/xpath-language.adoc  | 134 +++++++++++-
 .../modules/languages/pages/constant-language.adoc |  50 ++++-
 34 files changed, 2660 insertions(+), 256 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-language.adoc
index b06e5b6f98f9..b48c648af39f 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/bean-language.adoc
@@ -122,7 +122,10 @@ that are not registered in the 
xref:manual::registry.adoc[Registry].
 Camel can instantiate the bean of a given type and invoke the method
 or invoke the method on an already existing instance.
 
-._Java-only: invoking a bean by class type_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("activemq:topic:OrdersTopic")
@@ -130,6 +133,38 @@ from("activemq:topic:OrdersTopic")
   .to("activemq:BigSpendersQueue");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="activemq:topic:OrdersTopic"/>
+  <filter>
+    <method beanType="com.foo.MyBean" method="isGoldCustomer"/>
+    <to uri="activemq:BigSpendersQueue"/>
+  </filter>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: activemq:topic:OrdersTopic
+      steps:
+        - filter:
+            expression:
+              method:
+                beanType: com.foo.MyBean
+                method: isGoldCustomer
+            steps:
+              - to:
+                  uri: activemq:BigSpendersQueue
+----
+====
+
 The first parameter can also be an existing instance of a Bean such as:
 
 ._Java-only: invoking a method on an existing bean instance_
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/constant-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/constant-language.adoc
index 6c26be9909ab..542fa348ab94 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/constant-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/constant-language.adoc
@@ -86,6 +86,14 @@ For example to set a header with `int` type you can do:
 
 [tabs]
 ====
+Java::
++
+[source,java]
+----
+from("seda:a")
+    .setHeader("zipCode", constant(90210))
+    .to("mock:b");
+----
 
 XML::
 +
@@ -125,12 +133,50 @@ YAML::
 You can externalize the constant and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
-eg to refer to a file on the classpath you can do:
+eg to set the message body to the content of a file, such as a JSON document a 
rest service returns, you can do:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
-.setHeader("myHeader").constant("resource:classpath:constant.txt")
+from("direct:stock")
+    .setBody(constant("resource:file:stock.json"))
+    .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:stock"/>
+  <setBody>
+    <constant>resource:file:stock.json</constant>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:stock
+      steps:
+        - setBody:
+            expression:
+              constant:
+                expression: resource:file:stock.json
+        - to:
+            uri: mock:result
 ----
+====
+
+Use `resource:classpath:` for a file on the classpath, such as 
`resource:classpath:constant.txt`.
 
 == Dependencies
 
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
index f865494ce3de..5734f50880d5 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/datasonnet-language.adoc
@@ -48,23 +48,44 @@ Java::
 +
 [source,java]
 ----
-datasonnet("body.foo", String.class);
+from("direct:start")
+    .setBody(datasonnet("body.foo", String.class))
+    .to("mock:result");
 ----
 
 XML::
 +
 [source,xml]
 ----
-<datasonnet resultType="java.lang.String">body.foo</datasonnet>
+<route>
+  <from uri="direct:start"/>
+  <setBody>
+    <datasonnet resultType="java.lang.String">body.foo</datasonnet>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
 ----
-+
-[NOTE]
-=====
-In XML DSL you use the `resultType` attribute to provide a fully qualified 
class name.
-=====
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setBody:
+            expression:
+              datasonnet:
+                expression: body.foo
+                resultType: java.lang.String
+        - to:
+            uri: mock:result
+----
 ====
 
+In XML and YAML DSL, `resultType` is the fully qualified class name.
+
 If the expression results in an array, or an object, you can instruct the 
expression to return you `List.class`
 or `Map.class`, respectively. However, you must also set the output media type 
to `application/x-java-object`.
 
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
index 9d51d0d55a13..271621857a14 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/groovy-language.adoc
@@ -143,28 +143,44 @@ to determine if any line items are over $100:
 
 [tabs]
 ====
-
 Java::
 +
 [source,java]
 ----
-from("queue:foo")
+from("seda:foo")
     .filter(groovy("body.lineItems.any { i -> i.value > 100 }"))
-        .to("queue:bar")
+        .to("seda:bar");
 ----
 
-XML DSL::
+XML::
 +
 [source,xml]
 ----
 <route>
-    <from uri="queue:foo"/>
+    <from uri="seda:foo"/>
     <filter>
-        <groovy>body.lineItems.any { i -> i.value > 100 }</groovy>
-        <to uri="queue:bar"/>
+        <groovy>body.lineItems.any { i -> i.value &gt; 100 }</groovy>
+        <to uri="seda:bar"/>
     </filter>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: seda:foo
+      steps:
+        - filter:
+            expression:
+              groovy:
+                expression: "body.lineItems.any { i -> i.value > 100 }"
+            steps:
+              - to:
+                  uri: seda:bar
+----
 ====
 
 == Pre compiling shared groovy scripts
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hl7terser-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hl7terser-language.adoc
index 964b1e278861..aa7736f40fcf 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hl7terser-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/hl7terser-language.adoc
@@ -29,7 +29,10 @@ include::partial$language-options.adoc[]
 In the example below, we want to set a header with the patent id
 from field QRD-8 in the QRY_A19 message:
 
-._Java-only: HL7 Terser expression builder API for extracting and filtering 
fields_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.component.hl7.HL7.hl7terser;
@@ -38,8 +41,45 @@ import static org.apache.camel.component.hl7.HL7.hl7terser;
 from("direct:test1")
    .setHeader("PATIENT_ID", hl7terser("QRD-8(0)-1"))
    .to("mock:test1");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:test1"/>
+  <setHeader name="PATIENT_ID">
+    <hl7terser>QRD-8(0)-1</hl7terser>
+  </setHeader>
+  <to uri="mock:test1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:test1
+      steps:
+        - setHeader:
+            name: PATIENT_ID
+            expression:
+              hl7terser:
+                expression: QRD-8(0)-1
+        - to:
+            uri: mock:test1
+----
+====
+
+In Java DSL the expression can also be compared with the predicate builder, 
for example to continue processing if
+the extracted field equals a message header:
 
-// continue processing if extracted field equals a message header
+._Java-only: HL7 Terser expression builder API for filtering_
+[source,java]
+----
 from("direct:test2")
    .filter(hl7terser("QRD-8(0)-1").isEqualTo(header("PATIENT_ID"))
    .to("mock:test2");
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jactl-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jactl-language.adoc
index c122964c76a8..6e25278ea4aa 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jactl-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jactl-language.adoc
@@ -44,6 +44,10 @@ For example with Maven, in the `dependencies` section of 
your `pom.xml`:
 
 == Usage
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.language.jactl.JactlLanguage.jactl;
@@ -56,8 +60,43 @@ public class MyRouteBuilder extends RouteBuilder {
             .to("direct:big-orders");
     }
 }
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:orders"/>
+  <filter>
+    <jactl>body.amount &gt; 100 &amp;&amp; body.status == 'NEW'</jactl>
+    <to uri="direct:big-orders"/>
+  </filter>
+</route>
+----
 
-// Or via the Language SPI:
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:orders
+      steps:
+        - filter:
+            expression:
+              jactl:
+                expression: 'body.amount > 100 && body.status == ''NEW'''
+            steps:
+              - to:
+                  uri: direct:big-orders
+----
+====
+
+Or via the Language SPI:
+
+[source,java]
+----
 Language jactl = camelContext.resolveLanguage("jactl");
 Predicate p    = jactl.createPredicate("body.age > 20");
 Expression e   = jactl.createExpression("'Hello ' + body.name");
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/java-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/java-language.adoc
index d108a26a281b..469aef195794 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/java-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/java-language.adoc
@@ -117,7 +117,10 @@ And this bean is registered with the name `myEcho` in the 
Camel registry.
 
 The Java code can then inject this bean directly in the script where the bean 
is in use:
 
-._Java-only: Java DSL route with bean injection syntax_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -125,6 +128,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <java>'Hello ' + #bean:myEcho.echo(bodyAs(String))</java>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: '''Hello '' + #bean:myEcho.echo(bodyAs(String))'
+        - to:
+            uri: mock:result
+----
+====
+
 Now this code may seem a bit magic, but what happens is that the `myEcho` bean 
is injected via a constructor, and then called directly in the script, so it is 
as fast as possible.
 
 Under the hood, Camel Java generates the following source code compiled once:
@@ -149,7 +182,10 @@ public class JoorScript1 implements 
org.apache.camel.language.joor.JoorMethod {
 
 You can also store a reference to the bean in a variable which would more 
resemble how you would code in Java
 
-._Java-only: Java DSL route with bean variable reference_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -157,6 +193,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <java>var bean = #bean:myEcho; return 'Hello ' + 
bean.echo(bodyAs(String))</java>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: 'var bean = #bean:myEcho; return ''Hello '' + 
bean.echo(bodyAs(String))'
+        - to:
+            uri: mock:result
+----
+====
+
 Notice how we declare the bean as if it is a local variable via `var bean = 
#bean:myEcho`.
 When doing this we must use a different name as `myEcho` is the variable used 
by the dependency injection.
 Therefore, we use _bean_ as name in the script.
@@ -199,14 +265,47 @@ echo()=bodyAs(String) + bodyAs(String)
 
 Which allows using `echo()` in the jOOR language script such as:
 
-._Java-only: Java DSL route using alias function_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:hello")
-    .transform(java("'Hello ' + echo()"))
+    .transform().java("'Hello ' + echo()")
     .log("You said ${body}");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:hello"/>
+  <transform>
+    <java>'Hello ' + echo()</java>
+  </transform>
+  <log message="You said ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:hello
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: '''Hello '' + echo()'
+        - log:
+            message: 'You said ${body}'
+----
+====
+
 The `echo()` alias will be replaced with its value resulting in a script as:
 
 ._Java-only: expanded alias result in Java DSL_
@@ -284,23 +383,50 @@ It is possible to include multiple statements.
 The code below shows an example where the `user` header is retrieved in a 
first statement.
 And then, in a second statement we return a value whether the user is `null` 
or not.
 
-._Java-only: Java DSL route with multi-statement expression_
+In Java DSL the strings inside the script must be escaped (`\"`), so it is 
easier to write them in single quotes,
+which the Java language turns into double quotes (`singleQuotes`, on by 
default). In XML and YAML DSL single quotes
+work the same:
+
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("seda:orders")
-  .transform().java("var user = message.getHeader(\"user\"); return user != 
null ? \"User: \" + user : \"No user exists\";")
-  .to("seda:user");
+    .transform().java("var user = message.getHeader('user'); return user != 
null ? 'User: ' + user : 'No user exists';")
+    .to("seda:user");
 ----
 
-Notice how we have to quote strings in strings, and that is annoying, so 
instead we can use single quotes:
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="seda:orders"/>
+  <transform>
+    <java>var user = message.getHeader('user'); return user != null ? 'User: ' 
+ user : 'No user exists';</java>
+  </transform>
+  <to uri="seda:user"/>
+</route>
+----
 
-._Java-only: Java DSL route using single-quote syntax_
-[source,java]
+YAML::
++
+[source,yaml]
 ----
-from("seda:orders")
-  .transform().java("var user = message.getHeader('user'); return user != null 
? 'User: ' + user : 'No user exists';")
-  .to("seda:user");
+- route:
+    from:
+      uri: seda:orders
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: 'var user = message.getHeader(''user''); return 
user != null ? ''User: '' + user : ''No user exists'';'
+        - to:
+            uri: seda:user
 ----
+====
 
 === Hot re-load
 
@@ -308,33 +434,52 @@ You can turn off pre-compilation for the Java language 
and then Camel will recom
 (an inline script is still only compiled once, on first use, as its text 
cannot change).
 You can externalize the code into a resource file, which will be reloaded on 
each message as shown:
 
-._Java-only: programmatic hot-reload configuration with Java DSL_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
-JavaLanguage java = (JavaLanguage) context.resolveLanguage("java");
-java.setPreCompile(false);
-
 from("jms:incoming")
-    .transform().java("resource:file:src/main/resources/orders.java")
+    
.transform(expression().java("resource:file:src/main/resources/orders.java").preCompile(false).end())
     .to("jms:orders");
 ----
 
-Here the Java code is externalized into the file 
`src/main/resources/orders.java` which allows you to edit this source file 
while running the Camel application and try the changes with hot-reloading.
-
-In XML DSL it's easier because you can turn off pre-compilation in the 
`<java>` XML element:
-
-._XML-only:_
+XML::
++
 [source,xml]
 ----
 <route>
-    <from uri="jms:incoming"/>
-    <transform>
-      <java 
preCompile="false">resource:file:src/main/resources/orders.java</java>
-    </transform>
-    <to uri="jms:orders"/>
+  <from uri="jms:incoming"/>
+  <transform>
+    <java 
preCompile="false">resource:file:src/main/resources/orders.java</java>
+  </transform>
+  <to uri="jms:orders"/>
 </route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: jms:incoming
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: resource:file:src/main/resources/orders.java
+                preCompile: false
+        - to:
+            uri: jms:orders
+----
+====
+
+Here the Java code is externalized into the file 
`src/main/resources/orders.java` which allows you to edit this source
+file while running the Camel application and try the changes with 
hot-reloading. Pre-compilation can also be turned
+off for every script on the language, with `setPreCompile(false)` on the 
`JavaLanguage` (`context.resolveLanguage("java")`).
+
 === Lambda-based AggregationStrategy
 
 The Java language has special support for defining an 
`org.apache.camel.AggregationStrategy` as a lambda expression.
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jq-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jq-language.adoc
index b98597ad069a..6f4dc98ce7b0 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jq-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jq-language.adoc
@@ -31,7 +31,10 @@ By default, JQ uses the message body as the input source. 
However, you can also
 
 For example, to count the number of books from a JSON document that was stored 
in a header named `books` you can do:
 
-._Java-only: using header as JQ input source_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -40,6 +43,39 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <setHeader name="numberOfBooks">
+    <jq source="header:books" resultType="int">.store.books | length</jq>
+  </setHeader>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setHeader:
+            name: numberOfBooks
+            expression:
+              jq:
+                expression: .store.books | length
+                resultType: int
+                source: header:books
+        - to:
+            uri: mock:result
+----
+====
+
 === Camel supplied JQ Functions
 
 NOTE: JQ comes with about a hundred built-in functions, and you can see many 
examples from https://jqlang.github.io/jq/[JQ] documentation.
@@ -54,8 +90,11 @@ The camel-jq adds the following functions:
 
 For example, to set the property foo with the value from the Message header 
`MyHeader':
 
-._Java-only: using the header function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -63,10 +102,43 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = header("MyHeader")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = header("MyHeader")'
+        - to:
+            uri: mock:result
+----
+====
+
 Or from the exchange property:
 
-._Java-only: using the property function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -74,10 +146,43 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = property("MyProperty")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = property("MyProperty")'
+        - to:
+            uri: mock:result
+----
+====
+
 And using a constant value
 
-._Java-only: using the constant function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -85,10 +190,43 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = constant("Hello World")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = constant("Hello World")'
+        - to:
+            uri: mock:result
+----
+====
+
 Or using an exchange variable:
 
-._Java-only: using the variable function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -96,11 +234,44 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = variable("MyVar")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = variable("MyVar")'
+        - to:
+            uri: mock:result
+----
+====
+
 The `header`, `property` and `variable` functions also support returning a 
default value in case the key does not exist,
 as shown in the following:
 
-._Java-only: using the header function with a default value_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -108,6 +279,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = header("MyHeader", "MyDefaultValue")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = header("MyHeader", "MyDefaultValue")'
+        - to:
+            uri: mock:result
+----
+====
+
 
 === Transforming a JSon message
 
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jsonpath-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jsonpath-language.adoc
index 24309d4a6c97..835d7515d479 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jsonpath-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/jsonpath-language.adoc
@@ -204,6 +204,28 @@ XML DSL::
 </route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  jsonpath:
+                    expression: person.middlename
+                    suppressExceptions: true
+                steps:
+                  - to:
+                      uri: mock:middle
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:other
+----
 ====
 
 This option is also available on the `@JsonPath` annotation.
@@ -388,21 +410,58 @@ You can turn off support for inlined Simple expression by 
setting the option `al
 
 [tabs]
 ====
-
 Java::
 +
 [source,java]
 ----
-.when().jsonpath("$.store.book[?(@.price < 10)]", false, false)
+from("direct:start")
+    .choice()
+        .when(expression().jsonpath("$.store.book[?(@.price < 
10)]").allowSimple(false).end())
+            .to("mock:cheap")
+        .otherwise()
+            .to("mock:expensive");
 ----
 
-XML DSL::
+XML::
 +
 [source,xml]
 ----
-<jsonpath allowSimple="false">$.store.book[?(@.price &lt; 10)]</jsonpath>
+<route>
+  <from uri="direct:start"/>
+  <choice>
+    <when>
+      <jsonpath allowSimple="false">$.store.book[?(@.price &lt; 10)]</jsonpath>
+      <to uri="mock:cheap"/>
+    </when>
+    <otherwise>
+      <to uri="mock:expensive"/>
+    </otherwise>
+  </choice>
+</route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  jsonpath:
+                    expression: "$.store.book[?(@.price < 10)]"
+                    allowSimple: false
+                steps:
+                  - to:
+                      uri: mock:cheap
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:expensive
+----
 ====
 
 === Using variables as source
@@ -492,7 +551,10 @@ can specify the encoding in the header 
`CamelJsonPathJsonEncoding`.
 
 You can use JSONPath to split a JSON document, such as:
 
-._Java-only: Java DSL with class literal parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -500,6 +562,38 @@ from("direct:start")
     .to("log:book");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <split>
+    <jsonpath resultType="java.util.List">$.store.book[*]</jsonpath>
+    <to uri="log:book"/>
+  </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - split:
+            expression:
+              jsonpath:
+                expression: "$.store.book[*]"
+                resultType: java.util.List
+            steps:
+              - to:
+                  uri: log:book
+----
+====
+
 IMPORTANT: Notice how we specify `List.class` as the result-type. This is 
because if there is only
 a single element (only 1 book), then jsonpath will return the single entity as 
a `Map` instead of `List<Map>`.
 Therefore, we tell Camel that the result should always be a `List`, and Camel 
will then automatic wrap the
@@ -509,7 +603,10 @@ Then each book is logged, however the message body is a 
`Map` instance. Sometime
 you may want to output this as plain String JSON value instead, which can be 
done
 with the `writeAsString` option as shown:
 
-._Java-only: Java DSL with class literal parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -517,13 +614,49 @@ from("direct:start")
     .to("log:book");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <split>
+    <jsonpath resultType="java.util.List" 
writeAsString="true">$.store.book[*]</jsonpath>
+    <to uri="log:book"/>
+  </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - split:
+            expression:
+              jsonpath:
+                expression: "$.store.book[*]"
+                resultType: java.util.List
+                writeAsString: true
+            steps:
+              - to:
+                  uri: log:book
+----
+====
+
 Then each book is logged as a String JSON value.
 
 === Unpack a single-element array into an object
 
 It is possible to unpack a single-element array into an object:
 
-._Java-only: Java DSL with class literal parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -531,6 +664,38 @@ from("direct:start")
     .to("log:book");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <setBody>
+    <jsonpath unpackArray="true" 
resultType="com.example.Book">$.store.book</jsonpath>
+  </setBody>
+  <to uri="log:book"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setBody:
+            expression:
+              jsonpath:
+                expression: $.store.book
+                unpackArray: true
+                resultType: com.example.Book
+        - to:
+            uri: log:book
+----
+====
+
 If a book array contains only one book, it will be converted into a Book 
object.
 
 === Using header as input
@@ -541,20 +706,10 @@ by specifying the `source` option.
 For example, to count the number of books from a JSON document that
 was stored in a header named `books` you can do:
 
-._Java-only: Java fluent expression builder API_
-[source,java]
-----
-var jp = expression().jsonpath("$..store.book.length()").resultType(int.class)
-        .source("header:books").end();
-
-from("direct:start")
-    .setHeader("numberOfBooks", jp)
-    .to("mock:result");
-----
-
-And you can also inline the expression:
-
-._Java-only: Java fluent expression builder API_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -563,14 +718,8 @@ from("direct:start")
     .to("mock:result");
 ----
 
-In the `jsonpath` expression above we specify the name of the header as 
`books`,
-and we also told that we wanted the result to be converted as an integer by 
`int.class`.
-
-TIP: You can also use `variable:` as source prefix to refer to an Exchange 
variable instead of a header.
-
-The same example in XML DSL would be easier to do:
-
-._XML-only:_
+XML::
++
 [source,xml]
 ----
 <route>
@@ -582,6 +731,30 @@ The same example in XML DSL would be easier to do:
 </route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setHeader:
+            name: numberOfBooks
+            expression:
+              jsonpath:
+                expression: $..store.book.length()
+                source: header:books
+                resultType: int
+        - to:
+            uri: mock:result
+----
+====
+
+Here the name of the header is `books`, and the result is converted to an 
integer (`resultType`).
+
+TIP: You can also use `variable:` as source prefix to refer to an Exchange 
variable instead of a header.
+
 === Transforming a JSon message
 
 For basic JSon transformation where you have a fixed structure, you can 
represent with a combination of using
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc
index b30207296c2d..68b82eb9bd74 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc
@@ -97,6 +97,10 @@ camelContext.getRegistry().bind("python3", python3);
 
 == Usage
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.language.python3.Python3Language.python3;
@@ -112,6 +116,47 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <choice>
+    <when>
+      <python3>body == 'Hello'</python3>
+      <to uri="mock:hello"/>
+    </when>
+    <otherwise>
+      <to uri="mock:other"/>
+    </otherwise>
+  </choice>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  python3:
+                    expression: 'body == ''Hello'''
+                steps:
+                  - to:
+                      uri: mock:hello
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:other
+----
+====
+
 Python 3 syntax is supported, including f-strings:
 
 [source,python]
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/quickjs-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/quickjs-language.adoc
index be1b07df3142..c849fb61469c 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/quickjs-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/quickjs-language.adoc
@@ -75,6 +75,10 @@ with `camel.setHeader` is stored as a `String`, `Number`, 
`Boolean`, `List` or `
 |`camel.log(level, message)` |logs through the 
`org.apache.camel.language.quickjs.script` logger at `trace`, `debug`, `info`, 
`warn` or `error`
 |=======================================================================
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -82,6 +86,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <setBody>
+    <quickjs>camel.setHeader('processed', true); body.toUpperCase()</quickjs>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setBody:
+            expression:
+              quickjs:
+                expression: 'camel.setHeader(''processed'', true); 
body.toUpperCase()'
+        - to:
+            uri: mock:result
+----
+====
+
 The `camel` API is only available while a route expression is evaluated; the 
generic
 `ScriptingLanguage.evaluate(script, bindings, resultType)` entry point has no 
current exchange.
 
@@ -168,6 +202,10 @@ dispatches to the functions listed above.
 
 == Usage
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.language.quickjs.QuickjsLanguage.quickjs;
@@ -183,8 +221,53 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <choice>
+    <when>
+      <quickjs>headers.MyHeader == 'foo'</quickjs>
+      <to uri="mock:foo"/>
+    </when>
+    <otherwise>
+      <to uri="mock:other"/>
+    </otherwise>
+  </choice>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  quickjs:
+                    expression: 'headers.MyHeader == ''foo'''
+                steps:
+                  - to:
+                      uri: mock:foo
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:other
+----
+====
+
 Transform the body with the expression result:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -192,6 +275,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <quickjs>body.toUpperCase()</quickjs>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              quickjs:
+                expression: body.toUpperCase()
+        - to:
+            uri: mock:result
+----
+====
+
 You can load the script from an external resource with the
 `resource:scheme:location` syntax, for example `resource:classpath:myscript.js`
 or `resource:file:/path/to/script.js`.
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spel-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spel-language.adoc
index a1b38768412e..b1b1e41c577f 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spel-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/spel-language.adoc
@@ -118,7 +118,10 @@ use `spel` as an Expression passed in as a parameter
 to the `setBody` method.
 Though if we use the fluent API, we can do this instead:
 
-._Java-only: fluent API for spel expression_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:example")
@@ -126,6 +129,36 @@ from("direct:example")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:example"/>
+  <setBody>
+    <spel>Hello #{request.body}! What a beautiful 
#{request.headers['dayOrNight']}</spel>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:example
+      steps:
+        - setBody:
+            expression:
+              spel:
+                expression: 'Hello #{request.body}! What a beautiful 
#{request.headers[''dayOrNight'']}'
+        - to:
+            uri: mock:result
+----
+====
+
 Notice we now use the `spel` method from the `setBody()` method. And
 this does not require us to statically import the `spel` method.
 
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/typesafe-ai-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/typesafe-ai-language.adoc
index 81376093b9cf..7cd3ee9a3455 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/typesafe-ai-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/typesafe-ai-language.adoc
@@ -57,38 +57,57 @@ default `typesafe-ai:default` endpoint, use 
`camel.component.typesafe-ai.thresho
 Use Camel's generic language expression. The same condition works in Filter, 
Choice, Validate
 and other EIPs accepting a predicate. A non-match retains that EIP's normal 
behavior.
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:filter")
     .filter().language("typesafe-ai", "Does this message request a refund?")
     .to("direct:refund-handler");
-
-from("direct:route").choice()
-    .when().language("typesafe-ai", "Does this message request a refund?")
-        .to("direct:refund-handler")
-    .otherwise().to("direct:general-handler");
 ----
 
+XML::
++
 [source,xml]
 ----
-<filter>
-  <language language="typesafe-ai">Does this message request a 
refund?</language>
-  <to uri="direct:refund-handler"/>
-</filter>
+<route>
+  <from uri="direct:filter"/>
+  <filter>
+    <language language="typesafe-ai">Does this message request a 
refund?</language>
+    <to uri="direct:refund-handler"/>
+  </filter>
+</route>
 ----
 
+YAML::
++
 [source,yaml]
 ----
-- from:
-    uri: direct:filter
-    steps:
-      - filter:
-          expression:
-            language:
-              language: typesafe-ai
-              expression: "Does this message request a refund?"
-          steps:
-            - to: direct:refund-handler
+- route:
+    from:
+      uri: direct:filter
+      steps:
+        - filter:
+            expression:
+              language:
+                language: typesafe-ai
+                expression: "Does this message request a refund?"
+            steps:
+              - to:
+                  uri: direct:refund-handler
+----
+====
+
+In a Choice it is a `when` like any other predicate:
+
+[source,java]
+----
+from("direct:route").choice()
+    .when().language("typesafe-ai", "Does this message request a refund?")
+        .to("direct:refund-handler")
+    .otherwise().to("direct:general-handler");
 ----
 
 XML and YAML use the configured language defaults. Java callers needing 
per-use settings
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wasm-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wasm-language.adoc
index c1532b108878..72208ba9c90e 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wasm-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/wasm-language.adoc
@@ -130,6 +130,10 @@ pub extern fn transform(ptr: u32, len: u32) -> u64 {
 
 Supposing we have compiled a Wasm module containing the function above, then 
it can be called in a Camel Route by its name and module resource location:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:in")
@@ -137,6 +141,34 @@ from("direct:in")
         .wasm("transform", "classpath://functions.wasm");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:in"/>
+  <transform>
+    <wasm module="classpath://functions.wasm">transform</wasm>
+  </transform>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:in
+      steps:
+        - transform:
+            expression:
+              wasm:
+                expression: transform
+                module: classpath://functions.wasm
+----
+====
+
 
 == Dependencies
 
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
index 1dbf51f48015..eadf004803c8 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xpath-language.adoc
@@ -149,8 +149,12 @@ local part. Camel will try to resolve a variable in the 
following steps:
 ==== Example of using variables, header and body in XPath expression
 You can combine headers, properties, body and variables in an XPath expression 
as shown in the example below:
 
-._Java-only: uses Document.class type conversion in setVariable/setHeader_
+The variables and the header are converted to a `Document` (`resultType`), so 
XPath can navigate them:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("timer:java?period=1000&repeatCount=1")
@@ -165,9 +169,86 @@ from("timer:java?period=1000&repeatCount=1")
         .otherwise()
             .log("DIFFERENT")
     .end();
-}
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="timer:java?period=1000&amp;repeatCount=1"/>
+  <setBody>
+    <simple>&lt;dummy&gt;YES&lt;/dummy&gt;</simple>
+  </setBody>
+  <setVariable name="Foo">
+    <simple 
resultType="org.w3c.dom.Document">&lt;hello&gt;&lt;id&gt;123&lt;/id&gt;&lt;/hello&gt;</simple>
+  </setVariable>
+  <setVariable name="Bar">
+    <simple 
resultType="org.w3c.dom.Document">&lt;holla&gt;&lt;id&gt;123&lt;/id&gt;&lt;/holla&gt;</simple>
+  </setVariable>
+  <setHeader name="Baz">
+    <simple 
resultType="org.w3c.dom.Document">&lt;hallo&gt;&lt;id&gt;123&lt;/id&gt;&lt;/hallo&gt;</simple>
+  </setHeader>
+  <choice>
+    <when>
+      <xpath>($Foo/hello/id = $Bar/holla/id) and /dummy='YES' and 
$Baz/hallo/id=123</xpath>
+      <log message="EQUAL"/>
+    </when>
+    <otherwise>
+      <log message="DIFFERENT"/>
+    </otherwise>
+  </choice>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: timer:java
+      parameters:
+        period: 1000
+        repeatCount: 1
+      steps:
+        - setBody:
+            expression:
+              simple:
+                expression: "<dummy>YES</dummy>"
+        - setVariable:
+            name: Foo
+            expression:
+              simple:
+                expression: "<hello><id>123</id></hello>"
+                resultType: org.w3c.dom.Document
+        - setVariable:
+            name: Bar
+            expression:
+              simple:
+                expression: "<holla><id>123</id></holla>"
+                resultType: org.w3c.dom.Document
+        - setHeader:
+            name: Baz
+            expression:
+              simple:
+                expression: "<hallo><id>123</id></hallo>"
+                resultType: org.w3c.dom.Document
+        - choice:
+            when:
+              - expression:
+                  xpath:
+                    expression: "($Foo/hello/id = $Bar/holla/id) and 
/dummy='YES' and $Baz/hallo/id=123"
+                steps:
+                  - log:
+                      message: EQUAL
+            otherwise:
+              steps:
+                - log:
+                    message: DIFFERENT
+----
+====
+
 == Functions
 
 Camel adds the following XPath functions that can be used to access the
@@ -465,12 +546,14 @@ YAML::
 
 == Using namespaces
 
-If you have a standard set of namespaces you wish to work with and wish
-to share them across many XPath expressions, you can use the
-`org.apache.camel.support.builder.Namespaces` when using Java DSL as shown:
-
-._Java-only: Namespaces builder API_
+An XPath expression that uses a namespace prefix needs the namespace declared. 
In Java DSL use
+`org.apache.camel.support.builder.Namespaces`, which is passed to `xpath` as 
the second parameter. In XML DSL
+declare the prefix on a root element (`routes` or `route`), and in YAML DSL 
list the namespaces on the expression:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 Namespaces ns = new Namespaces("c", "http://acme.com/cheese";);
@@ -480,8 +563,41 @@ from("direct:start")
         .to("mock:result");
 ----
 
-Notice how the namespaces are provided to `xpath` with the `ns` variable
-that are passed in as the second parameter.
+XML::
++
+[source,xml]
+----
+<routes xmlns="http://camel.apache.org/schema/xml-io"; 
xmlns:c="http://acme.com/cheese";>
+  <route>
+    <from uri="direct:start"/>
+    <filter>
+      <xpath>/c:person[@name='James']</xpath>
+      <to uri="mock:result"/>
+    </filter>
+  </route>
+</routes>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - filter:
+            expression:
+              xpath:
+                expression: "/c:person[@name='James']"
+                namespace:
+                  - key: c
+                    value: http://acme.com/cheese
+            steps:
+              - to:
+                  uri: mock:result
+----
+====
 
 Each namespace is a key=value pair, where the prefix is the key.
 In the XPath expression then the namespace is used by its prefix, e.g.:
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
index 587f2c96ac40..a716d8d299ea 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xquery-language.adoc
@@ -133,11 +133,14 @@ YAML::
 
 === Using namespaces
 
-If you have a standard set of namespaces you wish to work with and wish
-to share them across many XQuery expressions, you can use the
-`org.apache.camel.support.builder.Namespaces` when using Java DSL as shown:
+An XQuery expression that uses a namespace prefix needs the namespace 
declared. In Java DSL use
+`org.apache.camel.support.builder.Namespaces`, which is passed to `xquery` as 
the second parameter. In XML DSL
+declare the prefix on a root element (`routes` or `route`), and in YAML DSL 
list the namespaces on the expression:
 
-._Java-only: programmatic namespace configuration with Namespaces builder_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 Namespaces ns = new Namespaces("c", "http://acme.com/cheese";);
@@ -147,8 +150,41 @@ from("direct:start")
   .to("mock:result");
 ----
 
-Notice how the namespaces are provided to `xquery` with the `ns` variable
-that are passed in as the second parameter.
+XML::
++
+[source,xml]
+----
+<routes xmlns="http://camel.apache.org/schema/xml-io"; 
xmlns:c="http://acme.com/cheese";>
+  <route>
+    <from uri="direct:start"/>
+    <filter>
+      <xquery>/c:person[@name='James']</xquery>
+      <to uri="mock:result"/>
+    </filter>
+  </route>
+</routes>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - filter:
+            expression:
+              xquery:
+                expression: "/c:person[@name='James']"
+                namespace:
+                  - key: c
+                    value: http://acme.com/cheese
+            steps:
+              - to:
+                  uri: mock:result
+----
+====
 
 Each namespace is a key=value pair, where the prefix is the key.
 In the XQuery expression then the namespace is used by its prefix, e.g.:
@@ -207,6 +243,19 @@ option:
 
 [tabs]
 ====
+Java::
++
+[source,java]
+----
+@BindToRegistry("myNamespaces")
+Namespaces myNamespaces = new Namespaces("c", "http://acme.com/cheese";)
+        .add("w", "http://acme.com/wine";);
+
+from("direct:start")
+    
.filter(expression().xquery("/c:person[@name='James']").namespacesRef("myNamespaces").end())
+    .to("mock:result");
+----
+
 XML::
 +
 [source,xml]
@@ -308,26 +357,93 @@ Notice that xquery will use DOMResult by default, so if 
we want to grab
 the value of the person node, using `text()` we need to tell XQuery to use
 String as the result type, as shown:
 
-._Java-only: specifying result type with String.class parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
-from("direct:start").
-   transform().xquery("/people/person/text()", String.class);
+from("direct:start")
+    .transform().xquery("/people/person/text()", String.class);
+----
+
+XML::
++
+[source,xml]
 ----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <xquery resultType="java.lang.String">/people/person/text()</xquery>
+  </transform>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              xquery:
+                expression: /people/person/text()
+                resultType: java.lang.String
+----
+====
 
 If you want to use Camel variables like headers, you have to explicitly
 declare them in the XQuery expression.
 
+[tabs]
+====
+Java::
++
+[source,java]
+----
+from("direct:start")
+    .transform().xquery("declare variable $in.headers.foo external; element 
item {$in.headers.foo}")
+    .to("mock:result");
+----
+
+XML::
++
 [source,xml]
 ----
-<transform>
+<route>
+  <from uri="direct:start"/>
+  <transform>
     <xquery>
         declare variable $in.headers.foo external;
         element item {$in.headers.foo}
     </xquery>
-</transform>
+  </transform>
+  <to uri="mock:result"/>
+</route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              xquery:
+                expression: |
+                  declare variable $in.headers.foo external;
+                  element item {$in.headers.foo}
+        - to:
+            uri: mock:result
+----
+====
+
 == Loading script from external resource
 
 You can externalize the script and have Apache Camel load it from a resource
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xtokenize-language.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xtokenize-language.adoc
index aee6949120c6..dc07cc5f373e 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xtokenize-language.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/xtokenize-language.adoc
@@ -51,6 +51,18 @@ the `namespacesRef` option:
 
 [tabs]
 ====
+Java::
++
+[source,java]
+----
+@BindToRegistry("myNamespaces")
+Namespaces myNamespaces = new Namespaces("c", "http://acme.com/cheese";);
+
+from("file:inbox")
+    
.split(expression().xtokenize("//c:order").namespacesRef("myNamespaces").end())
+        .to("mock:result");
+----
+
 XML::
 +
 [source,xml]
diff --git 
a/components/camel-ai/camel-typesafe-ai/src/main/docs/typesafe-ai-language.adoc 
b/components/camel-ai/camel-typesafe-ai/src/main/docs/typesafe-ai-language.adoc
index 81376093b9cf..7cd3ee9a3455 100644
--- 
a/components/camel-ai/camel-typesafe-ai/src/main/docs/typesafe-ai-language.adoc
+++ 
b/components/camel-ai/camel-typesafe-ai/src/main/docs/typesafe-ai-language.adoc
@@ -57,38 +57,57 @@ default `typesafe-ai:default` endpoint, use 
`camel.component.typesafe-ai.thresho
 Use Camel's generic language expression. The same condition works in Filter, 
Choice, Validate
 and other EIPs accepting a predicate. A non-match retains that EIP's normal 
behavior.
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:filter")
     .filter().language("typesafe-ai", "Does this message request a refund?")
     .to("direct:refund-handler");
-
-from("direct:route").choice()
-    .when().language("typesafe-ai", "Does this message request a refund?")
-        .to("direct:refund-handler")
-    .otherwise().to("direct:general-handler");
 ----
 
+XML::
++
 [source,xml]
 ----
-<filter>
-  <language language="typesafe-ai">Does this message request a 
refund?</language>
-  <to uri="direct:refund-handler"/>
-</filter>
+<route>
+  <from uri="direct:filter"/>
+  <filter>
+    <language language="typesafe-ai">Does this message request a 
refund?</language>
+    <to uri="direct:refund-handler"/>
+  </filter>
+</route>
 ----
 
+YAML::
++
 [source,yaml]
 ----
-- from:
-    uri: direct:filter
-    steps:
-      - filter:
-          expression:
-            language:
-              language: typesafe-ai
-              expression: "Does this message request a refund?"
-          steps:
-            - to: direct:refund-handler
+- route:
+    from:
+      uri: direct:filter
+      steps:
+        - filter:
+            expression:
+              language:
+                language: typesafe-ai
+                expression: "Does this message request a refund?"
+            steps:
+              - to:
+                  uri: direct:refund-handler
+----
+====
+
+In a Choice it is a `when` like any other predicate:
+
+[source,java]
+----
+from("direct:route").choice()
+    .when().language("typesafe-ai", "Does this message request a refund?")
+        .to("direct:refund-handler")
+    .otherwise().to("direct:general-handler");
 ----
 
 XML and YAML use the configured language defaults. Java callers needing 
per-use settings
diff --git a/components/camel-bean/src/main/docs/bean-language.adoc 
b/components/camel-bean/src/main/docs/bean-language.adoc
index b06e5b6f98f9..b48c648af39f 100644
--- a/components/camel-bean/src/main/docs/bean-language.adoc
+++ b/components/camel-bean/src/main/docs/bean-language.adoc
@@ -122,7 +122,10 @@ that are not registered in the 
xref:manual::registry.adoc[Registry].
 Camel can instantiate the bean of a given type and invoke the method
 or invoke the method on an already existing instance.
 
-._Java-only: invoking a bean by class type_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("activemq:topic:OrdersTopic")
@@ -130,6 +133,38 @@ from("activemq:topic:OrdersTopic")
   .to("activemq:BigSpendersQueue");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="activemq:topic:OrdersTopic"/>
+  <filter>
+    <method beanType="com.foo.MyBean" method="isGoldCustomer"/>
+    <to uri="activemq:BigSpendersQueue"/>
+  </filter>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: activemq:topic:OrdersTopic
+      steps:
+        - filter:
+            expression:
+              method:
+                beanType: com.foo.MyBean
+                method: isGoldCustomer
+            steps:
+              - to:
+                  uri: activemq:BigSpendersQueue
+----
+====
+
 The first parameter can also be an existing instance of a Bean such as:
 
 ._Java-only: invoking a method on an existing bean instance_
diff --git a/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc 
b/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc
index f865494ce3de..5734f50880d5 100644
--- a/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc
+++ b/components/camel-datasonnet/src/main/docs/datasonnet-language.adoc
@@ -48,23 +48,44 @@ Java::
 +
 [source,java]
 ----
-datasonnet("body.foo", String.class);
+from("direct:start")
+    .setBody(datasonnet("body.foo", String.class))
+    .to("mock:result");
 ----
 
 XML::
 +
 [source,xml]
 ----
-<datasonnet resultType="java.lang.String">body.foo</datasonnet>
+<route>
+  <from uri="direct:start"/>
+  <setBody>
+    <datasonnet resultType="java.lang.String">body.foo</datasonnet>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
 ----
-+
-[NOTE]
-=====
-In XML DSL you use the `resultType` attribute to provide a fully qualified 
class name.
-=====
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setBody:
+            expression:
+              datasonnet:
+                expression: body.foo
+                resultType: java.lang.String
+        - to:
+            uri: mock:result
+----
 ====
 
+In XML and YAML DSL, `resultType` is the fully qualified class name.
+
 If the expression results in an array, or an object, you can instruct the 
expression to return you `List.class`
 or `Map.class`, respectively. However, you must also set the output media type 
to `application/x-java-object`.
 
diff --git a/components/camel-groovy/src/main/docs/groovy-language.adoc 
b/components/camel-groovy/src/main/docs/groovy-language.adoc
index 9d51d0d55a13..271621857a14 100644
--- a/components/camel-groovy/src/main/docs/groovy-language.adoc
+++ b/components/camel-groovy/src/main/docs/groovy-language.adoc
@@ -143,28 +143,44 @@ to determine if any line items are over $100:
 
 [tabs]
 ====
-
 Java::
 +
 [source,java]
 ----
-from("queue:foo")
+from("seda:foo")
     .filter(groovy("body.lineItems.any { i -> i.value > 100 }"))
-        .to("queue:bar")
+        .to("seda:bar");
 ----
 
-XML DSL::
+XML::
 +
 [source,xml]
 ----
 <route>
-    <from uri="queue:foo"/>
+    <from uri="seda:foo"/>
     <filter>
-        <groovy>body.lineItems.any { i -> i.value > 100 }</groovy>
-        <to uri="queue:bar"/>
+        <groovy>body.lineItems.any { i -> i.value &gt; 100 }</groovy>
+        <to uri="seda:bar"/>
     </filter>
 </route>
 ----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: seda:foo
+      steps:
+        - filter:
+            expression:
+              groovy:
+                expression: "body.lineItems.any { i -> i.value > 100 }"
+            steps:
+              - to:
+                  uri: seda:bar
+----
 ====
 
 == Pre compiling shared groovy scripts
diff --git a/components/camel-hl7/src/main/docs/hl7terser-language.adoc 
b/components/camel-hl7/src/main/docs/hl7terser-language.adoc
index 964b1e278861..aa7736f40fcf 100644
--- a/components/camel-hl7/src/main/docs/hl7terser-language.adoc
+++ b/components/camel-hl7/src/main/docs/hl7terser-language.adoc
@@ -29,7 +29,10 @@ include::partial$language-options.adoc[]
 In the example below, we want to set a header with the patent id
 from field QRD-8 in the QRY_A19 message:
 
-._Java-only: HL7 Terser expression builder API for extracting and filtering 
fields_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.component.hl7.HL7.hl7terser;
@@ -38,8 +41,45 @@ import static org.apache.camel.component.hl7.HL7.hl7terser;
 from("direct:test1")
    .setHeader("PATIENT_ID", hl7terser("QRD-8(0)-1"))
    .to("mock:test1");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:test1"/>
+  <setHeader name="PATIENT_ID">
+    <hl7terser>QRD-8(0)-1</hl7terser>
+  </setHeader>
+  <to uri="mock:test1"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:test1
+      steps:
+        - setHeader:
+            name: PATIENT_ID
+            expression:
+              hl7terser:
+                expression: QRD-8(0)-1
+        - to:
+            uri: mock:test1
+----
+====
+
+In Java DSL the expression can also be compared with the predicate builder, 
for example to continue processing if
+the extracted field equals a message header:
 
-// continue processing if extracted field equals a message header
+._Java-only: HL7 Terser expression builder API for filtering_
+[source,java]
+----
 from("direct:test2")
    .filter(hl7terser("QRD-8(0)-1").isEqualTo(header("PATIENT_ID"))
    .to("mock:test2");
diff --git a/components/camel-jactl/src/main/docs/jactl-language.adoc 
b/components/camel-jactl/src/main/docs/jactl-language.adoc
index c122964c76a8..6e25278ea4aa 100644
--- a/components/camel-jactl/src/main/docs/jactl-language.adoc
+++ b/components/camel-jactl/src/main/docs/jactl-language.adoc
@@ -44,6 +44,10 @@ For example with Maven, in the `dependencies` section of 
your `pom.xml`:
 
 == Usage
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.language.jactl.JactlLanguage.jactl;
@@ -56,8 +60,43 @@ public class MyRouteBuilder extends RouteBuilder {
             .to("direct:big-orders");
     }
 }
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:orders"/>
+  <filter>
+    <jactl>body.amount &gt; 100 &amp;&amp; body.status == 'NEW'</jactl>
+    <to uri="direct:big-orders"/>
+  </filter>
+</route>
+----
 
-// Or via the Language SPI:
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:orders
+      steps:
+        - filter:
+            expression:
+              jactl:
+                expression: 'body.amount > 100 && body.status == ''NEW'''
+            steps:
+              - to:
+                  uri: direct:big-orders
+----
+====
+
+Or via the Language SPI:
+
+[source,java]
+----
 Language jactl = camelContext.resolveLanguage("jactl");
 Predicate p    = jactl.createPredicate("body.age > 20");
 Expression e   = jactl.createExpression("'Hello ' + body.name");
diff --git a/components/camel-joor/src/main/docs/java-language.adoc 
b/components/camel-joor/src/main/docs/java-language.adoc
index d108a26a281b..469aef195794 100644
--- a/components/camel-joor/src/main/docs/java-language.adoc
+++ b/components/camel-joor/src/main/docs/java-language.adoc
@@ -117,7 +117,10 @@ And this bean is registered with the name `myEcho` in the 
Camel registry.
 
 The Java code can then inject this bean directly in the script where the bean 
is in use:
 
-._Java-only: Java DSL route with bean injection syntax_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -125,6 +128,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <java>'Hello ' + #bean:myEcho.echo(bodyAs(String))</java>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: '''Hello '' + #bean:myEcho.echo(bodyAs(String))'
+        - to:
+            uri: mock:result
+----
+====
+
 Now this code may seem a bit magic, but what happens is that the `myEcho` bean 
is injected via a constructor, and then called directly in the script, so it is 
as fast as possible.
 
 Under the hood, Camel Java generates the following source code compiled once:
@@ -149,7 +182,10 @@ public class JoorScript1 implements 
org.apache.camel.language.joor.JoorMethod {
 
 You can also store a reference to the bean in a variable which would more 
resemble how you would code in Java
 
-._Java-only: Java DSL route with bean variable reference_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -157,6 +193,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <java>var bean = #bean:myEcho; return 'Hello ' + 
bean.echo(bodyAs(String))</java>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: 'var bean = #bean:myEcho; return ''Hello '' + 
bean.echo(bodyAs(String))'
+        - to:
+            uri: mock:result
+----
+====
+
 Notice how we declare the bean as if it is a local variable via `var bean = 
#bean:myEcho`.
 When doing this we must use a different name as `myEcho` is the variable used 
by the dependency injection.
 Therefore, we use _bean_ as name in the script.
@@ -199,14 +265,47 @@ echo()=bodyAs(String) + bodyAs(String)
 
 Which allows using `echo()` in the jOOR language script such as:
 
-._Java-only: Java DSL route using alias function_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:hello")
-    .transform(java("'Hello ' + echo()"))
+    .transform().java("'Hello ' + echo()")
     .log("You said ${body}");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:hello"/>
+  <transform>
+    <java>'Hello ' + echo()</java>
+  </transform>
+  <log message="You said ${body}"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:hello
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: '''Hello '' + echo()'
+        - log:
+            message: 'You said ${body}'
+----
+====
+
 The `echo()` alias will be replaced with its value resulting in a script as:
 
 ._Java-only: expanded alias result in Java DSL_
@@ -284,23 +383,50 @@ It is possible to include multiple statements.
 The code below shows an example where the `user` header is retrieved in a 
first statement.
 And then, in a second statement we return a value whether the user is `null` 
or not.
 
-._Java-only: Java DSL route with multi-statement expression_
+In Java DSL the strings inside the script must be escaped (`\"`), so it is 
easier to write them in single quotes,
+which the Java language turns into double quotes (`singleQuotes`, on by 
default). In XML and YAML DSL single quotes
+work the same:
+
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("seda:orders")
-  .transform().java("var user = message.getHeader(\"user\"); return user != 
null ? \"User: \" + user : \"No user exists\";")
-  .to("seda:user");
+    .transform().java("var user = message.getHeader('user'); return user != 
null ? 'User: ' + user : 'No user exists';")
+    .to("seda:user");
 ----
 
-Notice how we have to quote strings in strings, and that is annoying, so 
instead we can use single quotes:
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="seda:orders"/>
+  <transform>
+    <java>var user = message.getHeader('user'); return user != null ? 'User: ' 
+ user : 'No user exists';</java>
+  </transform>
+  <to uri="seda:user"/>
+</route>
+----
 
-._Java-only: Java DSL route using single-quote syntax_
-[source,java]
+YAML::
++
+[source,yaml]
 ----
-from("seda:orders")
-  .transform().java("var user = message.getHeader('user'); return user != null 
? 'User: ' + user : 'No user exists';")
-  .to("seda:user");
+- route:
+    from:
+      uri: seda:orders
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: 'var user = message.getHeader(''user''); return 
user != null ? ''User: '' + user : ''No user exists'';'
+        - to:
+            uri: seda:user
 ----
+====
 
 === Hot re-load
 
@@ -308,33 +434,52 @@ You can turn off pre-compilation for the Java language 
and then Camel will recom
 (an inline script is still only compiled once, on first use, as its text 
cannot change).
 You can externalize the code into a resource file, which will be reloaded on 
each message as shown:
 
-._Java-only: programmatic hot-reload configuration with Java DSL_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
-JavaLanguage java = (JavaLanguage) context.resolveLanguage("java");
-java.setPreCompile(false);
-
 from("jms:incoming")
-    .transform().java("resource:file:src/main/resources/orders.java")
+    
.transform(expression().java("resource:file:src/main/resources/orders.java").preCompile(false).end())
     .to("jms:orders");
 ----
 
-Here the Java code is externalized into the file 
`src/main/resources/orders.java` which allows you to edit this source file 
while running the Camel application and try the changes with hot-reloading.
-
-In XML DSL it's easier because you can turn off pre-compilation in the 
`<java>` XML element:
-
-._XML-only:_
+XML::
++
 [source,xml]
 ----
 <route>
-    <from uri="jms:incoming"/>
-    <transform>
-      <java 
preCompile="false">resource:file:src/main/resources/orders.java</java>
-    </transform>
-    <to uri="jms:orders"/>
+  <from uri="jms:incoming"/>
+  <transform>
+    <java 
preCompile="false">resource:file:src/main/resources/orders.java</java>
+  </transform>
+  <to uri="jms:orders"/>
 </route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: jms:incoming
+      steps:
+        - transform:
+            expression:
+              java:
+                expression: resource:file:src/main/resources/orders.java
+                preCompile: false
+        - to:
+            uri: jms:orders
+----
+====
+
+Here the Java code is externalized into the file 
`src/main/resources/orders.java` which allows you to edit this source
+file while running the Camel application and try the changes with 
hot-reloading. Pre-compilation can also be turned
+off for every script on the language, with `setPreCompile(false)` on the 
`JavaLanguage` (`context.resolveLanguage("java")`).
+
 === Lambda-based AggregationStrategy
 
 The Java language has special support for defining an 
`org.apache.camel.AggregationStrategy` as a lambda expression.
diff --git a/components/camel-jq/src/main/docs/jq-language.adoc 
b/components/camel-jq/src/main/docs/jq-language.adoc
index b98597ad069a..6f4dc98ce7b0 100644
--- a/components/camel-jq/src/main/docs/jq-language.adoc
+++ b/components/camel-jq/src/main/docs/jq-language.adoc
@@ -31,7 +31,10 @@ By default, JQ uses the message body as the input source. 
However, you can also
 
 For example, to count the number of books from a JSON document that was stored 
in a header named `books` you can do:
 
-._Java-only: using header as JQ input source_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -40,6 +43,39 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <setHeader name="numberOfBooks">
+    <jq source="header:books" resultType="int">.store.books | length</jq>
+  </setHeader>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setHeader:
+            name: numberOfBooks
+            expression:
+              jq:
+                expression: .store.books | length
+                resultType: int
+                source: header:books
+        - to:
+            uri: mock:result
+----
+====
+
 === Camel supplied JQ Functions
 
 NOTE: JQ comes with about a hundred built-in functions, and you can see many 
examples from https://jqlang.github.io/jq/[JQ] documentation.
@@ -54,8 +90,11 @@ The camel-jq adds the following functions:
 
 For example, to set the property foo with the value from the Message header 
`MyHeader':
 
-._Java-only: using the header function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -63,10 +102,43 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = header("MyHeader")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = header("MyHeader")'
+        - to:
+            uri: mock:result
+----
+====
+
 Or from the exchange property:
 
-._Java-only: using the property function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -74,10 +146,43 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = property("MyProperty")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = property("MyProperty")'
+        - to:
+            uri: mock:result
+----
+====
+
 And using a constant value
 
-._Java-only: using the constant function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -85,10 +190,43 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = constant("Hello World")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = constant("Hello World")'
+        - to:
+            uri: mock:result
+----
+====
+
 Or using an exchange variable:
 
-._Java-only: using the variable function_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -96,11 +234,44 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = variable("MyVar")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = variable("MyVar")'
+        - to:
+            uri: mock:result
+----
+====
+
 The `header`, `property` and `variable` functions also support returning a 
default value in case the key does not exist,
 as shown in the following:
 
-._Java-only: using the header function with a default value_
-[source, java]
+[tabs]
+====
+Java::
++
+[source,java]
 ----
 from("direct:start")
     .transform()
@@ -108,6 +279,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <jq>.foo = header("MyHeader", "MyDefaultValue")</jq>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              jq:
+                expression: '.foo = header("MyHeader", "MyDefaultValue")'
+        - to:
+            uri: mock:result
+----
+====
+
 
 === Transforming a JSon message
 
diff --git a/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc 
b/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
index 24309d4a6c97..835d7515d479 100644
--- a/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
+++ b/components/camel-jsonpath/src/main/docs/jsonpath-language.adoc
@@ -204,6 +204,28 @@ XML DSL::
 </route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  jsonpath:
+                    expression: person.middlename
+                    suppressExceptions: true
+                steps:
+                  - to:
+                      uri: mock:middle
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:other
+----
 ====
 
 This option is also available on the `@JsonPath` annotation.
@@ -388,21 +410,58 @@ You can turn off support for inlined Simple expression by 
setting the option `al
 
 [tabs]
 ====
-
 Java::
 +
 [source,java]
 ----
-.when().jsonpath("$.store.book[?(@.price < 10)]", false, false)
+from("direct:start")
+    .choice()
+        .when(expression().jsonpath("$.store.book[?(@.price < 
10)]").allowSimple(false).end())
+            .to("mock:cheap")
+        .otherwise()
+            .to("mock:expensive");
 ----
 
-XML DSL::
+XML::
 +
 [source,xml]
 ----
-<jsonpath allowSimple="false">$.store.book[?(@.price &lt; 10)]</jsonpath>
+<route>
+  <from uri="direct:start"/>
+  <choice>
+    <when>
+      <jsonpath allowSimple="false">$.store.book[?(@.price &lt; 10)]</jsonpath>
+      <to uri="mock:cheap"/>
+    </when>
+    <otherwise>
+      <to uri="mock:expensive"/>
+    </otherwise>
+  </choice>
+</route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  jsonpath:
+                    expression: "$.store.book[?(@.price < 10)]"
+                    allowSimple: false
+                steps:
+                  - to:
+                      uri: mock:cheap
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:expensive
+----
 ====
 
 === Using variables as source
@@ -492,7 +551,10 @@ can specify the encoding in the header 
`CamelJsonPathJsonEncoding`.
 
 You can use JSONPath to split a JSON document, such as:
 
-._Java-only: Java DSL with class literal parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -500,6 +562,38 @@ from("direct:start")
     .to("log:book");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <split>
+    <jsonpath resultType="java.util.List">$.store.book[*]</jsonpath>
+    <to uri="log:book"/>
+  </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - split:
+            expression:
+              jsonpath:
+                expression: "$.store.book[*]"
+                resultType: java.util.List
+            steps:
+              - to:
+                  uri: log:book
+----
+====
+
 IMPORTANT: Notice how we specify `List.class` as the result-type. This is 
because if there is only
 a single element (only 1 book), then jsonpath will return the single entity as 
a `Map` instead of `List<Map>`.
 Therefore, we tell Camel that the result should always be a `List`, and Camel 
will then automatic wrap the
@@ -509,7 +603,10 @@ Then each book is logged, however the message body is a 
`Map` instance. Sometime
 you may want to output this as plain String JSON value instead, which can be 
done
 with the `writeAsString` option as shown:
 
-._Java-only: Java DSL with class literal parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -517,13 +614,49 @@ from("direct:start")
     .to("log:book");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <split>
+    <jsonpath resultType="java.util.List" 
writeAsString="true">$.store.book[*]</jsonpath>
+    <to uri="log:book"/>
+  </split>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - split:
+            expression:
+              jsonpath:
+                expression: "$.store.book[*]"
+                resultType: java.util.List
+                writeAsString: true
+            steps:
+              - to:
+                  uri: log:book
+----
+====
+
 Then each book is logged as a String JSON value.
 
 === Unpack a single-element array into an object
 
 It is possible to unpack a single-element array into an object:
 
-._Java-only: Java DSL with class literal parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -531,6 +664,38 @@ from("direct:start")
     .to("log:book");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <setBody>
+    <jsonpath unpackArray="true" 
resultType="com.example.Book">$.store.book</jsonpath>
+  </setBody>
+  <to uri="log:book"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setBody:
+            expression:
+              jsonpath:
+                expression: $.store.book
+                unpackArray: true
+                resultType: com.example.Book
+        - to:
+            uri: log:book
+----
+====
+
 If a book array contains only one book, it will be converted into a Book 
object.
 
 === Using header as input
@@ -541,20 +706,10 @@ by specifying the `source` option.
 For example, to count the number of books from a JSON document that
 was stored in a header named `books` you can do:
 
-._Java-only: Java fluent expression builder API_
-[source,java]
-----
-var jp = expression().jsonpath("$..store.book.length()").resultType(int.class)
-        .source("header:books").end();
-
-from("direct:start")
-    .setHeader("numberOfBooks", jp)
-    .to("mock:result");
-----
-
-And you can also inline the expression:
-
-._Java-only: Java fluent expression builder API_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -563,14 +718,8 @@ from("direct:start")
     .to("mock:result");
 ----
 
-In the `jsonpath` expression above we specify the name of the header as 
`books`,
-and we also told that we wanted the result to be converted as an integer by 
`int.class`.
-
-TIP: You can also use `variable:` as source prefix to refer to an Exchange 
variable instead of a header.
-
-The same example in XML DSL would be easier to do:
-
-._XML-only:_
+XML::
++
 [source,xml]
 ----
 <route>
@@ -582,6 +731,30 @@ The same example in XML DSL would be easier to do:
 </route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setHeader:
+            name: numberOfBooks
+            expression:
+              jsonpath:
+                expression: $..store.book.length()
+                source: header:books
+                resultType: int
+        - to:
+            uri: mock:result
+----
+====
+
+Here the name of the header is `books`, and the result is converted to an 
integer (`resultType`).
+
+TIP: You can also use `variable:` as source prefix to refer to an Exchange 
variable instead of a header.
+
 === Transforming a JSon message
 
 For basic JSon transformation where you have a fixed structure, you can 
represent with a combination of using
diff --git a/components/camel-python3/src/main/docs/python3-language.adoc 
b/components/camel-python3/src/main/docs/python3-language.adoc
index b30207296c2d..68b82eb9bd74 100644
--- a/components/camel-python3/src/main/docs/python3-language.adoc
+++ b/components/camel-python3/src/main/docs/python3-language.adoc
@@ -97,6 +97,10 @@ camelContext.getRegistry().bind("python3", python3);
 
 == Usage
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.language.python3.Python3Language.python3;
@@ -112,6 +116,47 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <choice>
+    <when>
+      <python3>body == 'Hello'</python3>
+      <to uri="mock:hello"/>
+    </when>
+    <otherwise>
+      <to uri="mock:other"/>
+    </otherwise>
+  </choice>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  python3:
+                    expression: 'body == ''Hello'''
+                steps:
+                  - to:
+                      uri: mock:hello
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:other
+----
+====
+
 Python 3 syntax is supported, including f-strings:
 
 [source,python]
diff --git a/components/camel-quickjs/src/main/docs/quickjs-language.adoc 
b/components/camel-quickjs/src/main/docs/quickjs-language.adoc
index be1b07df3142..c849fb61469c 100644
--- a/components/camel-quickjs/src/main/docs/quickjs-language.adoc
+++ b/components/camel-quickjs/src/main/docs/quickjs-language.adoc
@@ -75,6 +75,10 @@ with `camel.setHeader` is stored as a `String`, `Number`, 
`Boolean`, `List` or `
 |`camel.log(level, message)` |logs through the 
`org.apache.camel.language.quickjs.script` logger at `trace`, `debug`, `info`, 
`warn` or `error`
 |=======================================================================
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -82,6 +86,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <setBody>
+    <quickjs>camel.setHeader('processed', true); body.toUpperCase()</quickjs>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - setBody:
+            expression:
+              quickjs:
+                expression: 'camel.setHeader(''processed'', true); 
body.toUpperCase()'
+        - to:
+            uri: mock:result
+----
+====
+
 The `camel` API is only available while a route expression is evaluated; the 
generic
 `ScriptingLanguage.evaluate(script, bindings, resultType)` entry point has no 
current exchange.
 
@@ -168,6 +202,10 @@ dispatches to the functions listed above.
 
 == Usage
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 import static org.apache.camel.language.quickjs.QuickjsLanguage.quickjs;
@@ -183,8 +221,53 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <choice>
+    <when>
+      <quickjs>headers.MyHeader == 'foo'</quickjs>
+      <to uri="mock:foo"/>
+    </when>
+    <otherwise>
+      <to uri="mock:other"/>
+    </otherwise>
+  </choice>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - choice:
+            when:
+              - expression:
+                  quickjs:
+                    expression: 'headers.MyHeader == ''foo'''
+                steps:
+                  - to:
+                      uri: mock:foo
+            otherwise:
+              steps:
+                - to:
+                    uri: mock:other
+----
+====
+
 Transform the body with the expression result:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:start")
@@ -192,6 +275,36 @@ from("direct:start")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <quickjs>body.toUpperCase()</quickjs>
+  </transform>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              quickjs:
+                expression: body.toUpperCase()
+        - to:
+            uri: mock:result
+----
+====
+
 You can load the script from an external resource with the
 `resource:scheme:location` syntax, for example `resource:classpath:myscript.js`
 or `resource:file:/path/to/script.js`.
diff --git a/components/camel-saxon/src/main/docs/xquery-language.adoc 
b/components/camel-saxon/src/main/docs/xquery-language.adoc
index 587f2c96ac40..a716d8d299ea 100644
--- a/components/camel-saxon/src/main/docs/xquery-language.adoc
+++ b/components/camel-saxon/src/main/docs/xquery-language.adoc
@@ -133,11 +133,14 @@ YAML::
 
 === Using namespaces
 
-If you have a standard set of namespaces you wish to work with and wish
-to share them across many XQuery expressions, you can use the
-`org.apache.camel.support.builder.Namespaces` when using Java DSL as shown:
+An XQuery expression that uses a namespace prefix needs the namespace 
declared. In Java DSL use
+`org.apache.camel.support.builder.Namespaces`, which is passed to `xquery` as 
the second parameter. In XML DSL
+declare the prefix on a root element (`routes` or `route`), and in YAML DSL 
list the namespaces on the expression:
 
-._Java-only: programmatic namespace configuration with Namespaces builder_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 Namespaces ns = new Namespaces("c", "http://acme.com/cheese";);
@@ -147,8 +150,41 @@ from("direct:start")
   .to("mock:result");
 ----
 
-Notice how the namespaces are provided to `xquery` with the `ns` variable
-that are passed in as the second parameter.
+XML::
++
+[source,xml]
+----
+<routes xmlns="http://camel.apache.org/schema/xml-io"; 
xmlns:c="http://acme.com/cheese";>
+  <route>
+    <from uri="direct:start"/>
+    <filter>
+      <xquery>/c:person[@name='James']</xquery>
+      <to uri="mock:result"/>
+    </filter>
+  </route>
+</routes>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - filter:
+            expression:
+              xquery:
+                expression: "/c:person[@name='James']"
+                namespace:
+                  - key: c
+                    value: http://acme.com/cheese
+            steps:
+              - to:
+                  uri: mock:result
+----
+====
 
 Each namespace is a key=value pair, where the prefix is the key.
 In the XQuery expression then the namespace is used by its prefix, e.g.:
@@ -207,6 +243,19 @@ option:
 
 [tabs]
 ====
+Java::
++
+[source,java]
+----
+@BindToRegistry("myNamespaces")
+Namespaces myNamespaces = new Namespaces("c", "http://acme.com/cheese";)
+        .add("w", "http://acme.com/wine";);
+
+from("direct:start")
+    
.filter(expression().xquery("/c:person[@name='James']").namespacesRef("myNamespaces").end())
+    .to("mock:result");
+----
+
 XML::
 +
 [source,xml]
@@ -308,26 +357,93 @@ Notice that xquery will use DOMResult by default, so if 
we want to grab
 the value of the person node, using `text()` we need to tell XQuery to use
 String as the result type, as shown:
 
-._Java-only: specifying result type with String.class parameter_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
-from("direct:start").
-   transform().xquery("/people/person/text()", String.class);
+from("direct:start")
+    .transform().xquery("/people/person/text()", String.class);
+----
+
+XML::
++
+[source,xml]
 ----
+<route>
+  <from uri="direct:start"/>
+  <transform>
+    <xquery resultType="java.lang.String">/people/person/text()</xquery>
+  </transform>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              xquery:
+                expression: /people/person/text()
+                resultType: java.lang.String
+----
+====
 
 If you want to use Camel variables like headers, you have to explicitly
 declare them in the XQuery expression.
 
+[tabs]
+====
+Java::
++
+[source,java]
+----
+from("direct:start")
+    .transform().xquery("declare variable $in.headers.foo external; element 
item {$in.headers.foo}")
+    .to("mock:result");
+----
+
+XML::
++
 [source,xml]
 ----
-<transform>
+<route>
+  <from uri="direct:start"/>
+  <transform>
     <xquery>
         declare variable $in.headers.foo external;
         element item {$in.headers.foo}
     </xquery>
-</transform>
+  </transform>
+  <to uri="mock:result"/>
+</route>
 ----
 
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - transform:
+            expression:
+              xquery:
+                expression: |
+                  declare variable $in.headers.foo external;
+                  element item {$in.headers.foo}
+        - to:
+            uri: mock:result
+----
+====
+
 == Loading script from external resource
 
 You can externalize the script and have Apache Camel load it from a resource
diff --git 
a/components/camel-spring-parent/camel-spring/src/main/docs/spel-language.adoc 
b/components/camel-spring-parent/camel-spring/src/main/docs/spel-language.adoc
index a1b38768412e..b1b1e41c577f 100644
--- 
a/components/camel-spring-parent/camel-spring/src/main/docs/spel-language.adoc
+++ 
b/components/camel-spring-parent/camel-spring/src/main/docs/spel-language.adoc
@@ -118,7 +118,10 @@ use `spel` as an Expression passed in as a parameter
 to the `setBody` method.
 Though if we use the fluent API, we can do this instead:
 
-._Java-only: fluent API for spel expression_
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:example")
@@ -126,6 +129,36 @@ from("direct:example")
     .to("mock:result");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:example"/>
+  <setBody>
+    <spel>Hello #{request.body}! What a beautiful 
#{request.headers['dayOrNight']}</spel>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:example
+      steps:
+        - setBody:
+            expression:
+              spel:
+                expression: 'Hello #{request.body}! What a beautiful 
#{request.headers[''dayOrNight'']}'
+        - to:
+            uri: mock:result
+----
+====
+
 Notice we now use the `spel` method from the `setBody()` method. And
 this does not require us to statically import the `spel` method.
 
diff --git a/components/camel-stax/src/main/docs/xtokenize-language.adoc 
b/components/camel-stax/src/main/docs/xtokenize-language.adoc
index aee6949120c6..dc07cc5f373e 100644
--- a/components/camel-stax/src/main/docs/xtokenize-language.adoc
+++ b/components/camel-stax/src/main/docs/xtokenize-language.adoc
@@ -51,6 +51,18 @@ the `namespacesRef` option:
 
 [tabs]
 ====
+Java::
++
+[source,java]
+----
+@BindToRegistry("myNamespaces")
+Namespaces myNamespaces = new Namespaces("c", "http://acme.com/cheese";);
+
+from("file:inbox")
+    
.split(expression().xtokenize("//c:order").namespacesRef("myNamespaces").end())
+        .to("mock:result");
+----
+
 XML::
 +
 [source,xml]
diff --git a/components/camel-wasm/src/main/docs/wasm-language.adoc 
b/components/camel-wasm/src/main/docs/wasm-language.adoc
index c1532b108878..72208ba9c90e 100644
--- a/components/camel-wasm/src/main/docs/wasm-language.adoc
+++ b/components/camel-wasm/src/main/docs/wasm-language.adoc
@@ -130,6 +130,10 @@ pub extern fn transform(ptr: u32, len: u32) -> u64 {
 
 Supposing we have compiled a Wasm module containing the function above, then 
it can be called in a Camel Route by its name and module resource location:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("direct:in")
@@ -137,6 +141,34 @@ from("direct:in")
         .wasm("transform", "classpath://functions.wasm");
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:in"/>
+  <transform>
+    <wasm module="classpath://functions.wasm">transform</wasm>
+  </transform>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:in
+      steps:
+        - transform:
+            expression:
+              wasm:
+                expression: transform
+                module: classpath://functions.wasm
+----
+====
+
 
 == Dependencies
 
diff --git a/components/camel-xpath/src/main/docs/xpath-language.adoc 
b/components/camel-xpath/src/main/docs/xpath-language.adoc
index 1dbf51f48015..eadf004803c8 100644
--- a/components/camel-xpath/src/main/docs/xpath-language.adoc
+++ b/components/camel-xpath/src/main/docs/xpath-language.adoc
@@ -149,8 +149,12 @@ local part. Camel will try to resolve a variable in the 
following steps:
 ==== Example of using variables, header and body in XPath expression
 You can combine headers, properties, body and variables in an XPath expression 
as shown in the example below:
 
-._Java-only: uses Document.class type conversion in setVariable/setHeader_
+The variables and the header are converted to a `Document` (`resultType`), so 
XPath can navigate them:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 from("timer:java?period=1000&repeatCount=1")
@@ -165,9 +169,86 @@ from("timer:java?period=1000&repeatCount=1")
         .otherwise()
             .log("DIFFERENT")
     .end();
-}
 ----
 
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="timer:java?period=1000&amp;repeatCount=1"/>
+  <setBody>
+    <simple>&lt;dummy&gt;YES&lt;/dummy&gt;</simple>
+  </setBody>
+  <setVariable name="Foo">
+    <simple 
resultType="org.w3c.dom.Document">&lt;hello&gt;&lt;id&gt;123&lt;/id&gt;&lt;/hello&gt;</simple>
+  </setVariable>
+  <setVariable name="Bar">
+    <simple 
resultType="org.w3c.dom.Document">&lt;holla&gt;&lt;id&gt;123&lt;/id&gt;&lt;/holla&gt;</simple>
+  </setVariable>
+  <setHeader name="Baz">
+    <simple 
resultType="org.w3c.dom.Document">&lt;hallo&gt;&lt;id&gt;123&lt;/id&gt;&lt;/hallo&gt;</simple>
+  </setHeader>
+  <choice>
+    <when>
+      <xpath>($Foo/hello/id = $Bar/holla/id) and /dummy='YES' and 
$Baz/hallo/id=123</xpath>
+      <log message="EQUAL"/>
+    </when>
+    <otherwise>
+      <log message="DIFFERENT"/>
+    </otherwise>
+  </choice>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: timer:java
+      parameters:
+        period: 1000
+        repeatCount: 1
+      steps:
+        - setBody:
+            expression:
+              simple:
+                expression: "<dummy>YES</dummy>"
+        - setVariable:
+            name: Foo
+            expression:
+              simple:
+                expression: "<hello><id>123</id></hello>"
+                resultType: org.w3c.dom.Document
+        - setVariable:
+            name: Bar
+            expression:
+              simple:
+                expression: "<holla><id>123</id></holla>"
+                resultType: org.w3c.dom.Document
+        - setHeader:
+            name: Baz
+            expression:
+              simple:
+                expression: "<hallo><id>123</id></hallo>"
+                resultType: org.w3c.dom.Document
+        - choice:
+            when:
+              - expression:
+                  xpath:
+                    expression: "($Foo/hello/id = $Bar/holla/id) and 
/dummy='YES' and $Baz/hallo/id=123"
+                steps:
+                  - log:
+                      message: EQUAL
+            otherwise:
+              steps:
+                - log:
+                    message: DIFFERENT
+----
+====
+
 == Functions
 
 Camel adds the following XPath functions that can be used to access the
@@ -465,12 +546,14 @@ YAML::
 
 == Using namespaces
 
-If you have a standard set of namespaces you wish to work with and wish
-to share them across many XPath expressions, you can use the
-`org.apache.camel.support.builder.Namespaces` when using Java DSL as shown:
-
-._Java-only: Namespaces builder API_
+An XPath expression that uses a namespace prefix needs the namespace declared. 
In Java DSL use
+`org.apache.camel.support.builder.Namespaces`, which is passed to `xpath` as 
the second parameter. In XML DSL
+declare the prefix on a root element (`routes` or `route`), and in YAML DSL 
list the namespaces on the expression:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
 Namespaces ns = new Namespaces("c", "http://acme.com/cheese";);
@@ -480,8 +563,41 @@ from("direct:start")
         .to("mock:result");
 ----
 
-Notice how the namespaces are provided to `xpath` with the `ns` variable
-that are passed in as the second parameter.
+XML::
++
+[source,xml]
+----
+<routes xmlns="http://camel.apache.org/schema/xml-io"; 
xmlns:c="http://acme.com/cheese";>
+  <route>
+    <from uri="direct:start"/>
+    <filter>
+      <xpath>/c:person[@name='James']</xpath>
+      <to uri="mock:result"/>
+    </filter>
+  </route>
+</routes>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:start
+      steps:
+        - filter:
+            expression:
+              xpath:
+                expression: "/c:person[@name='James']"
+                namespace:
+                  - key: c
+                    value: http://acme.com/cheese
+            steps:
+              - to:
+                  uri: mock:result
+----
+====
 
 Each namespace is a key=value pair, where the prefix is the key.
 In the XPath expression then the namespace is used by its prefix, e.g.:
diff --git 
a/core/camel-core-languages/src/main/docs/modules/languages/pages/constant-language.adoc
 
b/core/camel-core-languages/src/main/docs/modules/languages/pages/constant-language.adoc
index 6c26be9909ab..542fa348ab94 100644
--- 
a/core/camel-core-languages/src/main/docs/modules/languages/pages/constant-language.adoc
+++ 
b/core/camel-core-languages/src/main/docs/modules/languages/pages/constant-language.adoc
@@ -86,6 +86,14 @@ For example to set a header with `int` type you can do:
 
 [tabs]
 ====
+Java::
++
+[source,java]
+----
+from("seda:a")
+    .setHeader("zipCode", constant(90210))
+    .to("mock:b");
+----
 
 XML::
 +
@@ -125,12 +133,50 @@ YAML::
 You can externalize the constant and have Camel load it from a resource
 such as `"classpath:"`, `"file:"`, or `"http:"`. +
  This is done using the following syntax: `"resource:scheme:location"`,
-eg to refer to a file on the classpath you can do:
+eg to set the message body to the content of a file, such as a JSON document a 
rest service returns, you can do:
 
+[tabs]
+====
+Java::
++
 [source,java]
 ----
-.setHeader("myHeader").constant("resource:classpath:constant.txt")
+from("direct:stock")
+    .setBody(constant("resource:file:stock.json"))
+    .to("mock:result");
+----
+
+XML::
++
+[source,xml]
+----
+<route>
+  <from uri="direct:stock"/>
+  <setBody>
+    <constant>resource:file:stock.json</constant>
+  </setBody>
+  <to uri="mock:result"/>
+</route>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+    from:
+      uri: direct:stock
+      steps:
+        - setBody:
+            expression:
+              constant:
+                expression: resource:file:stock.json
+        - to:
+            uri: mock:result
 ----
+====
+
+Use `resource:classpath:` for a file on the classpath, such as 
`resource:classpath:constant.txt`.
 
 == Dependencies
 

Reply via email to