Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2179

XPath selector fails to select messages correctly when the expression evaluates to 'true'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0.0, 5.1.0, 5.2.0
    • 5.3.0
    • Selector
    • None
    • Windows XP

    • Patch Available

    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:

      <root>
        <a key='first' num='1'/>
        <b key='second' num='2'>b</b>
      </root>
      

      A consumer using an XPath selector with an expression such as:

      XPATH '/root/b="b"'
      

      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.

      Attachments

        1. AMQ-2179.patch
          6 kB
          Giovani Seben

        Activity

          People

            dejanb Dejan Bosanac
            gseben Giovani Seben
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: