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 2012/09/16 19:18:44 UTC
svn commit: r832160 - in /websites/production/camel/content:
book-in-one-page.html book-languages-appendix.html cache/main.pageCache
xpath.html
Author: buildbot
Date: Sun Sep 16 17:18:44 2012
New Revision: 832160
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/book-languages-appendix.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/xpath.html
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 Sun Sep 16 17:18:44 2012
@@ -10417,6 +10417,43 @@ xpath(<span class="code-quote">"/foo:per
</div></div>
<p>Where we use the xpath function concat to prefix the order name with <tt>foo-</tt>. In this case we have to specify that we want a String as result type so the concat function works.</p>
+<h3><a shape="rect" name="BookInOnePage-UsingXPathonHeaders"></a>Using XPath on Headers</h3>
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>Some users may have XML stored in a header. To apply an XPath to a header's value you can do this by defining the 'headerName' attribute.</p>
+
+<p>In Blueprint DSL :</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<blueprint xmlns=<span class="code-quote">"http://www.osgi.org/xmlns/blueprint/v1.0.0"</span>
+ <span class="code-keyword">xmlns:foo</span>=<span class="code-quote">"http://example.com/person"</span>
+ <span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
+ xsi:schemaLocation="
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <span class="code-tag"><camelContext id=<span class="code-quote">"xpathHeaderNameTest"</span> xmlns=<span class="code-quote">"http://camel.apache.org/schema/blueprint"</span>></span>
+ <span class="code-tag"><route></span>
+ <span class="code-tag"><from uri=<span class="code-quote">"direct:in"</span>/></span>
+ <span class="code-tag"><choice></span>
+ <span class="code-tag"><when></span>
+ <span class="code-tag"><xpath headerName=<span class="code-quote">"invoiceDetails"</span>></span>/invoice/@orderType = 'premium'<span class="code-tag"></xpath></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:premium"</span>/></span>
+ <span class="code-tag"></when></span>
+ <span class="code-tag"><when></span>
+ <span class="code-tag"><xpath headerName=<span class="code-quote">"invoiceDetails"</span>></span>/invoice/@orderType = 'standard'<span class="code-tag"></xpath></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:standard"</span>/></span>
+ <span class="code-tag"></when></span>
+ <span class="code-tag"><otherwise></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:unknown"</span>/></span>
+ <span class="code-tag"></otherwise></span>
+ <span class="code-tag"></choice></span>
+ <span class="code-tag"></route></span>
+ <span class="code-tag"></camelContext></span>
+
+<span class="code-tag"></blueprint></span>
+</pre>
+</div></div>
+
<h3><a shape="rect" name="BookInOnePage-Examples"></a>Examples</h3>
<p>Here is a simple <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java">example</a> using an XPath expression as a predicate in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a></p>
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 Sun Sep 16 17:18:44 2012
@@ -2437,6 +2437,43 @@ xpath(<span class="code-quote">"/foo:per
</div></div>
<p>Where we use the xpath function concat to prefix the order name with <tt>foo-</tt>. In this case we have to specify that we want a String as result type so the concat function works.</p>
+<h3><a shape="rect" name="BookLanguagesAppendix-UsingXPathonHeaders"></a>Using XPath on Headers</h3>
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>Some users may have XML stored in a header. To apply an XPath to a header's value you can do this by defining the 'headerName' attribute.</p>
+
+<p>In Blueprint DSL :</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<blueprint xmlns=<span class="code-quote">"http://www.osgi.org/xmlns/blueprint/v1.0.0"</span>
+ <span class="code-keyword">xmlns:foo</span>=<span class="code-quote">"http://example.com/person"</span>
+ <span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
+ xsi:schemaLocation="
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <span class="code-tag"><camelContext id=<span class="code-quote">"xpathHeaderNameTest"</span> xmlns=<span class="code-quote">"http://camel.apache.org/schema/blueprint"</span>></span>
+ <span class="code-tag"><route></span>
+ <span class="code-tag"><from uri=<span class="code-quote">"direct:in"</span>/></span>
+ <span class="code-tag"><choice></span>
+ <span class="code-tag"><when></span>
+ <span class="code-tag"><xpath headerName=<span class="code-quote">"invoiceDetails"</span>></span>/invoice/@orderType = 'premium'<span class="code-tag"></xpath></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:premium"</span>/></span>
+ <span class="code-tag"></when></span>
+ <span class="code-tag"><when></span>
+ <span class="code-tag"><xpath headerName=<span class="code-quote">"invoiceDetails"</span>></span>/invoice/@orderType = 'standard'<span class="code-tag"></xpath></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:standard"</span>/></span>
+ <span class="code-tag"></when></span>
+ <span class="code-tag"><otherwise></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:unknown"</span>/></span>
+ <span class="code-tag"></otherwise></span>
+ <span class="code-tag"></choice></span>
+ <span class="code-tag"></route></span>
+ <span class="code-tag"></camelContext></span>
+
+<span class="code-tag"></blueprint></span>
+</pre>
+</div></div>
+
<h3><a shape="rect" name="BookLanguagesAppendix-Examples"></a>Examples</h3>
<p>Here is a simple <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java">example</a> using an XPath expression as a predicate in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a></p>
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/xpath.html
==============================================================================
--- websites/production/camel/content/xpath.html (original)
+++ websites/production/camel/content/xpath.html Sun Sep 16 17:18:44 2012
@@ -233,6 +233,43 @@ xpath(<span class="code-quote">"/foo:per
</div></div>
<p>Where we use the xpath function concat to prefix the order name with <tt>foo-</tt>. In this case we have to specify that we want a String as result type so the concat function works.</p>
+<h3><a shape="rect" name="XPath-UsingXPathonHeaders"></a>Using XPath on Headers</h3>
+<p><b>Available as of Camel 2.11</b></p>
+
+<p>Some users may have XML stored in a header. To apply an XPath to a header's value you can do this by defining the 'headerName' attribute.</p>
+
+<p>In Blueprint DSL :</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<pre class="code-xml">
+<blueprint xmlns=<span class="code-quote">"http://www.osgi.org/xmlns/blueprint/v1.0.0"</span>
+ <span class="code-keyword">xmlns:foo</span>=<span class="code-quote">"http://example.com/person"</span>
+ <span class="code-keyword">xmlns:xsi</span>=<span class="code-quote">"http://www.w3.org/2001/XMLSchema-instance"</span>
+ xsi:schemaLocation="
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <span class="code-tag"><camelContext id=<span class="code-quote">"xpathHeaderNameTest"</span> xmlns=<span class="code-quote">"http://camel.apache.org/schema/blueprint"</span>></span>
+ <span class="code-tag"><route></span>
+ <span class="code-tag"><from uri=<span class="code-quote">"direct:in"</span>/></span>
+ <span class="code-tag"><choice></span>
+ <span class="code-tag"><when></span>
+ <span class="code-tag"><xpath headerName=<span class="code-quote">"invoiceDetails"</span>></span>/invoice/@orderType = 'premium'<span class="code-tag"></xpath></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:premium"</span>/></span>
+ <span class="code-tag"></when></span>
+ <span class="code-tag"><when></span>
+ <span class="code-tag"><xpath headerName=<span class="code-quote">"invoiceDetails"</span>></span>/invoice/@orderType = 'standard'<span class="code-tag"></xpath></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:standard"</span>/></span>
+ <span class="code-tag"></when></span>
+ <span class="code-tag"><otherwise></span>
+ <span class="code-tag"><to uri=<span class="code-quote">"mock:unknown"</span>/></span>
+ <span class="code-tag"></otherwise></span>
+ <span class="code-tag"></choice></span>
+ <span class="code-tag"></route></span>
+ <span class="code-tag"></camelContext></span>
+
+<span class="code-tag"></blueprint></span>
+</pre>
+</div></div>
+
<h3><a shape="rect" name="XPath-Examples"></a>Examples</h3>
<p>Here is a simple <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java">example</a> using an XPath expression as a predicate in a <a shape="rect" href="message-filter.html" title="Message Filter">Message Filter</a></p>