# XML Query Test Suite Release Notes

This document contains the release notes for the XML Query Test Suite.

## XQTS 1.0.3 (Sept. 2010)

- Added 322 test cases that correspond to the errata that were incorporated into the XQuery 1.0 (Second Edition) Proposed Edited Recommendation. Each test case contains a "reflects-resolution" element that identifies the Bug Report that is associated with its erratum.
- Created a catalog file (XQTSCatalogSecondEdition.xml) that reflects only the test cases that correspond to the errata that were incorporated into the XQuery 1.0 (Second Edition) Proposed Edited Recommendation.
- Some XQuery 1.1 test cases have been added to the test suite. These test cases contain output-file or expected-error elements with attribute spec-version="1.1". An output-file or expected-error element without a spec-version attribute applies to all versions of XQuery. When this test suite is being used to test XQuery 1.0, a test case that contains only XQuery 1.1 results may be skipped.
- For the purposes of testing XQueryX 1.0, a test harness may now skip the execution of a test case when:
  1. the scenario is parse-error, or
  2. an XQuery 1.0 expected error is XPST0003, or
  3. the XQueryX document does not validate using the XQueryX 1.0 schema
- Added 4089 new test cases. Some of these reflect the resolution of XQTS issues (resolutions resulting in changes since the publication of XQTS 1.0.2).

## XQTS 1.0.2 (Nov. 20, 2006)

- Changed how the XQueryX documents are generated from the XQuery expressions in the test suite.

## XQTS 1.0.1 (Oct. 2, 2006)

- Added 19 test cases.
- Tests reflect Nov. 3, 2005 XML Query CR documents (republished on June 8, 2006).
  Changes have been made to reflect the resolutions of the following CR issues by the XML Query and XSL WGs:

  > 3416 | Base URI of a constructed element
  > 3637 | Adjacent text nodes
  > 3447 | xmlns="QNameXSD"
  > 3660 | Unclear what to do on external variable with no value
  > 3443 | additional expected values for decimal operations

## XQTS 1.0 (Aug. 18, 2006)

- Added 230 test cases.
- Added a small number of tests for the fn:collection function.
- Revised the catalog schema in several ways to better support test cases that use fn:doc, fn:collection, or use "." to refer to the context item provided by the host environment.
  1. Removed the context attribute from the input-file element.
  2. Added an input-URI element.
  3. Added a defaultCollection element.
  4. Added a contextItem element.

  The Guidelines for Running the XQuery Test Suite have been updated to explain this and provide examples.

- Added the following items to the list of implementation-defined items in the catalog:

  > [XQuery] externalFunctionCall | The result of an unsuccessful call to an external function (for example, if the function implementation cannot be found or does not return a value of the declared type).
  > [FuncOps] stringToDecimal | The result of casting a string to xs:decimal, when the resulting value is not too large or too small but nevertheless has too many decimal digits to be accurately represented, is implementation-defined. See 17.1.1 Casting from xs:string and xs:untypedAtomic.
  > [FuncOps] weakenStable | The manner in which implementations provide options to weaken the stable characteristic of 15.5.6 fn:collection and 15.5.4 fn:doc are implementation-defined.

- Tests reflect Nov. 3, 2005 XML Query CR documents (republished on June 8, 2006).
  Changes have been made to reflect the resolutions of the following CR issues by the XML Query and XSL WGs:

  > 3310 | "x" castable as xs:QName
  > 3312 | XPST0080, XPST0003 and XPST0051 overlaps
  > 2710 | extra white space in pragma content
  > 3358 | Rules for min() and max() handling of non-primitive types
  > 3369 | Operations on xs:duration
  > 3433 | Comparing xs:anyURI values

## XQTS 0.9.4 (June 9, 2006)

- Added more than 4000 test cases.
- Tests reflect Nov. 3, 2005 XML Query CR documents.
  Changes have been made to reflect the resolutions of the following CR issues by the XML Query and XSL WGs:

  > 2768 | constructing list of union types from PSVI
  > 3129 | Catalog info for cast-within-3 and cast-within-4 are swapped
  > 3303 | fn-base-uri-23 expects the uri to be escaped?
  > 436 | base-uri-8 should allow error FONS0005.
  > 435 | base-uri test cases should allow error XQST0046
  > 3307 | XQST0009 is also valid for validateexpr-*
  > 2900 | invalid argument to doc() in fn-doc-xx
  > 3152 | fn-data-1
  > 3281 | value-comparison-3 and value-comparison-4 without schema import
  > 3151 | extexpr-26
  > 2966 | TestSources/test1collide-lib doesn't exist
  > 2961 | fn-base-uri-2 results in XPTY0019 iso FOTY0011
  > 2959 | op-subtract-dateTimes-yielding-DTD-10
  > 2938 | what of the Base URI is set by the implementation?
  > 2936 | negative zero xs:float in expected results?
  > 3285 | fn-data-1: Typed value or not typed value?
  > 3280 | orderBy55 is missing an alternative result
  > 3279 | XQPST0081 is incorrectly used for undeclared variables
  > 3277 | incorrect alternate results in case of InfoSet mapping when testing fn:count(fn:data(.../idrefs))?
  > 3288 | full axis is an optional feature
  > 3274 | op-time-greater-than-2 test 'gt' not 'ge'
  > 2939 | Missing namespace declarations in predicates tests
  > 2903 | fn-idref-xx incorrect input specified
  > 2943 | Can static typing report FORG0006?
  > 2962 | XPDY0002 or FONC0001?
  > 2626 | base-URI-10
  > 3159 | qname-cast-1 etc
  > 3267 | Wrong error code for vardeclwithtype-15
  > 2954 | White space problems in expected result files.
  > 3157 | Schema userdefined.xsd is invalid
  > 3153 | fn-years-from-duration-20
  > 2815 | fn:nilled tests on non-validated element.
  > 3166 | fn-iri-to-uri-18 has wrong baseline
  > 3158 | fn-resolve-uri-3
  > 3155 | fn-encode-for-uri1args-1
  > 3156 | fn-iri-to-uri-3 et seq
  > 3157 | fn-iri-to-uri-6, fn-iri-to-uri-14, fn-iri-to-uri-16, fn-iri-to-uri-3: wrong baselines
  > 3157 | fn-codepoint-equal-17 and fn-codepoint-equal-14 have invalid baselines
  > 3132 | fn-codepoint-equal-14 expects wrong result
  > 3139 | Inspect/implementation defined order fn-trace-*
  > 3012 | xqts static type errors
  > 3134 | fn-max-2 and fn-min-2 have wrong serialization for double number
  > 3133 | fn-codepoint-equal-17 expects wrong result
  > 3131 | Catalog info for qname-cast-1/4 and notation-cast-3
  > 3130 | casthcds10 and casthcds13 expect wrong results
  > 3128 | Catalog info for value-comparison-3 binds the wrong variable
  > 3125 | function-declaration-025: contains two errors, but only tests for one
  > 2927 | Syntax error in vardeclwithtype-13
  > 2925 | seq-queries-results-q5 doesn't use $input-context variable
  > 2913 | Module context-lib.xq is invalid
  > 2908 | fn-normalize-unicode-2 is not valid UTF-8
  > 2898 | document-uri tests have wrong catalog info
  > 2994 | Rules for comparing notations have changed
  > 3020 | wrong definition of int in op-numeric-unary-minusint1args-1
  > 2932 | Type/value mismatches in ExternalVariableWith tests
  > 3009 | testsuite should allow year zero
  > 2608 | Schema Import required?
  > 2971 | Incorrect gMonth format
  > 2995 | orderDecl-2 depends on undefined document order
  > 2887 | Invalid URI in fn-static-base-7
  > 2709 | Wrong overflow for float sum in sumflt3args-6
  > 2884 | fn-resolve-uri-3
  > 2885 | empty base-uris
  > 2901 | Malformed URI in base-URI-24
  > 2906 | fn-resolve-uri-16 should succeed
  > 2648 | fn-nilled-8/9 is miscatalogued
  > 2897 | Missing external variable declaration in Comp-notation
  > 2636 | Wrong query filename in catalog info for schema-import-3
  > 2889 | Catalog and external variable mismatches
  > 2888 | Invalid URI in fn-resolve-QName tests
  > 2886 | invalid uri in fn-base-uri-9
  > 2803 | [FO] Error FONS0003 appears only in the Appendix C, Error Summary
  > 2647 | extexpr-6 is miscatalogued
  > 2791 | Missing tests for duration comparisons?
  > 2809 | fn:resolve-uri() called without base uri paramater and no base uri in the static context.

  Most of these changes have been reflected in the revised XML Query CR documents published on June 9.

## XQTS 0.9.0 (April 19, 2006)

- Changed the namespace of xdt:anyAtomicType, xdt:yearMonthDuration, xdt:dayTimeDuration, xdt:untyped, and xdt:untypedAtomic to the XML Schema namespace "http://www.w3.org/2001/XMLSchema" (see the CR issue resolved in Bugzilla 2548, Change namespace binding for anyAtomicType, yearMonthDuration and dayTimeDuration).
- Added small number of tests for Trivial XML Embedding Feature. See the description of the new "trivial" scenario in the catalog.
- An <test-suite-info> descriptive element was added to XQTSCatalog.xml. This was requested in Bug 2517
- Tests reflect Nov. 3, 2005 XML Query CR documents.
  Changes have been made to reflect the resolutions of the following CR issues by the XML Query and XSL WGs:

  > 2681 | Functions taking "." as default argument
  > 2692 | for $p at $p in EXP return $p
  > 2462 | Escaping URILiterals
  > 2559 | Conflicting error codes: FORG0006 vs XPTY0004
  > 2460 | XQuery error XQST0088
  > 2447 | Error codes XPST0008 and XPST0081
  > 2944 | fn:years-from-duration, days-from-duration, etc and wrong argument type.
  > 2941 | fn:avg raise XPTY0004.
  > 2500 | Predicate list evaluation.
  > 2518 | Feature request: allow XInclude and xml:*
  > 2789 | Substitutability of duration subtypes.
  > 2921 | Provide an exemple of a numeric range used as filter expression.
  > 2950 | Modules binding the xml/xmlns prefix is valid.
  > 3003 | Catalog: multiple module imports for same namespace.
  > 2456 | Changes to min() and max().
  > 2457 | Rules for URI encoding don't match RFC 3986/3987.
  > 2517 | Feature request: test-suite/@title.
  > 2542 | fn:id and fn:idref are not affected by ordering mode unordered.
  > 2710 | [xqueryx and xquery] extra white space in pragma content.
  > 2682 | Whitespace text nodes stripped from source document.
  > 2528 | [xqueryx] check for node tests in xsl.
  > 2644 | [F+O] Conversion from float/double to string.
  > 2459 | [Serialization] Phases of Character Expansion.
  > 2535 | One empty sequence is deep-equal to another, but they are not =.
  > 2447 | XPST0008 and XPST0081 used interchangeably.
  > 2680 | Wrong error code for Constr-comppi-compname-9.
  > 2492 | [F+O] op:notation-equal.
  > 2545 | EBV (fn:boolean) and xs:anyURI.
  > 2672 | fn-error-2 expected results.
  > 2653 | fn-escape-html-uri-20 is misencoded.
  > 2635 | Wrong error for validateexpr-1.
  > 2580 | fn:base-uri(), various tests.
  > 2735 | Exact semantics in casting string to decimal.
  > 2934 | Last digit of precision in fn:number tests.
  > 3001 | orderDecl-2 is non-deterministic.
  > 2896 | Validated data in Comp-notation-2.
  > 2910 | External variable tests.
  > 2716 | Constructor tests depending on schema validated data.
  > 2682 | Whitespace text nodes stripped from source document.
  > 2324 | Value/General comparisons: type promotion for xs:anyURI/numeric.
  > 2678 | Can't cast xs:QName to xs:QName.
  > 2548 | Change namespace binding for anyAtomicType, yearMonthDuration and dayTimeDuration

## XQTS 0.8.6 (Feb. 15, 2006)

- Added tests for the Module Import, Schema Import, External Variable References with TypeDeclatation, and External Variable References without TypeDeclaration features. The addition of these tests required that we extend our catalog schema. Our guidelines have been updated to reflect these extensions as well.
- An expected error element can now specify "*", indicating that any error is acceptable.
- End of line characters have been removed from the ends of files of expected results that use the Text and Fragment comparator.
- Tests reflect Nov. 3, 2005 XML Query CR documents.
  Changes have been made to reflect the resolutions of the following CR issues by the XML Query and XSL WGs:

  > 2681 | Functions taking "." as default argument
  > 2692 | for $p at $p in EXP return $p
  > 2462 | Escaping URILiterals
  > 2559 | Conflicting error codes: FORG0006 vs XPTY0004
  > 2460 | XQuery error XQST0088
  > 2447 | Error codes XPST0008 and XPST0081

## XQTS 0.8.4 (Jan. 4, 2006)

- Tests reflect Nov. 3, 2005 XML Query CR documents.
- Added 450 tests.
- Bugzilla Bug 1997 noted that some tests require that the input document has been constructed after XML Schema validation. Some of these tests have been re-written to use typed values constructed in the query. For others, we have added expected results for XQuery implementations that do not perform schema validation. Both the output-file and expected-error elements can now have an optional input-document attribute that indicates whether they correspond to typed input documents or untyped input documents.

## XQTS 0.8.2 (Dec. 7, 2005)

- Tests reflect Nov. 3, 2005 XML Query CR documents.
- Added 612 tests.
- Bugzilla Bug 2476 suggested that the Text comparator should require that both the actual result and the expected result be wrapped in an arbitrary element and canonicalized before binary comparison takes place. This change was suggested because serialization allows some characters to be represented multiple ways in the output ("<" could be represented by "&lt;", "&#60;", or "&#x3C;", for example) . With this change, the Text comparator and the Fragment comparator now perform the same comparison.

## XQTS 0.8.0 (Nov. 3, 2005)

- Tests reflect Nov. 3, 2005 XML Query CR documents.
- Added 135 tests.
- Bugzilla Bug 1997 has noted that some tests require that the input document has been constructed after XML Schema validation. This issue will be addressed by the XML Query WG shortly.
- Bugzilla Bug 2400 noted that some of the XQueryX tests were not schema valid. This has been corrected.

## XQTS 0.7.0 (Oct. 16, 2005)

- Tests reflect Sept. 15, 2005 XML Query WDs.
- Added 1069 tests.
- Added XQueryX tests.

- Test harnesses for XQuery should use the XQueryQueryOffsetPath and XQueryFileExtension attributes in the <test-suite> top-level element to identify the directory and file extension of XQuery tests. Test harnesses for XQueryX should use the XQueryXQueryOffsetPath and XQueryXFileExtension attributes instead.
- Added <syntax> element to result document schema, requiring either XQuery or XQueryX.
- In the future, there will be an XQueryX test case that corresponds to each XQuery test case that is not identified as a parse error. In this release, many of these XQueryX test cases are missing.

- Updated Implementation-defined items in the catalog.

## XQTS 0.6.0 (Aug. 11, 2005)

- Initial public release of the XML Query Test Suite.