On Wed, Aug 5, 2009 at 3:58 PM, zoorg<[email protected]> wrote: > > No I do not manage to make it working. > I am not sure but my conclusion was that camel use the jdk default > implementation to evaluate XPath expressions which only support XPath > version 1.0. And the "tokenize" function needs XPAth version 2.0. > But I think my problem is different than the other user since the > "substring" function is supported in XPath 1.0. > Regards > William >
Thanks for reporting back. Do you know which framework exists that support XPath 2.0? Maybe we could add configuration to Camel to select a XPath implementation to use? > > Claus Ibsen-2 wrote: >> >> On Sat, Jul 25, 2009 at 7:23 PM, zoorg<[email protected]> wrote: >>> >>> Hi, >>> >>> I tried to use the XPATH tokenize function in my camel workflow, but it >>> does >>> not work. >>> >>> Here is a piece of the code : >>> >>> from("direct:getEquipmentsState") >>> .splitter(new EquipmentStateAgregator(), true).xpath("//equipment") >>> >>> .setProperty("equipmentIp").xpath("tokenize(equipment/equipmentID/text(),'_')[1]", >>> String.class) >>> .to("log:body?showProperties=true") >>> .end() >>> .to("bean:diagnosticBean?method=buildResponse"); >>> >>> >>> And when sending my xml message to this endpoint I have the following >>> error >>> : >>> >>> javax.xml.transform.TransformerException: Cannot find the function : >>> tokenize >>> >>> Is there a way to use it inside a camel xpath function? >> >> Sorry for late reply. Another Camel user is asking this as well. >> Did you get anything working? >> >> A sample using JDK only would help to see what / if anything is >> missing in Camel to support functions. >> >> >>> >>> Thanks for your help >>> >>> Regards >>> >>> William >>> -- >>> View this message in context: >>> http://www.nabble.com/using-xpath-tokenize-function-inside-camel-tp24659816p24659816.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > -- > View this message in context: > http://www.nabble.com/using-xpath-tokenize-function-inside-camel-tp24659816p24827728.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
