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.

Reply via email to