camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <>
Subject Re: Velocity without java
Date Fri, 09 Dec 2011 12:22:19 GMT
As I said previously, the local-name() function won't help you as it
operates on a nodeset. I suggested it because I thought your use case was

The notation you are using: {namespace}local-name seems to be specific to
Java, so don't expect to find an XPath function to cover it.

You may look at implementing a simple regex expression to identify the
namespace and then use XPath 2.0 replace() function to get rid of it [1].

You will need to use Saxon for this, either via the XPath or XQuery
language. With XPath you will need to instruct Camel to use Saxon. The
XQuery language automatically uses Saxon.


On 7 December 2011 20:15, MichaelAtSAG <> wrote:

> @Raul
> You are correct, my xpath did mix up the two event types in the xpath. The
> event type is PartInventoryShortage, the wrong path was used in the xpath
> and the wrong XSD was pasted above. Once the xpath was changed to proper
> path using PartInventoryShortage instead of PartInventoryLow, it worked!
> <setHeader headerName="SItemID">
>        <xpath
> resultType="java.lang.String">/evt:Event/evt:Body/pay:PartInventoryShortage/pay:Part/pay:ItemID</xpath>
> </setHeader>
> We have an urgent situation. We need ${body.DesiredInventoryLevel} piece(s)
> for item number ABC123, yet suppliers only have
> ${body.SupplierInventoryLevel} piece(s).
> Issue <1> solved!
> I also still want to retrieve only the local part of the event type name, I
> am still playing with the use of local-name() xpath function, but I
> continue
> to get Invalid xpath when I use any xpath function. I will open a different
> topic for this.
> Thank you Raul!!
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message