Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 39247 invoked from network); 24 Mar 2009 16:23:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2009 16:23:06 -0000 Received: (qmail 24676 invoked by uid 500); 24 Mar 2009 16:23:06 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 24637 invoked by uid 500); 24 Mar 2009 16:23:06 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 24624 invoked by uid 99); 24 Mar 2009 16:23:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2009 16:23:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2009 16:23:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C30E8234C003 for ; Tue, 24 Mar 2009 09:22:42 -0700 (PDT) Message-ID: <1612066571.1237911762797.JavaMail.jira@brutus> Date: Tue, 24 Mar 2009 09:22:42 -0700 (PDT) From: "Giovani Seben (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (AMQ-2179) XPath selector fails to select messages correctly when the expression evaluates to 'true' In-Reply-To: <202110643.1237911523561.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-2179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Giovani Seben updated AMQ-2179: ------------------------------- Description: Currently the XalanXPathEvaluator class will return 'true' or 'false' based on the existence of a node in the XML document that matches the XPath expression. However, XPath expressions themselves can return values of true or false based on a comparison criteria. For example, for an input message: {code} b {code} A consumer using an XPath selector with an expression such as: {code} XPATH '/root/b="b"' {code} should successfully select and consume the message above. The evaluator today would attempt to retrieve a XML node with that expression, but it would fail and return false since the returned value of the expression is a Boolean. The XPath Selector should be able to handle Boolean expressions. was: Currently the XalanXPathEvaluator class will return 'true' or 'false' based on the existence of a node in the XML document that matches the XPath expression. However, XPath expressions themselves can return values of true or false based on a comparison criteria. For example, for an input message: {code} b {code} A consumer using an XPath selector with an expression such as: {code} XPATH '/root/b/text()="b"' {code} should successfully select and consume the message above. The evaluator today would attempt to retrieve a XML node with that expression, but it would fail and return false since the returned value of the expression is a Boolean. The XPath Selector should be able to handle Boolean expressions. > XPath selector fails to select messages correctly when the expression evaluates to 'true' > ------------------------------------------------------------------------------------------ > > Key: AMQ-2179 > URL: https://issues.apache.org/activemq/browse/AMQ-2179 > Project: ActiveMQ > Issue Type: Bug > Components: Selector > Affects Versions: 5.0.0, 5.1.0, 5.2.0 > Environment: Windows XP > Reporter: Giovani Seben > Fix For: 5.3.0 > > > Currently the XalanXPathEvaluator class will return 'true' or 'false' based on the existence of a node in the XML document that matches the XPath expression. However, XPath expressions themselves can return values of true or false based on a comparison criteria. > For example, for an input message: > {code} > > > b > > {code} > A consumer using an XPath selector with an expression such as: > {code} > XPATH '/root/b="b"' > {code} > should successfully select and consume the message above. > The evaluator today would attempt to retrieve a XML node with that expression, but it would fail and return false since the returned value of the expression is a Boolean. > The XPath Selector should be able to handle Boolean expressions. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.