RE: early version of the XML Query Test Suite
"Michael Rys" <[email protected]> Mon, 15 Aug 2005 14:48:20 -0700
| Newsgroups | gmane.comp.web.query-languages |
|---|---|
| Message-ID | <BAE415CEAA831548800F68C44E905AF502EA8619@RED-MSG-60.redmond.corp.microsoft.com> |
There is no serialization mandated that can produce such a result. The way to test for the type of the result is to use instance of. Best regards Michael > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of > Xavier Franc > Sent: Monday, August 15, 2005 2:42 PM > To: [email protected] > Cc: Andrew Eisenberg; [email protected] > 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/. > > > > > > >