Or, actually, for <a>2</a> and <b>11</b>, a is greater than b in XPath 2.0+ but not in XPath 1.0...

--Alain
Le 23/04/2021 12:56, Alain Couthures <alain.couthures@agencexml.com> a écrit :


For example, "2" is greater than "11" in XPath 2.0+ but not in XPath 1.0!

--Alain
Le 23/04/2021 12:16, Steven Pemberton <steven.pemberton@cwi.nl> a écrit :


This sounds like a good plan. What is it exactly that fails with the comparisons? 

Steven

On Thursday 22 April 2021 09:10:18 (+02:00), Alain Couthures wrote:

Hello,

The main form of the testsuite does not currently work well with XPath 2.0+ (with Compatibility Mode set to false) because of default text comparisons even with numeric values.

This is a well-documented difference with XPath 1.0: https://www.w3.org/TR/xpath20/#id-incompat-in-false-mode

Adding an explicit number() function call in expressions sounds like a good compatibility solution for both XPath 1.0 and XPath 2.0+ engines:
“. &gt; ../count” to be replaced with “number(.) &gt; number(../count)”

It might be interesting to add a mention to this in XForms 2.0 specifications. What do you think?

--Alain