camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phobos <sm0k3...@gmail.com>
Subject Re: Camel XQuery - Saxon
Date Wed, 06 Mar 2013 09:21:51 GMT

Hi,

I've tried the following;

Define myNamespaces in the context as a spring bean;

    <bean id="myNamespaces" class="java.util.HashMap">
        <constructor-arg>
            <map>
                <entry key="math" value="java:java.lang.Math" />
            </map>
        </constructor-arg>
    </bean>

Route;

>       from("direct:transform-queue"). 
>               to("xquery:transform.xqy?namespaces=#myNamespaces"). 
>               to("log:com.mydomain.TransformerRoute?level=INFO"); 

transform.xqy;

<Test rand="{ math:random() }" />


The XQuery processor appears to resolve the map as no type mismatch
exception is thrown but when processing the XQuery the following exception
is still thrown;

org.apache.camel.RuntimeExpressionException:
net.sf.saxon.trans.XPathException: Cannot find a matching 0-argument
function named {java:java.lang.Math}random()

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-XQuery-Saxon-tp5728490p5728655.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message