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 2014/08/27 10:18:38 UTC

svn commit: r920503 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache xslt.html

Author: buildbot
Date: Wed Aug 27 08:18:38 2014
New Revision: 920503

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/xslt.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Wed Aug 27 08:18:38 2014
@@ -1529,11 +1529,11 @@ template.send("direct:alias-verify&
                     </div>
     </div>
 <p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1409044661949 {padding: 0px;}
-div.rbtoc1409044661949 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1409044661949 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1409127441886 {padding: 0px;}
+div.rbtoc1409127441886 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1409127441886 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1409044661949">
+/*]]>*/</style></p><div class="toc-macro rbtoc1409127441886">
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>
@@ -13608,7 +13608,21 @@ from(&quot;activemq:My.Queue&quot;).
 </div></div><p>From Camel 2.10.4 onwards we have made this easier as Camel will use the prefix from the endpoint configuration as the default prefix. So from Camel 2.10.4 onwards you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;xsl:include href=&quot;staff_template.xsl&quot;/&gt;
 ]]></script>
-</div></div><p>Which will load the staff_template.xsl resource from the file system, as the endpoint was configured with "file:" as prefix.<br clear="none"> You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources.</p><h3 id="BookComponentAppendix-Dynamicstylesheets">Dynamic stylesheets</h3><p>To provide a dynamic stylesheet at runtime you can define a dynamic URI. See&#160;<a shape="rect" href="how-to-use-a-dynamic-uri-in-to.html">How to use a dynamic URI in to()</a> for more information.</p><p><strong>Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)</strong><br clear="none"> Camel provides the <code>CamelXsltResourceUri</code> header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime.</p><h3 id="BookComponentAppendix
 -NotesonusingXSLTandJavaVersions">Notes on using XSLT and Java Versions</h3><p>Here are some observations from Sameer, a Camel user, which he kindly shared with us:</p><blockquote><p>In case anybody faces issues with the XSLT endpoint please review these points.</p><p>I was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within.</p><p>No explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicating that the XMLConverter bean could no be initialized.</p><p>After a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):</p><p>1. Use the transformerFactory option in the route <code>("xslt:my-transformer.xsl?transformerFactory=tFactory")</code> with the <code>tFactory</code> bean having bean defined i
 n the spring context for <code>class="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"</code>.<br clear="none"> 2. Added the Xalan jar into my maven pom.</p><p>My guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page.</p><p>Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the <code>jre/lib/endorsed</code> directory for the jvm or as specified by the container.</p><p>Hope this post saves newbie Camel riders some time.</p></blockquote><p></p><h3 id="BookComponentAppendix-SeeAlso.71">See Also</h3>
+</div></div><p>Which will load the staff_template.xsl resource from the file system, as the endpoint was configured with "file:" as prefix.<br clear="none"> You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources.</p><h3 id="BookComponentAppendix-Dynamicstylesheets">Dynamic stylesheets</h3><p>To provide a dynamic stylesheet at runtime you can define a dynamic URI. See&#160;<a shape="rect" href="how-to-use-a-dynamic-uri-in-to.html">How to use a dynamic URI in to()</a> for more information.</p><p><strong>Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)</strong><br clear="none"> Camel provides the <code>CamelXsltResourceUri</code> header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime.</p><h3 id="BookComponentAppendix
 -Accessingwarnings,errorsandfatalErrorsfromXSLTErrorListener">Accessing warnings, errors and fatalErrors from XSLT ErrorListener</h3><p><strong>Available as of Camel 2.14</strong></p><p>From Camel 2.14 onwards, any warning/error or fatalError is stored on the current Exchange as a property with the keys&#160;<code>Exchange.XSLT_ERROR</code>,&#160;<code>Exchange.XSLT_FATAL_ERROR</code>, or&#160;<code>Exchange.XSLT_WARNING</code> which allows end users to get hold of any errors happening during transformation.</p><p>For example in the stylesheet below, we want to terminate if a staff has an empty dob field. And to include a custom error message using xsl:message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;xsl:template match=&quot;/&quot;&gt;
+    &lt;html&gt;
+      &lt;body&gt;
+        &lt;xsl:for-each select=&quot;staff/programmer&quot;&gt;
+          &lt;p&gt;Name: &lt;xsl:value-of select=&quot;name&quot;/&gt;&lt;br /&gt;
+            &lt;xsl:if test=&quot;dob=&#39;&#39;&quot;&gt;
+              &lt;xsl:message terminate=&quot;yes&quot;&gt;Error: DOB is an empty string!&lt;/xsl:message&gt;
+            &lt;/xsl:if&gt;
+          &lt;/p&gt;
+        &lt;/xsl:for-each&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+  &lt;/xsl:template&gt;]]></script>
+</div></div><p>This information is not available on the Exchange stored as an Exception that contains the message in the <code>getMessage()</code> method on the exception. The exception is stored on the Exchange as a warning with the key<span style="line-height: 1.4285715;">&#160;</span><code style="line-height: 1.4285715;">Exchange.XSLT_WARNING.</code></p><h3 id="BookComponentAppendix-NotesonusingXSLTandJavaVersions">Notes on using XSLT and Java Versions</h3><p>Here are some observations from Sameer, a Camel user, which he kindly shared with us:</p><blockquote><p>In case anybody faces issues with the XSLT endpoint please review these points.</p><p>I was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within.</p><p>No explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicatin
 g that the XMLConverter bean could no be initialized.</p><p>After a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):</p><p>1. Use the transformerFactory option in the route <code>("xslt:my-transformer.xsl?transformerFactory=tFactory")</code> with the <code>tFactory</code> bean having bean defined in the spring context for <code>class="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"</code>.<br clear="none"> 2. Added the Xalan jar into my maven pom.</p><p>My guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page.</p><p>Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the <code>jre/lib/endorsed</code>
  directory for the jvm or as specified by the container.</p><p>Hope this post saves newbie Camel riders some time.</p></blockquote><p></p><h3 id="BookComponentAppendix-SeeAlso.71">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul>
 </div></div>
         </td>

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Wed Aug 27 08:18:38 2014
@@ -4158,11 +4158,11 @@ While not actual tutorials you might fin
                     </div>
     </div>
 <h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1409044676266 {padding: 0px;}
-div.rbtoc1409044676266 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1409044676266 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1409127451819 {padding: 0px;}
+div.rbtoc1409127451819 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1409127451819 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1409044676266">
+/*]]>*/</style></p><div class="toc-macro rbtoc1409127451819">
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Preface">Preface</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-About">About</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#Tutorial-JmsRemoting-WritingtheServer">Writing the Server</a>
@@ -6348,11 +6348,11 @@ So we completed the last piece in the pi
 
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1409044676552 {padding: 0px;}
-div.rbtoc1409044676552 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1409044676552 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1409127452117 {padding: 0px;}
+div.rbtoc1409127452117 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1409127452117 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1409044676552">
+/*]]>*/</style><div class="toc-macro rbtoc1409127452117">
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Introduction">Introduction</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Maven2">Maven 2</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-wsdl">wsdl</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-RunningtheExample">Running the Example</a></li></ul>
@@ -20072,11 +20072,11 @@ template.send(&quot;direct:alias-verify&
                     </div>
     </div>
 <p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1409044682647 {padding: 0px;}
-div.rbtoc1409044682647 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1409044682647 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1409127458190 {padding: 0px;}
+div.rbtoc1409127458190 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1409127458190 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1409044682647">
+/*]]>*/</style></p><div class="toc-macro rbtoc1409127458190">
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>
@@ -32151,7 +32151,21 @@ from(&quot;activemq:My.Queue&quot;).
 </div></div><p>From Camel 2.10.4 onwards we have made this easier as Camel will use the prefix from the endpoint configuration as the default prefix. So from Camel 2.10.4 onwards you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;xsl:include href=&quot;staff_template.xsl&quot;/&gt;
 ]]></script>
-</div></div><p>Which will load the staff_template.xsl resource from the file system, as the endpoint was configured with "file:" as prefix.<br clear="none"> You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources.</p><h3 id="BookInOnePage-Dynamicstylesheets">Dynamic stylesheets</h3><p>To provide a dynamic stylesheet at runtime you can define a dynamic URI. See&#160;<a shape="rect" href="how-to-use-a-dynamic-uri-in-to.html">How to use a dynamic URI in to()</a> for more information.</p><p><strong>Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)</strong><br clear="none"> Camel provides the <code>CamelXsltResourceUri</code> header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime.</p><h3 id="BookInOnePage-NotesonusingXSL
 TandJavaVersions">Notes on using XSLT and Java Versions</h3><p>Here are some observations from Sameer, a Camel user, which he kindly shared with us:</p><blockquote><p>In case anybody faces issues with the XSLT endpoint please review these points.</p><p>I was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within.</p><p>No explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicating that the XMLConverter bean could no be initialized.</p><p>After a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):</p><p>1. Use the transformerFactory option in the route <code>("xslt:my-transformer.xsl?transformerFactory=tFactory")</code> with the <code>tFactory</code> bean having bean defined in the spring con
 text for <code>class="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"</code>.<br clear="none"> 2. Added the Xalan jar into my maven pom.</p><p>My guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page.</p><p>Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the <code>jre/lib/endorsed</code> directory for the jvm or as specified by the container.</p><p>Hope this post saves newbie Camel riders some time.</p></blockquote><p></p><h3 id="BookInOnePage-SeeAlso.91">See Also</h3>
+</div></div><p>Which will load the staff_template.xsl resource from the file system, as the endpoint was configured with "file:" as prefix.<br clear="none"> You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources.</p><h3 id="BookInOnePage-Dynamicstylesheets">Dynamic stylesheets</h3><p>To provide a dynamic stylesheet at runtime you can define a dynamic URI. See&#160;<a shape="rect" href="how-to-use-a-dynamic-uri-in-to.html">How to use a dynamic URI in to()</a> for more information.</p><p><strong>Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)</strong><br clear="none"> Camel provides the <code>CamelXsltResourceUri</code> header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime.</p><h3 id="BookInOnePage-Accessingwarnin
 gs,errorsandfatalErrorsfromXSLTErrorListener">Accessing warnings, errors and fatalErrors from XSLT ErrorListener</h3><p><strong>Available as of Camel 2.14</strong></p><p>From Camel 2.14 onwards, any warning/error or fatalError is stored on the current Exchange as a property with the keys&#160;<code>Exchange.XSLT_ERROR</code>,&#160;<code>Exchange.XSLT_FATAL_ERROR</code>, or&#160;<code>Exchange.XSLT_WARNING</code> which allows end users to get hold of any errors happening during transformation.</p><p>For example in the stylesheet below, we want to terminate if a staff has an empty dob field. And to include a custom error message using xsl:message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;xsl:template match=&quot;/&quot;&gt;
+    &lt;html&gt;
+      &lt;body&gt;
+        &lt;xsl:for-each select=&quot;staff/programmer&quot;&gt;
+          &lt;p&gt;Name: &lt;xsl:value-of select=&quot;name&quot;/&gt;&lt;br /&gt;
+            &lt;xsl:if test=&quot;dob=&#39;&#39;&quot;&gt;
+              &lt;xsl:message terminate=&quot;yes&quot;&gt;Error: DOB is an empty string!&lt;/xsl:message&gt;
+            &lt;/xsl:if&gt;
+          &lt;/p&gt;
+        &lt;/xsl:for-each&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+  &lt;/xsl:template&gt;]]></script>
+</div></div><p>This information is not available on the Exchange stored as an Exception that contains the message in the <code>getMessage()</code> method on the exception. The exception is stored on the Exchange as a warning with the key<span style="line-height: 1.4285715;">&#160;</span><code style="line-height: 1.4285715;">Exchange.XSLT_WARNING.</code></p><h3 id="BookInOnePage-NotesonusingXSLTandJavaVersions">Notes on using XSLT and Java Versions</h3><p>Here are some observations from Sameer, a Camel user, which he kindly shared with us:</p><blockquote><p>In case anybody faces issues with the XSLT endpoint please review these points.</p><p>I was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within.</p><p>No explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicating that t
 he XMLConverter bean could no be initialized.</p><p>After a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):</p><p>1. Use the transformerFactory option in the route <code>("xslt:my-transformer.xsl?transformerFactory=tFactory")</code> with the <code>tFactory</code> bean having bean defined in the spring context for <code>class="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"</code>.<br clear="none"> 2. Added the Xalan jar into my maven pom.</p><p>My guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page.</p><p>Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the <code>jre/lib/endorsed</code> directo
 ry for the jvm or as specified by the container.</p><p>Hope this post saves newbie Camel riders some time.</p></blockquote><p></p><h3 id="BookInOnePage-SeeAlso.91">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul>
 </div></div>
         </td>

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/xslt.html
==============================================================================
--- websites/production/camel/content/xslt.html (original)
+++ websites/production/camel/content/xslt.html Wed Aug 27 08:18:38 2014
@@ -155,7 +155,21 @@
 </div></div><p>From Camel 2.10.4 onwards we have made this easier as Camel will use the prefix from the endpoint configuration as the default prefix. So from Camel 2.10.4 onwards you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;xsl:include href=&quot;staff_template.xsl&quot;/&gt;
 ]]></script>
-</div></div><p>Which will load the staff_template.xsl resource from the file system, as the endpoint was configured with "file:" as prefix.<br clear="none"> You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources.</p><h3 id="XSLT-Dynamicstylesheets">Dynamic stylesheets</h3><p>To provide a dynamic stylesheet at runtime you can define a dynamic URI. See&#160;<a shape="rect" href="how-to-use-a-dynamic-uri-in-to.html">How to use a dynamic URI in to()</a> for more information.</p><p><strong>Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)</strong><br clear="none"> Camel provides the <code>CamelXsltResourceUri</code> header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime.</p><h3 id="XSLT-NotesonusingXSLTandJavaVersions">
 Notes on using XSLT and Java Versions</h3><p>Here are some observations from Sameer, a Camel user, which he kindly shared with us:</p><blockquote><p>In case anybody faces issues with the XSLT endpoint please review these points.</p><p>I was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within.</p><p>No explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicating that the XMLConverter bean could no be initialized.</p><p>After a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):</p><p>1. Use the transformerFactory option in the route <code>("xslt:my-transformer.xsl?transformerFactory=tFactory")</code> with the <code>tFactory</code> bean having bean defined in the spring context for <code>cla
 ss="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"</code>.<br clear="none"> 2. Added the Xalan jar into my maven pom.</p><p>My guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page.</p><p>Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the <code>jre/lib/endorsed</code> directory for the jvm or as specified by the container.</p><p>Hope this post saves newbie Camel riders some time.</p></blockquote><p></p><h3 id="XSLT-SeeAlso">See Also</h3>
+</div></div><p>Which will load the staff_template.xsl resource from the file system, as the endpoint was configured with "file:" as prefix.<br clear="none"> You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources.</p><h3 id="XSLT-Dynamicstylesheets">Dynamic stylesheets</h3><p>To provide a dynamic stylesheet at runtime you can define a dynamic URI. See&#160;<a shape="rect" href="how-to-use-a-dynamic-uri-in-to.html">How to use a dynamic URI in to()</a> for more information.</p><p><strong>Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)</strong><br clear="none"> Camel provides the <code>CamelXsltResourceUri</code> header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime.</p><h3 id="XSLT-Accessingwarnings,errorsandfatalE
 rrorsfromXSLTErrorListener">Accessing warnings, errors and fatalErrors from XSLT ErrorListener</h3><p><strong>Available as of Camel 2.14</strong></p><p>From Camel 2.14 onwards, any warning/error or fatalError is stored on the current Exchange as a property with the keys&#160;<code>Exchange.XSLT_ERROR</code>,&#160;<code>Exchange.XSLT_FATAL_ERROR</code>, or&#160;<code>Exchange.XSLT_WARNING</code> which allows end users to get hold of any errors happening during transformation.</p><p>For example in the stylesheet below, we want to terminate if a staff has an empty dob field. And to include a custom error message using xsl:message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;xsl:template match=&quot;/&quot;&gt;
+    &lt;html&gt;
+      &lt;body&gt;
+        &lt;xsl:for-each select=&quot;staff/programmer&quot;&gt;
+          &lt;p&gt;Name: &lt;xsl:value-of select=&quot;name&quot;/&gt;&lt;br /&gt;
+            &lt;xsl:if test=&quot;dob=&#39;&#39;&quot;&gt;
+              &lt;xsl:message terminate=&quot;yes&quot;&gt;Error: DOB is an empty string!&lt;/xsl:message&gt;
+            &lt;/xsl:if&gt;
+          &lt;/p&gt;
+        &lt;/xsl:for-each&gt;
+      &lt;/body&gt;
+    &lt;/html&gt;
+  &lt;/xsl:template&gt;]]></script>
+</div></div><p>This information is not available on the Exchange stored as an Exception that contains the message in the <code>getMessage()</code> method on the exception. The exception is stored on the Exchange as a warning with the key<span style="line-height: 1.4285715;">&#160;</span><code style="line-height: 1.4285715;">Exchange.XSLT_WARNING.</code></p><h3 id="XSLT-NotesonusingXSLTandJavaVersions">Notes on using XSLT and Java Versions</h3><p>Here are some observations from Sameer, a Camel user, which he kindly shared with us:</p><blockquote><p>In case anybody faces issues with the XSLT endpoint please review these points.</p><p>I was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within.</p><p>No explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicating that the XMLCon
 verter bean could no be initialized.</p><p>After a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):</p><p>1. Use the transformerFactory option in the route <code>("xslt:my-transformer.xsl?transformerFactory=tFactory")</code> with the <code>tFactory</code> bean having bean defined in the spring context for <code>class="org.apache.xalan.xsltc.trax.TransformerFactoryImpl"</code>.<br clear="none"> 2. Added the Xalan jar into my maven pom.</p><p>My guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page.</p><p>Another note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the <code>jre/lib/endorsed</code> directory for th
 e jvm or as specified by the container.</p><p>Hope this post saves newbie Camel riders some time.</p></blockquote><p></p><h3 id="XSLT-SeeAlso">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul></div>
         </td>
         <td valign="top">