blob: 4cdd314ba3e95f85f036200d01d4e9a61f2f6f39 [file] [log] [blame]
[[ref-language]]
= Ref Language
:page-source: core/camel-base/src/main/docs/ref-language.adoc
*Available as of Camel version 2.8*
The Ref Expression Language is really just a way to lookup a custom
Expression or Predicate from the Registry.
This is particular useable in XML DSLs.
== Ref Language options
// language options: START
The Ref language supports 1 options, which are listed below.
[width="100%",cols="2,1m,1m,6",options="header"]
|===
| Name | Default | Java Type | Description
| trim | true | Boolean | Whether to trim the value to remove leading and trailing whitespaces and line breaks
|===
// language options: END
== Example usage
The Splitter in XML DSL can utilize a custom
expression using `<ref>` like:
[source,xml]
----
<bean id="myExpression" class="com.mycompany.MyCustomExpression"/>
<route>
<from uri="seda:a"/>
<split>
<ref>myExpression</ref>
<to uri="mock:b"/>
</split>
</route>
----
in this case, the Message coming from the seda:a
Endpoint will be splitted using a custom
Expression which has the id `myExpression` in the
Registry.
And the same example using Java DSL:
[source,java]
----
from("seda:a").split().ref("myExpression").to("seda:b");
----
== Dependencies
The Ref language is part of *camel-core*.