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
//BBB. But it seems that it only returns the ones matching
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://showreport?report_id=51390
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.
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…
I am going to suppress the Feedback case.
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://showreport?report_id=51393) …