Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B51DE7C8F for ; Fri, 9 Dec 2011 12:23:10 +0000 (UTC) Received: (qmail 13755 invoked by uid 500); 9 Dec 2011 12:23:10 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 13680 invoked by uid 500); 9 Dec 2011 12:23:10 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 13671 invoked by uid 99); 9 Dec 2011 12:23:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2011 12:23:10 +0000 X-ASF-Spam-Status: No, hits=1.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of raul@fusesource.com designates 74.125.245.84 as permitted sender) Received: from [74.125.245.84] (HELO na3sys010aog108.obsmtp.com) (74.125.245.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2011 12:23:02 +0000 Received: from mail-gx0-f171.google.com ([209.85.161.171]) (using TLSv1) by na3sys010aob108.postini.com ([74.125.244.12]) with SMTP ID DSNKTuH9kNecn5uKAnfRxqili4CTPtEcWHvl@postini.com; Fri, 09 Dec 2011 04:22:41 PST Received: by mail-gx0-f171.google.com with SMTP id h4so2513310ggn.16 for ; Fri, 09 Dec 2011 04:22:40 -0800 (PST) Received: by 10.182.154.66 with SMTP id vm2mr413613obb.52.1323433360257; Fri, 09 Dec 2011 04:22:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.118.97 with HTTP; Fri, 9 Dec 2011 04:22:19 -0800 (PST) In-Reply-To: <1323288952661-5056836.post@n5.nabble.com> References: <1322851580731-5042885.post@n5.nabble.com> <1323193792773-5052886.post@n5.nabble.com> <1323246148256-5054792.post@n5.nabble.com> <1323273326843-5056082.post@n5.nabble.com> <1323288952661-5056836.post@n5.nabble.com> From: Raul Kripalani Date: Fri, 9 Dec 2011 12:22:19 +0000 Message-ID: Subject: Re: Velocity without java To: users@camel.apache.org Content-Type: multipart/alternative; boundary=f46d0447a0af5272a904b3a7d708 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0447a0af5272a904b3a7d708 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 different. 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. Regards, Ra=FAl. On 7 December 2011 20:15, MichaelAtSAG wrote: > @Raul > > You are correct, my xpath did mix up the two event types in the xpath. Th= e > 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! > > > > resultType=3D"java.lang.String">/evt:Event/evt:Body/pay:PartInventoryShor= tage/pay:Part/pay:ItemID > > > 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 differe= nt > topic for this. > > Thank you Raul!! > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Velocity-without-java-tp5042885p5056836= .html > Sent from the Camel - Users mailing list archive at Nabble.com. > --f46d0447a0af5272a904b3a7d708--