diff --git a/array/index-of.xml b/array/index-of.xml index fd840f7c..f16ef552 100644 --- a/array/index-of.xml +++ b/array/index-of.xml @@ -1,8 +1,7 @@ - - Tests for the array:index-of() function (4.0 proposal) - - + + Tests for the array:index-of() function (4.0) + diff --git a/array/of.xml b/array/of.xml deleted file mode 100644 index 1713d3b4..00000000 --- a/array/of.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - Tests for the proposed XPath 4.0 array:of() function - - - - - - Create an empty array - - array:of(()) - - [] - - - - - Create a singleton array - - - array:of(map{'value':1}) - - [1] - - - - - Create a singleton array whose member is a sequence - - - array:of(map{'value':(1 to 5)}) - - [(1 to 5)] - - - - - Create a more complex array - - - - array:of((map:entry('value', 1 to 3), map:entry('value', 11 to 13))) - - [(1, 2, 3), (11, 12, 13)] - - - - - Create a more complex array - - - array:of(("The price of freedom" => tokenize()) ! map:entry('value', characters(.))) - - [("T", "h", "e"), ("p", "r", "i", "c", "e"), ("o", "f"), ("f", "r", "e", "e", "d", "o", "m")] - - - - - Reconstruct an array - - array:of(array:members([("T", "h", "e"), ("p", "r", "i", "c", "e"), ("o", "f"), ("f", "r", "e", "e", "d", "o", "m")])) - - [("T", "h", "e"), ("p", "r", "i", "c", "e"), ("o", "f"), ("f", "r", "e", "e", "d", "o", "m")] - - - - - - - diff --git a/array/values.xml b/array/values.xml new file mode 100644 index 00000000..7ae25a0e --- /dev/null +++ b/array/values.xml @@ -0,0 +1,85 @@ + + + Tests for the XPath 4.0 array:values() function + + + + + + Deconstruct an empty array + + array:values([]) + + + + + + + Deconstruct a singleton array + + array:values([1]) + + 1 + + + + + Deconstruct a more complex array + + array:values([1, (2,3)]) + + 3 + + + + + Deconstruct a more complex array + + array:values([1, (2,3)]) + + 1, 2, 3 + + + + + Deconstruct a more complex array + + array:values([1, (2,3), ()]) + + 1, 2, 3 + + + + + Not recursive + + array:values([1, [2,3], []]) + + 1, [2,3], [] + + + + + Argument must not be empty sequence + + array:values(()) + + + + + + + Argument must not be sequence of arrays + + array:values(([1], [2])) + + + + + + + + + + + diff --git a/catalog.xml b/catalog.xml index 3c08d97d..8e0bade5 100644 --- a/catalog.xml +++ b/catalog.xml @@ -399,6 +399,7 @@ + diff --git a/fn/distinct-values.xml b/fn/distinct-values.xml index 42650ad3..76216bf8 100644 --- a/fn/distinct-values.xml +++ b/fn/distinct-values.xml @@ -1333,7 +1333,7 @@ - + Collation set to () @@ -1343,7 +1343,7 @@ - + Collation set to () @@ -1353,7 +1353,7 @@ - + Collation set to () dynamically @@ -1363,7 +1363,7 @@ - + In 4.0 order of results is predictable (assumes ordering mode = ordered) diff --git a/fn/duplicate-values.xml b/fn/duplicate-values.xml index 2b41ff64..23896c75 100644 --- a/fn/duplicate-values.xml +++ b/fn/duplicate-values.xml @@ -1,8 +1,6 @@ - - Tests for the duplicate-values() function - + + Tests for the duplicate-values() function (4.0) @@ -1303,7 +1301,7 @@ duplicate-values( - + Collation set to () fn:duplicate-values(("a", "a"), ()) @@ -1312,7 +1310,7 @@ duplicate-values( - + Collation set to () count(fn:duplicate-values(("a", "b", "a"), collation:=())) @@ -1321,7 +1319,7 @@ duplicate-values( - + Collation set to () dynamically count(fn:duplicate-values(("a", "b", "a"), collation:="xyz"[current-date() lt xs:date('1999-01-01')])) @@ -1330,7 +1328,7 @@ duplicate-values( - + Order of results is predictable (assumes ordering mode = ordered) diff --git a/fn/seconds.xml b/fn/seconds.xml index 4af5dd63..4da53f63 100644 --- a/fn/seconds.xml +++ b/fn/seconds.xml @@ -1,8 +1,6 @@ - - Tests for the seconds() function - + + Tests for the seconds() function (4.0) diff --git a/fn/sort-with.xml b/fn/sort-with.xml index 1a0fcd6a..3ff055f8 100644 --- a/fn/sort-with.xml +++ b/fn/sort-with.xml @@ -1,6 +1,5 @@ - + Tests for the fn:sort-with function - diff --git a/fn/subsequence-where.xml b/fn/subsequence-where.xml index 2c3fd69b..2c8a7e7b 100644 --- a/fn/subsequence-where.xml +++ b/fn/subsequence-where.xml @@ -1,10 +1,8 @@ - Tests for the fn:subsequence-where function (4.0 proposal) - + Tests for the fn:subsequence-where function (4.0) - + Basic example diff --git a/fn/void.xml b/fn/void.xml index 2aa3142b..12576653 100644 --- a/fn/void.xml +++ b/fn/void.xml @@ -1,10 +1,7 @@ - - Tests for the fn:log() function (4.0 proposal) - - + + Tests for the fn:void() function (4.0) + @@ -42,7 +39,7 @@ - + Use void#0 function item (1 to 10) => for-each(if (current-date() lt xs:date('1900-01-01')) @@ -53,7 +50,7 @@ - + Direct call on void#0 empty(void()) diff --git a/prod/Annotation.xml b/prod/Annotation.xml index ef5571f9..e84b80d8 100644 --- a/prod/Annotation.xml +++ b/prod/Annotation.xml @@ -1,10 +1,7 @@ - + Tests for function and variable annotations - - + @@ -640,7 +637,7 @@ - + Annotation value true() @@ -657,7 +654,7 @@ - + Annotation value false() @@ -674,7 +671,7 @@ - + Annotation value true() with whitespace @@ -691,7 +688,7 @@ - + Annotation value false() with whitespace and comments @@ -708,7 +705,7 @@ - + Annotation value false() with namespace prefix: not allowed @@ -725,7 +722,7 @@ - + Annotation values true() and false() mixed with others @@ -742,7 +739,7 @@ - + Annotation value true() used with a variable @@ -757,7 +754,7 @@ - + Hex integers are allowed @@ -773,7 +770,7 @@ - + Underscores in integers are allowed @@ -789,7 +786,7 @@ - + Binary integers are allowed @@ -805,7 +802,7 @@ - + Negative numbers are allowed @@ -821,7 +818,7 @@ - + Negative numbers are allowed @@ -837,7 +834,7 @@ - + Negative strings are not allowed @@ -853,7 +850,7 @@ - + Negative booleans are not allowed @@ -869,8 +866,8 @@ - - Double negatuves are not allowed + + Double negatives are not allowed + + String templates are not allowed + + + + + + + + - + Tests that a function test with an annotation assertion parses. The behavior of annotation assertions is @@ -905,7 +918,7 @@ - + An annotation assertion with a string literal parameter. Tests the parsing of annotation assertions. @@ -921,7 +934,7 @@ - + An annotation assertion with an integer literal parameter. Tests the parsing of annotation assertions. @@ -937,7 +950,7 @@ - + An annotation assertion with a decimal literal parameter. Tests the parsing of annotation assertions. @@ -953,7 +966,7 @@ - + An annotation assertion with a double literal parameter Tests the parsing of annotation assertions. @@ -969,7 +982,7 @@ - + An annotation assertion with multiple parameters Tests the parsing of annotation assertions. @@ -985,7 +998,7 @@ - + An annotation assertion with an expanded QName Tests the parsing of annotation assertions. @@ -1001,7 +1014,7 @@ - + An annotation assertion with an expanded QName. Tests the parsing of annotation assertions. @@ -1017,7 +1030,7 @@ - + Multiple annotation assertions. Tests the parsing of annotation assertions. @@ -1033,7 +1046,7 @@ - + An annotation assertion on a typed function test. Tests the parsing of annotation assertions. @@ -1049,7 +1062,7 @@ - + An annotation assertion in a reserved namespace. @@ -1061,7 +1074,7 @@ - + An annotation assertion in a reserved namespace. @@ -1074,7 +1087,7 @@ - + An annotation assertion in a reserved namespace. @@ -1086,7 +1099,7 @@ - + An annotation assertion in a reserved namespace. @@ -1099,7 +1112,7 @@ - + An annotation assertion in a reserved namespace. @@ -1111,7 +1124,7 @@ - + An annotation assertion in a reserved namespace. @@ -1123,7 +1136,7 @@ - + An annotation assertion in a reserved namespace. @@ -1136,7 +1149,7 @@ - + An annotation assertion in a reserved namespace. @@ -1150,7 +1163,7 @@ - + Two annotation assertions with the same name Tests the parsing of annotation assertions. @@ -1165,7 +1178,7 @@ - + In a list of function annotation assertions, %public and %private can be mixed. @@ -1185,7 +1198,7 @@ - + In an annotation assertion, the value true() can be used @@ -1198,7 +1211,7 @@ - + In an annotation assertion, the value false() can be used @@ -1211,7 +1224,7 @@ - + In an annotation assertion, the values true() and false() can be used together @@ -1224,7 +1237,7 @@ - + In an annotation assertion, comments can be used together with true() and false() @@ -1237,7 +1250,7 @@ - + In an annotation assertion, negative numbers are allowed @@ -1250,5 +1263,18 @@ + + + In an annotation assertion, string templates are not allowed + + + + + + + diff --git a/prod/Literal.xml b/prod/Literal.xml index 0121857c..8e05bacf 100644 --- a/prod/Literal.xml +++ b/prod/Literal.xml @@ -1,9 +1,7 @@ Tests for the Literal production - - + Simple use case for string literals @@ -1703,7 +1701,7 @@ line2 - + hex numeric literal @@ -1713,7 +1711,7 @@ line2 - + hex numeric literal @@ -1723,7 +1721,7 @@ line2 - + hex numeric literal @@ -1733,7 +1731,7 @@ line2 - + hex numeric literal @@ -1743,7 +1741,7 @@ line2 - + hex numeric literal @@ -1753,7 +1751,7 @@ line2 - + hex numeric literal @@ -1763,7 +1761,7 @@ line2 - + hex numeric literals in context @@ -1773,7 +1771,7 @@ line2 - + long hex numeric literal @@ -1786,7 +1784,7 @@ line2 - + long hex numeric literal arithmetic @@ -1799,7 +1797,7 @@ line2 - + long hex numeric literal arithmetic @@ -1812,7 +1810,7 @@ line2 - + Hex/binary literals in annotation parameter @@ -1830,7 +1828,7 @@ line2 - + binary numeric literals @@ -1840,7 +1838,7 @@ line2 - + binary numeric literals @@ -1850,7 +1848,7 @@ line2 - + long binary numeric literal @@ -1863,7 +1861,7 @@ line2 - + underscores in integer literals @@ -1873,7 +1871,7 @@ line2 - + underscores in integer literals @@ -1883,7 +1881,7 @@ line2 - + underscores in decimal literals @@ -1893,7 +1891,7 @@ line2 - + invalid integer literal - underscore not allowed here @@ -1903,7 +1901,7 @@ line2 - + underscores in double literals @@ -1913,7 +1911,7 @@ line2 - + underscores in function references @@ -1923,7 +1921,7 @@ line2 - + underscores in lookup expressions @@ -1933,7 +1931,7 @@ line2 - + underscores in lookup expressions @@ -1945,7 +1943,7 @@ line2 - + invalid hex literal @@ -1955,7 +1953,7 @@ line2 - + invalid hex literal @@ -1965,7 +1963,7 @@ line2 - + invalid hex literal @@ -1975,7 +1973,7 @@ line2 - + invalid binary literal @@ -1985,7 +1983,7 @@ line2 - + invalid decimal literal @@ -1995,7 +1993,7 @@ line2 - + invalid float literal @@ -2005,7 +2003,7 @@ line2 - + invalid integer literal @@ -2015,7 +2013,7 @@ line2 - + hex literals not allowed in function references @@ -2025,7 +2023,7 @@ line2 - + hex literals not allowed on rhs of lookup @@ -2035,7 +2033,7 @@ line2 - + There must be at least one digit @@ -2045,7 +2043,7 @@ line2 - + There must be at least one digit @@ -2055,7 +2053,7 @@ line2 - + Misplaced sign @@ -2065,7 +2063,7 @@ line2 - + Misplaced underscore @@ -2075,7 +2073,7 @@ line2 - + Misplaced underscore @@ -2085,7 +2083,7 @@ line2 - + Misplaced underscore @@ -2095,7 +2093,7 @@ line2 - + Misplaced underscore @@ -2105,7 +2103,7 @@ line2 - + Hex fractional part @@ -2115,7 +2113,7 @@ line2 - + Hex fractional part @@ -2125,7 +2123,7 @@ line2 - + Hex fractional part @@ -2134,4 +2132,44 @@ line2 + + + Underscore disallowed before decimal point + + + 0_.001 + + + + + + + Underscore disallowed after decimal point + + + 0._001 + + + + + + + Underscore disallowed after exponent separator + + + 0.001e_-3 + + + + + + + Underscore disallowed before exponent separator + + + 0.001_e-3 + + + + diff --git a/prod/Predicate.xml b/prod/Predicate.xml index 547db8f2..aa60ddc3 100644 --- a/prod/Predicate.xml +++ b/prod/Predicate.xml @@ -2207,7 +2207,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Predicate in 4.0 can be a sequence of numbers @@ -2217,7 +2217,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Predicate in 4.0 can be a sequence of numbers @@ -2227,7 +2227,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Numbers out of order @@ -2237,7 +2237,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + If one item is numeric, all must be numeric @@ -2247,7 +2247,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Negative numbers are allowed and effectively ignored @@ -2257,7 +2257,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Non-integral numbers are allowed and effectively ignored @@ -2267,7 +2267,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Numeric predicate can depend on focus @@ -2277,7 +2277,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Type of predicate not known statically @@ -2287,7 +2287,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Type of predicate not known statically, error case @@ -2297,7 +2297,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Performance hopefully is not quadratic @@ -2309,7 +2309,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Range using variables @@ -2321,7 +2321,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Range using last() @@ -2333,7 +2333,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + Type of predicate not known statically, and dependent on focus @@ -2343,7 +2343,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + A predicate starting with a number and ending with a string. @@ -2356,7 +2356,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + A predicate starting with a number and ending with a string. @@ -2369,7 +2369,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + A predicate starting with a number and ending with a string. @@ -2382,7 +2382,7 @@ count((-1, 0, 1, 2147483647, 2147483648, 2147483649, 4294967295, 4294967296, 429 - + A predicate starting with a number and ending with a string. diff --git a/prod/RecordTest.xml b/prod/RecordTest.xml index 64bd2d51..15740d00 100644 --- a/prod/RecordTest.xml +++ b/prod/RecordTest.xml @@ -1,8 +1,6 @@ - + Tests for RecordTest item type (proposed 4.0 extension) - diff --git a/prod/WhileClause.xml b/prod/WhileClause.xml index 1a5b1a50..1fe5dc90 100644 --- a/prod/WhileClause.xml +++ b/prod/WhileClause.xml @@ -1,9 +1,6 @@ - + Tests for the WhileClause production in 4.0 - -