Re: early version of the XML Query Test Suite

> However I am a bit concerned by what seems to me a defect
> of the suite: The expected result items are apparently not
> typed (except when they are nodes).

The production of non-typed results was made very early on by the Testing 
TF. Our Guidelines for XML Query Test Suite Submissions call this out 
explicitly:

"Tests in the XQTTF test suite rely on the serialized form of the test 
result in order to check correctness. Thus, any feature whose effect is 
not captured as part of the serialized result of a query, should be 
explicitly checked as part of the test query itself. For example, typing 
information is not present in the serialized results of an XQuery 
expression."

We made this decision for a couple of reasons:

- it's tedious to produce results of the form you suggest
- several implementations that we are aware of do not externalize the type 
of each item
- XQuery doesn't allow you to ask what the type of an item is

If we wanted to test that a query produces the correct type, then we'd 
write something like the following:

every $result in
   for $num as xs:decimal in ...
   return $num 
satisfies $result instance of xs:decimal

                                                -- Andrew

--------------------
Andrew Eisenberg
IBM
4 Technology Park Drive
Westford, MA  01886

andrew.eisenberg@us.ibm.com
Phone: 978-399-5158    Fax: 978-399-7012





Xavier Franc <xfranc@online.fr> 
08/15/2005 05:41 PM

To

cc
Andrew Eisenberg/Concord/IBM@IBMUS, www-ql@w3.org
Subject
Re: early version of the XML Query Test Suite






I welcome this initiative; this sounds a very desirable and useful tool.


However I am a bit concerned by what seems to me a defect of the suite:
The expected result items are apparently not typed (except when they are 
nodes).

A consequence is that checking results can be imprecise:
For example, a test like
  (XQuery/Expressions/FLWORExpr/ForExprType/ForExprType010.xq)

for $num as xs:decimal in ...
return $num

has a corresponding result file looking like this:

-100000000000000000 -10000000000000000 -1000000000000000 ...

Then how can we be sure whether the type of items
is actually xs:decimal and not for example xs:integer ?
This is just an example, there are probably many possibilities
of ambiguity.

I think it would be better if results were presented in a form like 
hereafter,
where each result item is labelled with its expected type.

<result-items>
<item type="xs:decimal">-100000000000000000</item>
<item type="xs:decimal">-10000000000000000</item>
<item type="xs:decimal">-1000000000000000</item>
...
</result-items>


This is probably not needed for all tests, but there could be an
additional "comparator" that would take this kind of format as input.



>The XML Query Working Group and the XSL Working Group would like to 
>announce the availability of an early version of the XML Query Test Suite 

>(XQTS) at http://www.w3.org/XML/Query/test-suite/.
>
> 
>

Received on Friday, 19 August 2005 14:46:34 UTC