Should have been ServiceMix version 3.3.1.17
Mike Wagner wrote:
>
> Trying to use namespaces in xpath expressions within servicemix-drools
> doesn't seem to recognize the namespaces. I saw a bug fix was made for
> this in 3.1 but still doesn't seem to work for me.
>
> for example XML:
>
> <invoice xmlns="urn:my:ns">
> <item>
> <name>Pen</name>
> <quantity>10</quantity>
> </item>
> <item>
> <name>Paper</name>
> <quantity>100</quantity>
> </item>
> </invoice>
>
>
> Drools file
> router.drl
>
> rule test
> when
> $me : Exchange(status == Exchange.ACTIVE, $in : in != null)
>
> eval($in.xpath("/invoice[namespace-uri='urn:my:ns']/item[1]/quantity > 5")
> then
> ...
>
>
> this evaluation returns false, but if I remove the namespace from the XML
> and replace the eval with the following it returns true, as expected.
>
> eval($in.xpath("/invoice/item[1]/quantity > 5")
>
>
>
--
View this message in context:
http://www.nabble.com/Xpath-with-Namespaces-in-servicemix-drools-SMX-v3.3.17-tp23565332p23565925.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.