You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2013/06/25 11:18:47 UTC

svn commit: r867353 [2/3] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache camel-2120-release.html simple.html

Modified: websites/production/camel/content/book-languages-appendix.html
==============================================================================
--- websites/production/camel/content/book-languages-appendix.html (original)
+++ websites/production/camel/content/book-languages-appendix.html Tue Jun 25 09:18:47 2013
@@ -35,6 +35,19 @@
     </style>
     <![endif]-->
 
+
+  <link href='http://camel.apache.org/styles/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' />
+  <link href='http://camel.apache.org/styles/highlighter/styles/shThemeEclipse.css' rel='stylesheet' type='text/css' />
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='http://camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
     <title>
     Apache Camel: Book Languages Appendix
     </title>
@@ -52,8 +65,8 @@
     <div class="content_r">
       <div>
           <!-- Banner -->
-<div id="banner-content">
-	<div id="asf_logo">
+<div id="banner-content"><p>
+	</p><div id="asf_logo">
 	<div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
             <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
             <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
@@ -93,25 +106,25 @@
 <h3><a shape="rect" name="BookLanguagesAppendix-UsingBeanExpressionsfromtheJavaDSL"></a>Using Bean Expressions from the Java DSL</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"activemq:topic:OrdersTopic"</span>).
-  filter().method(<span class="code-quote">"myBean"</span>, <span class="code-quote">"isGoldCustomer"</span>).
-    to(<span class="code-quote">"activemq:BigSpendersQueue"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("activemq:topic:OrdersTopic").
+  filter().method("myBean", "isGoldCustomer").
+    to("activemq:BigSpendersQueue");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-UsingBeanExpressionsfromXML"></a>Using Bean Expressions from XML</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;route&gt;</span>
-  <span class="code-tag">&lt;from uri=<span class="code-quote">"activemq:topic:OrdersTopic"</span>/&gt;</span>
-  <span class="code-tag">&lt;filter&gt;</span>
-    <span class="code-tag">&lt;method ref=<span class="code-quote">"myBean"</span> method=<span class="code-quote">"isGoldCustomer"</span>/&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"activemq:BigSpendersQueue"</span>/&gt;</span>
-  <span class="code-tag">&lt;/filter&gt;</span>
-<span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;route&gt;
+  &lt;from uri="activemq:topic:OrdersTopic"/&gt;
+  &lt;filter&gt;
+    &lt;method ref="myBean" method="isGoldCustomer"/&gt;
+    &lt;to uri="activemq:BigSpendersQueue"/&gt;
+  &lt;/filter&gt;
+&lt;/route&gt;
+]]></script>
 </div></div>
 
 <div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Bean attribute now deprecated</b><br clear="none">Note, the <tt>bean</tt> attribute of the method expression element is now deprecated. You should now make use of <tt>ref</tt> attribute instead.</td></tr></table></div>
@@ -123,29 +136,29 @@ from(<span class="code-quote">"activemq:
 <p>So we could implement it like this...</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> class MyBean {
-  <span class="code-keyword">public</span> <span class="code-object">boolean</span> isGoldCustomer(Exchange exchange) {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public class MyBean {
+  public boolean isGoldCustomer(Exchange exchange) {
   	...
   }
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>We can also use the <a shape="rect" href="bean-integration.html" title="Bean Integration">Bean Integration</a> annotations. For example you could do...</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> <span class="code-object">boolean</span> isGoldCustomer(<span class="code-object">String</span> body) {...}
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public boolean isGoldCustomer(String body) {...}
+]]></script>
 </div></div>
 
 <p>or</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> <span class="code-object">boolean</span> isGoldCustomer(@Header(name = <span class="code-quote">"foo"</span>) <span class="code-object">Integer</span> fooHeader) {...}
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public boolean isGoldCustomer(@Header(name = "foo") Integer fooHeader) {...}
+]]></script>
 </div></div>
 
 <p>So you can bind parameters of the method to the Exchange, the <a shape="rect" href="message.html" title="Message">Message</a> or individual headers, properties, the body or other expressions.</p>
@@ -155,44 +168,44 @@ from(<span class="code-quote">"activemq:
 
 <p>Camel can instantiate the bean and invoke the method if given a class or invoke an already existing instance. This is illustrated from the example below:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-        from(<span class="code-quote">"activemq:topic:OrdersTopic"</span>).
-                filter().expression(BeanLanguage(MyBean.class, <span class="code-quote">"isGoldCustomer"</span>)).
-                to(<span class="code-quote">"activemq:BigSpendersQueue"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+        from("activemq:topic:OrdersTopic").
+                filter().expression(BeanLanguage(MyBean.class, "isGoldCustomer")).
+                to("activemq:BigSpendersQueue");
+]]></script>
 </div></div>
 
 <p>The 2nd parameter <tt>isGoldCustomer</tt> is an optional parameter to explicit set the method name to invoke. If not provided Camel will try to invoke the best suited method. If case of ambiguity Camel will thrown an Exception. In these situations the 2nd parameter can solve this problem. Also the code is more readable if the method name is provided. The 1st parameter can also be an existing instance of a Bean such as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-   <span class="code-keyword">private</span> MyBean my;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+   private MyBean my;
 
-        from(<span class="code-quote">"activemq:topic:OrdersTopic"</span>).
-                filter().expression(BeanLanguage.bean(my, <span class="code-quote">"isGoldCustomer"</span>)).
-                to(<span class="code-quote">"activemq:BigSpendersQueue"</span>);
-</pre>
+        from("activemq:topic:OrdersTopic").
+                filter().expression(BeanLanguage.bean(my, "isGoldCustomer")).
+                to("activemq:BigSpendersQueue");
+]]></script>
 </div></div>
 
 <p>In Camel 2.2 onwards you can avoid the <tt>BeanLanguage</tt> and have it just as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-   <span class="code-keyword">private</span> MyBean my;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+   private MyBean my;
 
-        from(<span class="code-quote">"activemq:topic:OrdersTopic"</span>).
-                filter().expression(bean(my, <span class="code-quote">"isGoldCustomer"</span>)).
-                to(<span class="code-quote">"activemq:BigSpendersQueue"</span>);
-</pre>
+        from("activemq:topic:OrdersTopic").
+                filter().expression(bean(my, "isGoldCustomer")).
+                to("activemq:BigSpendersQueue");
+]]></script>
 </div></div>
 
 <p>Which also can be done in a bit shorter and nice way:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-   <span class="code-keyword">private</span> MyBean my;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+   private MyBean my;
 
-        from(<span class="code-quote">"activemq:topic:OrdersTopic"</span>).
-                filter().method(my, <span class="code-quote">"isGoldCustomer"</span>).
-                to(<span class="code-quote">"activemq:BigSpendersQueue"</span>);
-</pre>
+        from("activemq:topic:OrdersTopic").
+                filter().method(my, "isGoldCustomer").
+                to("activemq:BigSpendersQueue");
+]]></script>
 </div></div>
 
 
@@ -213,23 +226,23 @@ from(<span class="code-quote">"activemq:
 
 <p>The setHeader element of the Spring DSL can utilize a constant expression like:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;route&gt;
-  &lt;from uri=<span class="code-quote">"seda:a"</span>/&gt;
-  &lt;setHeader headerName=<span class="code-quote">"theHeader"</span>&gt;
+  &lt;from uri="seda:a"/&gt;
+  &lt;setHeader headerName="theHeader"&gt;
     &lt;constant&gt;the value&lt;/constant&gt;        
   &lt;/setHeader&gt;
-  &lt;to uri=<span class="code-quote">"mock:b"</span>/&gt;     
+  &lt;to uri="mock:b"/&gt;     
 &lt;/route&gt;
-</pre>
+]]></script>
 </div></div>
 <p>in this case, the <a shape="rect" href="message.html" title="Message">Message</a> coming from the seda:a <a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a> will have 'theHeader' header set to the constant value 'the value'.</p>
 
 <p>And the same example using Java DSL:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"seda:a"</span>).setHeader(<span class="code-quote">"theHeader"</span>, constant(<span class="code-quote">"the value"</span>)).to(<span class="code-quote">"mock:b"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("seda:a").setHeader("theHeader", constant("the value")).to("mock:b");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Dependencies"></a>Dependencies</h3>
@@ -241,29 +254,29 @@ from(<span class="code-quote">"seda:a"</
 <p>For example you could use EL inside a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> in XML</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;route&gt;</span>
-  <span class="code-tag">&lt;from uri=<span class="code-quote">"seda:foo"</span>/&gt;</span>
-  <span class="code-tag">&lt;filter&gt;</span>
-    <span class="code-tag">&lt;el&gt;</span>${in.headers.foo == 'bar'}<span class="code-tag">&lt;/el&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:bar"</span>/&gt;</span>
-  <span class="code-tag">&lt;/filter&gt;</span>
-<span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;route&gt;
+  &lt;from uri="seda:foo"/&gt;
+  &lt;filter&gt;
+    &lt;el&gt;${in.headers.foo == 'bar'}&lt;/el&gt;
+    &lt;to uri="seda:bar"/&gt;
+  &lt;/filter&gt;
+&lt;/route&gt;
+]]></script>
 </div></div>
 
 <p>You could also use slightly different syntax, e.g. if the header name is not a valid identifier:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;route&gt;</span>
-  <span class="code-tag">&lt;from uri=<span class="code-quote">"seda:foo"</span>/&gt;</span>
-  <span class="code-tag">&lt;filter&gt;</span>
-    <span class="code-tag">&lt;el&gt;</span>${in.headers['My Header'] == 'bar'}<span class="code-tag">&lt;/el&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:bar"</span>/&gt;</span>
-  <span class="code-tag">&lt;/filter&gt;</span>
-<span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;route&gt;
+  &lt;from uri="seda:foo"/&gt;
+  &lt;filter&gt;
+    &lt;el&gt;${in.headers['My Header'] == 'bar'}&lt;/el&gt;
+    &lt;to uri="seda:bar"/&gt;
+  &lt;/filter&gt;
+&lt;/route&gt;
+]]></script>
 </div></div>
 
 <p>You could use EL to create an <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> or as an <a shape="rect" href="expression.html" title="Expression">Expression</a> for a <a shape="rect" href="recipient-list.html" title="Recipient List">Recipient List</a></p>
@@ -278,9 +291,9 @@ from(<span class="code-quote">"seda:a"</
 <h3><a shape="rect" name="BookLanguagesAppendix-Samples"></a>Samples</h3>
 <p>You can use EL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <tt>getFamiliyName</tt> method then you can construct the syntax as follows:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-quote">"$in.body.familyName"</span>
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+"$in.body.familyName"
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Dependencies"></a>Dependencies</h3>
@@ -290,13 +303,13 @@ from(<span class="code-quote">"seda:a"</
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-juel&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>Otherwise you'll also need to include <a shape="rect" class="external-link" href="http://repo2.maven.org/maven2/de/odysseus/juel/juel/2.1.3/juel-2.1.3.jar" rel="nofollow">JUEL</a>.</p>
@@ -309,14 +322,15 @@ from(<span class="code-quote">"seda:a"</
 <p>The recipientList element of the Spring DSL can utilize a header expression like: </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;route&gt;</span>
-  <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:a"</span> /&gt;</span>
-  <span class="code-tag"><span class="code-comment">&lt;!-- use comma as a delimiter for String based values --&gt;</span></span>
-  <span class="code-tag">&lt;recipientList delimiter=<span class="code-quote">","</span>&gt;</span>
-    <span class="code-tag">&lt;header&gt;</span>myHeader<span class="code-tag">&lt;/header&gt;</span>
-  <span class="code-tag">&lt;/recipientList&gt;</span>
-<span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;route&gt;
+  &lt;from uri="direct:a" /&gt;
+  &lt;!-- use comma as a delimiter for String based values --&gt;
+  &lt;recipientList delimiter=","&gt;
+    &lt;header&gt;myHeader&lt;/header&gt;
+  &lt;/recipientList&gt;
+&lt;/route&gt;
+]]></script>
 </div></div>
 
 <p>In this case, the list of recipients are contained in the header 'myHeader'. </p>
@@ -324,15 +338,16 @@ from(<span class="code-quote">"seda:a"</
 <p>And the same example in Java DSL:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:a"</span>).recipientList(header(<span class="code-quote">"myHeader"</span>));
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:a").recipientList(header("myHeader"));
+]]></script>
 </div></div>
 
 <p>And with a slightly different syntax where you use the builder to the fullest (i.e. avoid using parameters but using stacked operations, notice that header is not a parameter but a stacked method call)</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-  from(<span class="code-quote">"direct:a"</span>).recipientList().header(<span class="code-quote">"myHeader"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+  from("direct:a").recipientList().header("myHeader");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Dependencies"></a>Dependencies</h3>
@@ -344,11 +359,11 @@ from(<span class="code-quote">"seda:a"</
 <p>You can use XPath expressions directly using smart completion in your IDE as follows</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"queue:foo"</span>).filter().
-  jxpath(<span class="code-quote">"/in/body/foo"</span>).
-  to(<span class="code-quote">"queue:bar"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("queue:foo").filter().
+  jxpath("/in/body/foo").
+  to("queue:bar")
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Variables"></a>Variables</h3>
@@ -371,24 +386,24 @@ from(<span class="code-quote">"queue:foo
 <p>If you prefer to configure your routes in your <a shape="rect" href="spring.html" title="Spring">Spring</a> XML file then you can use JXPath expressions as follows</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-&lt;beans xmlns=<span class="code-quote">"http://www.springframework.org/schema/beans"</span>
-       <span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;
 
-  <span class="code-tag">&lt;camelContext id=<span class="code-quote">"camel"</span> xmlns=<span class="code-quote">"http://activemq.apache.org/camel/schema/spring"</span>&gt;</span>
-    <span class="code-tag">&lt;route&gt;</span>
-      <span class="code-tag">&lt;from uri=<span class="code-quote">"activemq:MyQueue"</span>/&gt;</span>
-      <span class="code-tag">&lt;filter&gt;</span>
-        <span class="code-tag">&lt;jxpath&gt;</span>in/body/name = 'James'<span class="code-tag">&lt;/xpath&gt;</span>
-        <span class="code-tag">&lt;to uri=<span class="code-quote">"mqseries:SomeOtherQueue"</span>/&gt;</span>
-      <span class="code-tag">&lt;/filter&gt;</span>
-    <span class="code-tag">&lt;/route&gt;</span>
-  <span class="code-tag">&lt;/camelContext&gt;</span>
-<span class="code-tag">&lt;/beans&gt;</span>
-</pre>
+  &lt;camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring"&gt;
+    &lt;route&gt;
+      &lt;from uri="activemq:MyQueue"/&gt;
+      &lt;filter&gt;
+        &lt;jxpath&gt;in/body/name = 'James'&lt;/xpath&gt;
+        &lt;to uri="mqseries:SomeOtherQueue"/&gt;
+      &lt;/filter&gt;
+    &lt;/route&gt;
+  &lt;/camelContext&gt;
+&lt;/beans&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Examples"></a>Examples</h3>
@@ -396,10 +411,11 @@ from(<span class="code-quote">"queue:foo
 <p>Here is a simple <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathFilterTest.java">example</a> using a JXPath expression as a predicate in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a></p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:start"</span>).
-        filter().jxpath(<span class="code-quote">"in/body/name='James'"</span>).
-        to(<span class="code-quote">"mock:result"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:start").
+        filter().jxpath("in/body/name='James'").
+        to("mock:result");
+]]></script>
 </div></div>
 
 <h2><a shape="rect" name="BookLanguagesAppendix-JXPathinjection"></a>JXPath injection </h2>
@@ -409,15 +425,15 @@ from(<span class="code-quote">"queue:foo
 <p>For example</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> class Foo {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public class Foo {
 	
-    @MessageDriven(uri = <span class="code-quote">"activemq:my.queue"</span>)
-    <span class="code-keyword">public</span> void doSomething(@JXPath(<span class="code-quote">"in/body/foo"</span>) <span class="code-object">String</span> correlationID, @Body <span class="code-object">String</span> body) {
-		<span class="code-comment">// process the inbound message here
-</span>    }
+    @MessageDriven(uri = "activemq:my.queue")
+    public void doSomething(@JXPath("in/body/foo") String correlationID, @Body String body) {
+		// process the inbound message here
+    }
 }
-</pre>
+]]></script>
 </div></div>
 
 
@@ -427,9 +443,9 @@ from(<span class="code-quote">"queue:foo
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).jxpath(<span class="code-quote">"resource:classpath:myjxpath.txt"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").jxpath("resource:classpath:myjxpath.txt")
+]]></script>
 </div></div>
 
 
@@ -440,13 +456,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-jxpath&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>Otherwise, you'll also need <a shape="rect" class="external-link" href="http://repo2.maven.org/maven2/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar" rel="nofollow">Commons JXPath</a>.</p>
@@ -458,11 +474,11 @@ This is done using the following syntax:
 
 <p>You can use Mvel dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <tt>getFamiliyName</tt> method then you can construct the syntax as follows:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-quote">"request.body.familyName"</span>
-   <span class="code-comment">// or 
-</span><span class="code-quote">"getRequest().getBody().getFamilyName()"</span>
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+"request.body.familyName"
+   // or 
+"getRequest().getBody().getFamilyName()"
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Variables"></a>Variables</h3>
@@ -476,22 +492,22 @@ This is done using the following syntax:
 <p>For example you could use Mvel inside a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> in XML</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;route&gt;
-  &lt;from uri=<span class="code-quote">"seda:foo"</span>/&gt;
+  &lt;from uri="seda:foo"/&gt;
   &lt;filter&gt;
     &lt;mvel&gt;request.headers.foo == 'bar'&lt;/mvel&gt;
-    &lt;to uri=<span class="code-quote">"seda:bar"</span>/&gt;
+    &lt;to uri="seda:bar"/&gt;
   &lt;/filter&gt;
 &lt;/route&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>And the sample using Java DSL:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-   from(<span class="code-quote">"seda:foo"</span>).filter().mvel(<span class="code-quote">"request.headers.foo == 'bar'"</span>).to(<span class="code-quote">"seda:bar"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+   from("seda:foo").filter().mvel("request.headers.foo == 'bar'").to("seda:bar");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Loadingscriptfromexternalresource"></a>Loading script from external resource</h3>
@@ -500,9 +516,9 @@ This is done using the following syntax:
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).mvel(<span class="code-quote">"resource:classpath:script.mvel"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").mvel("resource:classpath:script.mvel")
+]]></script>
 </div></div>
 
 
@@ -513,13 +529,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-mvel&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>Otherwise, you'll also need <a shape="rect" class="external-link" href="http://repo2.maven.org/maven2/org/mvel/mvel2/2.0.18/mvel2-2.0.18.jar" rel="nofollow">MVEL</a></p>
@@ -531,11 +547,11 @@ This is done using the following syntax:
 
 <p>You can use OGNL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <tt>getFamiliyName</tt> method then you can construct the syntax as follows:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-quote">"request.body.familyName"</span>
-   <span class="code-comment">// or 
-</span><span class="code-quote">"getRequest().getBody().getFamilyName()"</span>
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+"request.body.familyName"
+   // or 
+"getRequest().getBody().getFamilyName()"
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Variables"></a>Variables</h3>
@@ -549,22 +565,22 @@ This is done using the following syntax:
 <p>For example you could use OGNL inside a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> in XML</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;route&gt;
-  &lt;from uri=<span class="code-quote">"seda:foo"</span>/&gt;
+  &lt;from uri="seda:foo"/&gt;
   &lt;filter&gt;
     &lt;ognl&gt;request.headers.foo == 'bar'&lt;/ognl&gt;
-    &lt;to uri=<span class="code-quote">"seda:bar"</span>/&gt;
+    &lt;to uri="seda:bar"/&gt;
   &lt;/filter&gt;
 &lt;/route&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>And the sample using Java DSL:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-   from(<span class="code-quote">"seda:foo"</span>).filter().ognl(<span class="code-quote">"request.headers.foo == 'bar'"</span>).to(<span class="code-quote">"seda:bar"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+   from("seda:foo").filter().ognl("request.headers.foo == 'bar'").to("seda:bar");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Loadingscriptfromexternalresource"></a>Loading script from external resource</h3>
@@ -573,9 +589,9 @@ This is done using the following syntax:
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).ognl(<span class="code-quote">"resource:classpath:myognl.txt"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").ognl("resource:classpath:myognl.txt")
+]]></script>
 </div></div>
 
 
@@ -586,13 +602,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-ognl&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 
 <p>Otherwise, you'll also need <a shape="rect" class="external-link" href="http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.ognl/2.7.3_4/org.apache.servicemix.bundles.ognl-2.7.3_4.jar" rel="nofollow">OGNL</a></p>
@@ -605,13 +621,14 @@ This is done using the following syntax:
 <p>The recipientList element of the Spring DSL can utilize a property expression like: </p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml"><span class="code-tag">&lt;route&gt;</span>
-  <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:a"</span> /&gt;</span>
-  <span class="code-tag">&lt;recipientList&gt;</span>
-    <span class="code-tag">&lt;property&gt;</span>myProperty<span class="code-tag">&lt;/property&gt;</span>
-  <span class="code-tag">&lt;/recipientList&gt;</span>
-<span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;route&gt;
+  &lt;from uri="direct:a" /&gt;
+  &lt;recipientList&gt;
+    &lt;property&gt;myProperty&lt;/property&gt;
+  &lt;/recipientList&gt;
+&lt;/route&gt;
+]]></script>
 </div></div>
 
 <p>In this case, the list of recipients are contained in the property 'myProperty'. </p>
@@ -619,15 +636,16 @@ This is done using the following syntax:
 <p>And the same example in Java DSL:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">from(<span class="code-quote">"direct:a"</span>).recipientList(property(<span class="code-quote">"myProperty"</span>));
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:a").recipientList(property("myProperty"));
+]]></script>
 </div></div>
 
 <p>And with a slightly different syntax where you use the builder to the fullest (i.e. avoid using parameters but using stacked operations, notice that property is not a parameter but a stacked method call)</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-  from(<span class="code-quote">"direct:a"</span>).recipientList().property(<span class="code-quote">"myProperty"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+  from("direct:a").recipientList().property("myProperty");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Dependencies"></a>Dependencies</h3>
@@ -659,38 +677,38 @@ This is done using the following syntax:
 
 <p>In the sample below we add an attribute <tt>user</tt> that is an object we already have instantiated as myUser. This object has a getFirstName() method that we want to set as header on the message. We use the groovy language to concat the first and last name into a single string that is returned.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"name"</span>).groovy(<span class="code-quote">"'$user.firstName $user.lastName'"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("name").groovy("'$user.firstName $user.lastName'").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Anyscriptinglanguage"></a>Any scripting language</h3>
 <p>Camel can run any JSR-223 scripting languages using the <tt>script</tt> DSL method such as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"firstName"</span>).script(<span class="code-quote">"jaskel"</span>, <span class="code-quote">"user.firstName"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("firstName").script("jaskel", "user.firstName").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <p>This is a bit different using the Spring DSL where you use the <b>expression</b> element that doesn't support setting attributes (yet):</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:in"</span>/&gt;</span>
-    <span class="code-tag">&lt;setHeader headerName=<span class="code-quote">"firstName"</span>&gt;</span>
-        <span class="code-tag">&lt;expression language=<span class="code-quote">"jaskel"</span>&gt;</span>user.firstName<span class="code-tag">&lt;/expression&gt;</span>
-    <span class="code-tag">&lt;/setHeader&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:users"</span>/&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;from uri="direct:in"/&gt;
+    &lt;setHeader headerName="firstName"&gt;
+        &lt;expression language="jaskel"&gt;user.firstName&lt;/expression&gt;
+    &lt;/setHeader&gt;
+    &lt;to uri="seda:users"/&gt;
+]]></script>
 </div></div>
 
 <p>You can also use predicates e.g. in a Filter:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;filter&gt;</span>
-        <span class="code-tag">&lt;language language=<span class="code-quote">"beanshell"</span>&gt;</span>request.getHeaders().get(<span class="code-quote">"Foo"</span>).equals(<span class="code-quote">"Bar"</span>)<span class="code-tag">&lt;/language&gt;</span>
-        <span class="code-tag">&lt;to uri=<span class="code-quote">"direct:next"</span> /&gt;</span>
-    <span class="code-tag">&lt;/filter&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;filter&gt;
+        &lt;language language="beanshell"&gt;request.getHeaders().get("Foo").equals("Bar")&lt;/language&gt;
+        &lt;to uri="direct:next" /&gt;
+    &lt;/filter&gt;
+]]></script>
 </div></div>
 
 <p>See <a shape="rect" href="scripting-languages.html" title="Scripting Languages">Scripting Languages</a> for the list of languages with explicit DSL support.</p>
@@ -707,25 +725,26 @@ from(<span class="code-quote">"direct:in
 <p>You can provide additional arguments to the <tt>ScriptingEngine</tt> using a header on the Camel message with the key <tt>CamelScriptArguments</tt>.<br clear="none">
 See this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> void testArgumentsExample() <span class="code-keyword">throws</span> Exception {
-    <span class="code-keyword">if</span> (!ScriptTestHelper.canRunTestOnThisPlatform()) {
-        <span class="code-keyword">return</span>;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public void testArgumentsExample() throws Exception {
+    if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+        return;
     }
 
-    getMockEndpoint(<span class="code-quote">"mock:result"</span>).expectedMessageCount(0);
-    getMockEndpoint(<span class="code-quote">"mock:unmatched"</span>).expectedMessageCount(1);
+    getMockEndpoint("mock:result").expectedMessageCount(0);
+    getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 
-    <span class="code-comment">// additional arguments to ScriptEngine
-</span>    Map&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; arguments = <span class="code-keyword">new</span> HashMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt;();
-    arguments.put(<span class="code-quote">"foo"</span>, <span class="code-quote">"bar"</span>);
-    arguments.put(<span class="code-quote">"baz"</span>, 7);
+    // additional arguments to ScriptEngine
+    Map&lt;String, Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+    arguments.put("foo", "bar");
+    arguments.put("baz", 7);
 
-    <span class="code-comment">// those additional arguments is provided as a header on the Camel Message
-</span>    template.sendBodyAndHeader(<span class="code-quote">"direct:start"</span>, <span class="code-quote">"hello"</span>, ScriptBuilder.ARGUMENTS, arguments);
+    // those additional arguments is provided as a header on the Camel Message
+    template.sendBodyAndHeader("direct:start", "hello", ScriptBuilder.ARGUMENTS, arguments);
 
     assertMockEndpointsSatisfied();
 }
-</pre>
+]]></script>
 </div></div>
 
 
@@ -735,16 +754,16 @@ See this example:</p>
 <p>If you need to use the <a shape="rect" href="properties.html" title="Properties">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so.<br clear="none">
 For example to set a header name myHeader with a value from a property placeholder, which key is provided in a header named "foo".</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")
+]]></script>
 </div></div>
 
 <p>From Camel 2.9 onwards you can now use the properties function and the same example is simpler:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"properties.resolve(request.headers.get('foo'))"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")
+]]></script>
 </div></div>
 
 
@@ -754,9 +773,9 @@ For example to set a header name myHeade
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"resource:classpath:mygroovy.groovy"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")
+]]></script>
 </div></div>
 
 
@@ -767,13 +786,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-script&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 
 <h2><a shape="rect" name="BookLanguagesAppendix-SeeAlso"></a>See Also</h2>
@@ -788,21 +807,21 @@ This is done using the following syntax:
 <p>To use a BeanShell expression use the following Java code:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 ...choice()
-    .when(script(<span class="code-quote">"beanshell"</span>, <span class="code-quote">"request.getHeaders().get(\"</span>foo\<span class="code-quote">").equals(\"</span>bar\<span class="code-quote">")"</span>))
-       .to(<span class="code-quote">"..."</span>)
-</pre>
+    .when(script("beanshell", "request.getHeaders().get(\"foo\").equals(\"bar\")"))
+       .to("...")
+]]></script>
 </div></div>
 
 <p>Or the something like this in your Spring XML:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;filter&gt;</span>
-  <span class="code-tag">&lt;language language=<span class="code-quote">"beanshell"</span>&gt;</span>request.getHeaders().get(<span class="code-quote">"Foo"</span>) == null<span class="code-tag">&lt;/language&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;filter&gt;
+  &lt;language language="beanshell"&gt;request.getHeaders().get("Foo") == null&lt;/language&gt;
   ...
-</pre>
+]]></script>
 </div></div>
 
 <div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>BeanShell Issues</b><br clear="none">You must use BeanShell 2.0b5 or greater.  Note that as of 2.0b5 BeanShell cannot compile scripts, which causes Camel releases before 2.6 to fail when configured with BeanShell expressions.</td></tr></table></div>
@@ -823,38 +842,38 @@ This is done using the following syntax:
 
 <p>In the sample below we add an attribute <tt>user</tt> that is an object we already have instantiated as myUser. This object has a getFirstName() method that we want to set as header on the message. We use the groovy language to concat the first and last name into a single string that is returned.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"name"</span>).groovy(<span class="code-quote">"'$user.firstName $user.lastName'"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("name").groovy("'$user.firstName $user.lastName'").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Anyscriptinglanguage"></a>Any scripting language</h3>
 <p>Camel can run any JSR-223 scripting languages using the <tt>script</tt> DSL method such as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"firstName"</span>).script(<span class="code-quote">"jaskel"</span>, <span class="code-quote">"user.firstName"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("firstName").script("jaskel", "user.firstName").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <p>This is a bit different using the Spring DSL where you use the <b>expression</b> element that doesn't support setting attributes (yet):</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:in"</span>/&gt;</span>
-    <span class="code-tag">&lt;setHeader headerName=<span class="code-quote">"firstName"</span>&gt;</span>
-        <span class="code-tag">&lt;expression language=<span class="code-quote">"jaskel"</span>&gt;</span>user.firstName<span class="code-tag">&lt;/expression&gt;</span>
-    <span class="code-tag">&lt;/setHeader&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:users"</span>/&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;from uri="direct:in"/&gt;
+    &lt;setHeader headerName="firstName"&gt;
+        &lt;expression language="jaskel"&gt;user.firstName&lt;/expression&gt;
+    &lt;/setHeader&gt;
+    &lt;to uri="seda:users"/&gt;
+]]></script>
 </div></div>
 
 <p>You can also use predicates e.g. in a Filter:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;filter&gt;</span>
-        <span class="code-tag">&lt;language language=<span class="code-quote">"beanshell"</span>&gt;</span>request.getHeaders().get(<span class="code-quote">"Foo"</span>).equals(<span class="code-quote">"Bar"</span>)<span class="code-tag">&lt;/language&gt;</span>
-        <span class="code-tag">&lt;to uri=<span class="code-quote">"direct:next"</span> /&gt;</span>
-    <span class="code-tag">&lt;/filter&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;filter&gt;
+        &lt;language language="beanshell"&gt;request.getHeaders().get("Foo").equals("Bar")&lt;/language&gt;
+        &lt;to uri="direct:next" /&gt;
+    &lt;/filter&gt;
+]]></script>
 </div></div>
 
 <p>See <a shape="rect" href="scripting-languages.html" title="Scripting Languages">Scripting Languages</a> for the list of languages with explicit DSL support.</p>
@@ -871,25 +890,26 @@ from(<span class="code-quote">"direct:in
 <p>You can provide additional arguments to the <tt>ScriptingEngine</tt> using a header on the Camel message with the key <tt>CamelScriptArguments</tt>.<br clear="none">
 See this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> void testArgumentsExample() <span class="code-keyword">throws</span> Exception {
-    <span class="code-keyword">if</span> (!ScriptTestHelper.canRunTestOnThisPlatform()) {
-        <span class="code-keyword">return</span>;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public void testArgumentsExample() throws Exception {
+    if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+        return;
     }
 
-    getMockEndpoint(<span class="code-quote">"mock:result"</span>).expectedMessageCount(0);
-    getMockEndpoint(<span class="code-quote">"mock:unmatched"</span>).expectedMessageCount(1);
+    getMockEndpoint("mock:result").expectedMessageCount(0);
+    getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 
-    <span class="code-comment">// additional arguments to ScriptEngine
-</span>    Map&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; arguments = <span class="code-keyword">new</span> HashMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt;();
-    arguments.put(<span class="code-quote">"foo"</span>, <span class="code-quote">"bar"</span>);
-    arguments.put(<span class="code-quote">"baz"</span>, 7);
+    // additional arguments to ScriptEngine
+    Map&lt;String, Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+    arguments.put("foo", "bar");
+    arguments.put("baz", 7);
 
-    <span class="code-comment">// those additional arguments is provided as a header on the Camel Message
-</span>    template.sendBodyAndHeader(<span class="code-quote">"direct:start"</span>, <span class="code-quote">"hello"</span>, ScriptBuilder.ARGUMENTS, arguments);
+    // those additional arguments is provided as a header on the Camel Message
+    template.sendBodyAndHeader("direct:start", "hello", ScriptBuilder.ARGUMENTS, arguments);
 
     assertMockEndpointsSatisfied();
 }
-</pre>
+]]></script>
 </div></div>
 
 
@@ -899,16 +919,16 @@ See this example:</p>
 <p>If you need to use the <a shape="rect" href="properties.html" title="Properties">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so.<br clear="none">
 For example to set a header name myHeader with a value from a property placeholder, which key is provided in a header named "foo".</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")
+]]></script>
 </div></div>
 
 <p>From Camel 2.9 onwards you can now use the properties function and the same example is simpler:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"properties.resolve(request.headers.get('foo'))"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")
+]]></script>
 </div></div>
 
 
@@ -918,9 +938,9 @@ For example to set a header name myHeade
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"resource:classpath:mygroovy.groovy"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")
+]]></script>
 </div></div>
 
 
@@ -931,13 +951,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-script&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 <h2><a shape="rect" name="BookLanguagesAppendix-JavaScript"></a>JavaScript</h2>
 
@@ -946,9 +966,9 @@ This is done using the following syntax:
 <p>To use a JavaScript expression use the following Java code</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-... javaScript(<span class="code-quote">"someJavaScriptExpression"</span>) ... 
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+... javaScript("someJavaScriptExpression") ... 
+]]></script>
 </div></div>
 
 <p>For example you could use the <b>javaScript</b> function to create an <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> or as an <a shape="rect" href="expression.html" title="Expression">Expression</a> for a <a shape="rect" href="recipient-list.html" title="Recipient List">Recipient List</a></p>
@@ -956,31 +976,31 @@ This is done using the following syntax:
 <h3><a shape="rect" name="BookLanguagesAppendix-Example"></a>Example</h3>
 <p>In the sample below we use JavaScript to create a <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> use in the route path, to route exchanges from admin users to a special queue.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-    from(<span class="code-quote">"direct:start"</span>)
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+    from("direct:start")
         .choice()
-            .when().javaScript(<span class="code-quote">"request.headers.get('user') == 'admin'"</span>).to(<span class="code-quote">"seda:adminQueue"</span>)
+            .when().javaScript("request.headers.get('user') == 'admin'").to("seda:adminQueue")
         .otherwise()
-            .to(<span class="code-quote">"seda:regularQueue"</span>);
-</pre>
+            .to("seda:regularQueue");
+]]></script>
 </div></div>
 
 <p>And a Spring DSL sample as well:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;route&gt;</span>
-        <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:start"</span>/&gt;</span>
-        <span class="code-tag">&lt;choice&gt;</span>
-            <span class="code-tag">&lt;when&gt;</span>
-                <span class="code-tag">&lt;javaScript&gt;</span>request.headers.get('user') == 'admin'<span class="code-tag">&lt;/javaScript&gt;</span>
-                <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:adminQueue"</span>/&gt;</span>
-            <span class="code-tag">&lt;/when&gt;</span>
-            <span class="code-tag">&lt;otherwise&gt;</span>
-                <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:regularQueue"</span>/&gt;</span>
-            <span class="code-tag">&lt;/otherwise&gt;</span>
-        <span class="code-tag">&lt;/choice&gt;</span>
-    <span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;route&gt;
+        &lt;from uri="direct:start"/&gt;
+        &lt;choice&gt;
+            &lt;when&gt;
+                &lt;javaScript&gt;request.headers.get('user') == 'admin'&lt;/javaScript&gt;
+                &lt;to uri="seda:adminQueue"/&gt;
+            &lt;/when&gt;
+            &lt;otherwise&gt;
+                &lt;to uri="seda:regularQueue"/&gt;
+            &lt;/otherwise&gt;
+        &lt;/choice&gt;
+    &lt;/route&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-ScriptContext"></a>ScriptContext</h3>
@@ -997,38 +1017,38 @@ This is done using the following syntax:
 
 <p>In the sample below we add an attribute <tt>user</tt> that is an object we already have instantiated as myUser. This object has a getFirstName() method that we want to set as header on the message. We use the groovy language to concat the first and last name into a single string that is returned.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"name"</span>).groovy(<span class="code-quote">"'$user.firstName $user.lastName'"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("name").groovy("'$user.firstName $user.lastName'").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Anyscriptinglanguage"></a>Any scripting language</h3>
 <p>Camel can run any JSR-223 scripting languages using the <tt>script</tt> DSL method such as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"firstName"</span>).script(<span class="code-quote">"jaskel"</span>, <span class="code-quote">"user.firstName"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("firstName").script("jaskel", "user.firstName").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <p>This is a bit different using the Spring DSL where you use the <b>expression</b> element that doesn't support setting attributes (yet):</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:in"</span>/&gt;</span>
-    <span class="code-tag">&lt;setHeader headerName=<span class="code-quote">"firstName"</span>&gt;</span>
-        <span class="code-tag">&lt;expression language=<span class="code-quote">"jaskel"</span>&gt;</span>user.firstName<span class="code-tag">&lt;/expression&gt;</span>
-    <span class="code-tag">&lt;/setHeader&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:users"</span>/&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;from uri="direct:in"/&gt;
+    &lt;setHeader headerName="firstName"&gt;
+        &lt;expression language="jaskel"&gt;user.firstName&lt;/expression&gt;
+    &lt;/setHeader&gt;
+    &lt;to uri="seda:users"/&gt;
+]]></script>
 </div></div>
 
 <p>You can also use predicates e.g. in a Filter:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;filter&gt;</span>
-        <span class="code-tag">&lt;language language=<span class="code-quote">"beanshell"</span>&gt;</span>request.getHeaders().get(<span class="code-quote">"Foo"</span>).equals(<span class="code-quote">"Bar"</span>)<span class="code-tag">&lt;/language&gt;</span>
-        <span class="code-tag">&lt;to uri=<span class="code-quote">"direct:next"</span> /&gt;</span>
-    <span class="code-tag">&lt;/filter&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;filter&gt;
+        &lt;language language="beanshell"&gt;request.getHeaders().get("Foo").equals("Bar")&lt;/language&gt;
+        &lt;to uri="direct:next" /&gt;
+    &lt;/filter&gt;
+]]></script>
 </div></div>
 
 <p>See <a shape="rect" href="scripting-languages.html" title="Scripting Languages">Scripting Languages</a> for the list of languages with explicit DSL support.</p>
@@ -1045,25 +1065,26 @@ from(<span class="code-quote">"direct:in
 <p>You can provide additional arguments to the <tt>ScriptingEngine</tt> using a header on the Camel message with the key <tt>CamelScriptArguments</tt>.<br clear="none">
 See this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> void testArgumentsExample() <span class="code-keyword">throws</span> Exception {
-    <span class="code-keyword">if</span> (!ScriptTestHelper.canRunTestOnThisPlatform()) {
-        <span class="code-keyword">return</span>;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public void testArgumentsExample() throws Exception {
+    if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+        return;
     }
 
-    getMockEndpoint(<span class="code-quote">"mock:result"</span>).expectedMessageCount(0);
-    getMockEndpoint(<span class="code-quote">"mock:unmatched"</span>).expectedMessageCount(1);
+    getMockEndpoint("mock:result").expectedMessageCount(0);
+    getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 
-    <span class="code-comment">// additional arguments to ScriptEngine
-</span>    Map&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; arguments = <span class="code-keyword">new</span> HashMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt;();
-    arguments.put(<span class="code-quote">"foo"</span>, <span class="code-quote">"bar"</span>);
-    arguments.put(<span class="code-quote">"baz"</span>, 7);
+    // additional arguments to ScriptEngine
+    Map&lt;String, Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+    arguments.put("foo", "bar");
+    arguments.put("baz", 7);
 
-    <span class="code-comment">// those additional arguments is provided as a header on the Camel Message
-</span>    template.sendBodyAndHeader(<span class="code-quote">"direct:start"</span>, <span class="code-quote">"hello"</span>, ScriptBuilder.ARGUMENTS, arguments);
+    // those additional arguments is provided as a header on the Camel Message
+    template.sendBodyAndHeader("direct:start", "hello", ScriptBuilder.ARGUMENTS, arguments);
 
     assertMockEndpointsSatisfied();
 }
-</pre>
+]]></script>
 </div></div>
 
 
@@ -1073,16 +1094,16 @@ See this example:</p>
 <p>If you need to use the <a shape="rect" href="properties.html" title="Properties">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so.<br clear="none">
 For example to set a header name myHeader with a value from a property placeholder, which key is provided in a header named "foo".</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")
+]]></script>
 </div></div>
 
 <p>From Camel 2.9 onwards you can now use the properties function and the same example is simpler:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"properties.resolve(request.headers.get('foo'))"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")
+]]></script>
 </div></div>
 
 
@@ -1092,9 +1113,9 @@ For example to set a header name myHeade
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"resource:classpath:mygroovy.groovy"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")
+]]></script>
 </div></div>
 
 
@@ -1105,13 +1126,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-script&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 <h2><a shape="rect" name="BookLanguagesAppendix-Groovy"></a>Groovy</h2>
 
@@ -1120,9 +1141,9 @@ This is done using the following syntax:
 <p>To use a Groovy expression use the following Java code</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-... groovy(<span class="code-quote">"someGroovyExpression"</span>) ... 
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+... groovy("someGroovyExpression") ... 
+]]></script>
 </div></div>
 
 <p>For example you could use the <b>groovy</b> function to create an <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> or as an <a shape="rect" href="expression.html" title="Expression">Expression</a> for a <a shape="rect" href="recipient-list.html" title="Recipient List">Recipient List</a></p>
@@ -1130,23 +1151,23 @@ This is done using the following syntax:
 <h3><a shape="rect" name="BookLanguagesAppendix-Example"></a>Example</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-comment">// lets route <span class="code-keyword">if</span> a line item is over $100
-</span>from(<span class="code-quote">"queue:foo"</span>).filter(groovy(<span class="code-quote">"request.lineItems.any { i -&gt; i.value &gt; 100 }"</span>)).to(<span class="code-quote">"queue:bar"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+// lets route if a line item is over $100
+from("queue:foo").filter(groovy("request.lineItems.any { i -&gt; i.value &gt; 100 }")).to("queue:bar")
+]]></script>
 </div></div>
 
 <p>And the Spring DSL:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-        <span class="code-tag">&lt;route&gt;</span>
-            <span class="code-tag">&lt;from uri=<span class="code-quote">"queue:foo"</span>/&gt;</span>
-            <span class="code-tag">&lt;filter&gt;</span>
-                <span class="code-tag">&lt;groovy&gt;</span>request.lineItems.any { i -&gt; i.value &gt; 100 }<span class="code-tag">&lt;/groovy&gt;</span>
-                <span class="code-tag">&lt;to uri=<span class="code-quote">"queue:bar"</span>/&gt;</span>
-            <span class="code-tag">&lt;/filter&gt;</span>
-        <span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+        &lt;route&gt;
+            &lt;from uri="queue:foo"/&gt;
+            &lt;filter&gt;
+                &lt;groovy&gt;request.lineItems.any { i -&gt; i.value &gt; 100 }&lt;/groovy&gt;
+                &lt;to uri="queue:bar"/&gt;
+            &lt;/filter&gt;
+        &lt;/route&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-ScriptContext"></a>ScriptContext</h3>
@@ -1163,38 +1184,38 @@ This is done using the following syntax:
 
 <p>In the sample below we add an attribute <tt>user</tt> that is an object we already have instantiated as myUser. This object has a getFirstName() method that we want to set as header on the message. We use the groovy language to concat the first and last name into a single string that is returned.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"name"</span>).groovy(<span class="code-quote">"'$user.firstName $user.lastName'"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("name").groovy("'$user.firstName $user.lastName'").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Anyscriptinglanguage"></a>Any scripting language</h3>
 <p>Camel can run any JSR-223 scripting languages using the <tt>script</tt> DSL method such as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"firstName"</span>).script(<span class="code-quote">"jaskel"</span>, <span class="code-quote">"user.firstName"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("firstName").script("jaskel", "user.firstName").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <p>This is a bit different using the Spring DSL where you use the <b>expression</b> element that doesn't support setting attributes (yet):</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:in"</span>/&gt;</span>
-    <span class="code-tag">&lt;setHeader headerName=<span class="code-quote">"firstName"</span>&gt;</span>
-        <span class="code-tag">&lt;expression language=<span class="code-quote">"jaskel"</span>&gt;</span>user.firstName<span class="code-tag">&lt;/expression&gt;</span>
-    <span class="code-tag">&lt;/setHeader&gt;</span>
-    <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:users"</span>/&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;from uri="direct:in"/&gt;
+    &lt;setHeader headerName="firstName"&gt;
+        &lt;expression language="jaskel"&gt;user.firstName&lt;/expression&gt;
+    &lt;/setHeader&gt;
+    &lt;to uri="seda:users"/&gt;
+]]></script>
 </div></div>
 
 <p>You can also use predicates e.g. in a Filter:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;filter&gt;</span>
-        <span class="code-tag">&lt;language language=<span class="code-quote">"beanshell"</span>&gt;</span>request.getHeaders().get(<span class="code-quote">"Foo"</span>).equals(<span class="code-quote">"Bar"</span>)<span class="code-tag">&lt;/language&gt;</span>
-        <span class="code-tag">&lt;to uri=<span class="code-quote">"direct:next"</span> /&gt;</span>
-    <span class="code-tag">&lt;/filter&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;filter&gt;
+        &lt;language language="beanshell"&gt;request.getHeaders().get("Foo").equals("Bar")&lt;/language&gt;
+        &lt;to uri="direct:next" /&gt;
+    &lt;/filter&gt;
+]]></script>
 </div></div>
 
 <p>See <a shape="rect" href="scripting-languages.html" title="Scripting Languages">Scripting Languages</a> for the list of languages with explicit DSL support.</p>
@@ -1211,25 +1232,26 @@ from(<span class="code-quote">"direct:in
 <p>You can provide additional arguments to the <tt>ScriptingEngine</tt> using a header on the Camel message with the key <tt>CamelScriptArguments</tt>.<br clear="none">
 See this example:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> void testArgumentsExample() <span class="code-keyword">throws</span> Exception {
-    <span class="code-keyword">if</span> (!ScriptTestHelper.canRunTestOnThisPlatform()) {
-        <span class="code-keyword">return</span>;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public void testArgumentsExample() throws Exception {
+    if (!ScriptTestHelper.canRunTestOnThisPlatform()) {
+        return;
     }
 
-    getMockEndpoint(<span class="code-quote">"mock:result"</span>).expectedMessageCount(0);
-    getMockEndpoint(<span class="code-quote">"mock:unmatched"</span>).expectedMessageCount(1);
+    getMockEndpoint("mock:result").expectedMessageCount(0);
+    getMockEndpoint("mock:unmatched").expectedMessageCount(1);
 
-    <span class="code-comment">// additional arguments to ScriptEngine
-</span>    Map&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt; arguments = <span class="code-keyword">new</span> HashMap&lt;<span class="code-object">String</span>, <span class="code-object">Object</span>&gt;();
-    arguments.put(<span class="code-quote">"foo"</span>, <span class="code-quote">"bar"</span>);
-    arguments.put(<span class="code-quote">"baz"</span>, 7);
+    // additional arguments to ScriptEngine
+    Map&lt;String, Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+    arguments.put("foo", "bar");
+    arguments.put("baz", 7);
 
-    <span class="code-comment">// those additional arguments is provided as a header on the Camel Message
-</span>    template.sendBodyAndHeader(<span class="code-quote">"direct:start"</span>, <span class="code-quote">"hello"</span>, ScriptBuilder.ARGUMENTS, arguments);
+    // those additional arguments is provided as a header on the Camel Message
+    template.sendBodyAndHeader("direct:start", "hello", ScriptBuilder.ARGUMENTS, arguments);
 
     assertMockEndpointsSatisfied();
 }
-</pre>
+]]></script>
 </div></div>
 
 
@@ -1239,16 +1261,16 @@ See this example:</p>
 <p>If you need to use the <a shape="rect" href="properties.html" title="Properties">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so.<br clear="none">
 For example to set a header name myHeader with a value from a property placeholder, which key is provided in a header named "foo".</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")
+]]></script>
 </div></div>
 
 <p>From Camel 2.9 onwards you can now use the properties function and the same example is simpler:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"properties.resolve(request.headers.get('foo'))"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")
+]]></script>
 </div></div>
 
 
@@ -1258,9 +1280,9 @@ For example to set a header name myHeade
 <p>You can externalize the script and have Camel load it from a resource such as <tt>"classpath:"</tt>, <tt>"file:"</tt>, or <tt>"http:"</tt>.<br clear="none">
 This is done using the following syntax: <tt>"resource:scheme:location"</tt>, eg to refer to a file on the classpath you can do:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-.setHeader(<span class="code-quote">"myHeader"</span>).groovy(<span class="code-quote">"resource:classpath:mygroovy.groovy"</span>)
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")
+]]></script>
 </div></div>
 
 
@@ -1271,13 +1293,13 @@ This is done using the following syntax:
 <p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html" title="Download">the download page for the latest versions</a>).</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-script&lt;/artifactId&gt;
   &lt;version&gt;x.x.x&lt;/version&gt;
 &lt;/dependency&gt;
-</pre>
+]]></script>
 </div></div>
 <h2><a shape="rect" name="BookLanguagesAppendix-Python"></a>Python</h2>
 
@@ -1286,9 +1308,9 @@ This is done using the following syntax:
 <p>To use a Python expression use the following Java code</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-... python(<span class="code-quote">"somePythonExpression"</span>) ... 
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+... python("somePythonExpression") ... 
+]]></script>
 </div></div>
 
 <p>For example you could use the <b>python</b> function to create an <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a> or as an <a shape="rect" href="expression.html" title="Expression">Expression</a> for a <a shape="rect" href="recipient-list.html" title="Recipient List">Recipient List</a></p>
@@ -1296,31 +1318,31 @@ This is done using the following syntax:
 <h3><a shape="rect" name="BookLanguagesAppendix-Example"></a>Example</h3>
 <p>In the sample below we use Python to create a <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> use in the route path, to route exchanges from admin users to a special queue.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-    from(<span class="code-quote">"direct:start"</span>)
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+    from("direct:start")
         .choice()
-            .when().python(<span class="code-quote">"request.headers['user'] == 'admin'"</span>).to(<span class="code-quote">"seda:adminQueue"</span>)
+            .when().python("request.headers['user'] == 'admin'").to("seda:adminQueue")
         .otherwise()
-            .to(<span class="code-quote">"seda:regularQueue"</span>);
-</pre>
+            .to("seda:regularQueue");
+]]></script>
 </div></div>
 
 <p>And a Spring DSL sample as well:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;route&gt;</span>
-        <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:start"</span>/&gt;</span>
-        <span class="code-tag">&lt;choice&gt;</span>
-            <span class="code-tag">&lt;when&gt;</span>
-                <span class="code-tag">&lt;python&gt;</span>request.headers['user'] == 'admin'<span class="code-tag">&lt;/python&gt;</span>
-                <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:adminQueue"</span>/&gt;</span>
-            <span class="code-tag">&lt;/when&gt;</span>
-            <span class="code-tag">&lt;otherwise&gt;</span>
-                <span class="code-tag">&lt;to uri=<span class="code-quote">"seda:regularQueue"</span>/&gt;</span>
-            <span class="code-tag">&lt;/otherwise&gt;</span>
-        <span class="code-tag">&lt;/choice&gt;</span>
-    <span class="code-tag">&lt;/route&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;route&gt;
+        &lt;from uri="direct:start"/&gt;
+        &lt;choice&gt;
+            &lt;when&gt;
+                &lt;python&gt;request.headers['user'] == 'admin'&lt;/python&gt;
+                &lt;to uri="seda:adminQueue"/&gt;
+            &lt;/when&gt;
+            &lt;otherwise&gt;
+                &lt;to uri="seda:regularQueue"/&gt;
+            &lt;/otherwise&gt;
+        &lt;/choice&gt;
+    &lt;/route&gt;
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-ScriptContext"></a>ScriptContext</h3>
@@ -1337,38 +1359,38 @@ This is done using the following syntax:
 
 <p>In the sample below we add an attribute <tt>user</tt> that is an object we already have instantiated as myUser. This object has a getFirstName() method that we want to set as header on the message. We use the groovy language to concat the first and last name into a single string that is returned.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"name"</span>).groovy(<span class="code-quote">"'$user.firstName $user.lastName'"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("name").groovy("'$user.firstName $user.lastName'").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <h3><a shape="rect" name="BookLanguagesAppendix-Anyscriptinglanguage"></a>Any scripting language</h3>
 <p>Camel can run any JSR-223 scripting languages using the <tt>script</tt> DSL method such as:</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-from(<span class="code-quote">"direct:in"</span>).setHeader(<span class="code-quote">"firstName"</span>).script(<span class="code-quote">"jaskel"</span>, <span class="code-quote">"user.firstName"</span>).attribute(<span class="code-quote">"user"</span>, myUser).to(<span class="code-quote">"seda:users"</span>);
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+from("direct:in").setHeader("firstName").script("jaskel", "user.firstName").attribute("user", myUser).to("seda:users");
+]]></script>
 </div></div>
 
 <p>This is a bit different using the Spring DSL where you use the <b>expression</b> element that doesn't support setting attributes (yet):</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;from uri=<span class="code-quote">"direct:in"</span>/&gt;</span>
-    <span class="code-tag">&lt;setHeader headerName=<span class="code-quote">"firstName"</span>&gt;</span>
-        <span class="code-tag">&lt;expression language=<span class="code-quote">"jaskel"</span>&gt;</span>user.firstName<span class="code-tag">&lt;/expression&gt;</span>

[... 2211 lines stripped ...]