XQL doesn't seem to handle the | (union) operator

  1. last year

    Martinho D

    13 Feb 2018 Pre-Release Testers, Xojo Pro France

    The XPath 1.0 reference describes the | operator (https://www.w3.org/TR/xpath/#node-sets ) as the "union" operator.

    So the following syntax //AAA|//BBB should return the nodes that match //AAA and //BBB. But it seems that it only returns the ones matching //AAA

    The syntax seems to be accepted as it doesn't raise an XMLException (wrong expression syntax) but the XQL method doesn't handle it as it should...

    Am I wrong ?

    By the way I created a Feedback case Feedback Case #51390

  2. Jean-Yves P

    13 Feb 2018 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    I suggest you make a small test project that confirm the problem, and upload it to feedback.
    it seems not so, Xojo team will ask you soon.

  3. Martinho D

    13 Feb 2018 Pre-Release Testers, Xojo Pro France

    your suggestion was more than good !
    while making a little test app I make it work !
    So the issue is not where I thought...

    The issue happens on a XML document build from scratch.
    But if I create a new XML document from the toString method of the previous one, the xql query (with |) works !

    Thai is strange... I have to digg more...

    Thank you.

    I am going to suppress the Feedback case.

  4. Martinho D

    13 Feb 2018 Pre-Release Testers, Xojo Pro France

    Well, I think I found the bug...

    with this very simple XML Document :

    <?xml version="1.0" encoding="UTF-8"?>

    if the XmlDocument instance if created by parsing the xml string (in the constructor), the XQL union operator runs well (/AAA/EEE | //BBB for instance)

    But, when the same XmlDocument instance if built "manually" from code like so :

    dim xml2 as new XmlDocument
    dim root as XmlNode = xml2.AppendChild(xml2.CreateElement("AAA"))
    dim ddd as XmlNode = xml2.CreateElement("DDD")

    the XQL union operator doesn't work anymore (/AAA/EEE | //BBB)

    I created a Feedback case with a test app that shows the issue (Feedback Case #51393) ...

or Sign Up to reply!