[xquery-talk] RE: Test Suite comparison mechanisms
Michael Kay
mhk at mhk.me.uk
Sun Nov 13 15:55:42 PST 2005
I personally think it would be much more satisfactory if the expected
results were published in a "wrapped" format, where for example a sequence
of three integers is presented as
<result>
<value type="xs:integer">17</value>
<value type="xs:integer">18</value>
<value type="xs:integer">19</value>
</result>
rather than as
17 18 19
The comparator between actual and expected results could then be expressed
in XQuery itself, giving a boolean result.
It's a bit late in the day for such a change but I think the experience so
far suggests that comparing the output of the serializer has considerable
drawbacks.
The situation can be improved, however, with some simpler fixes:
(a) avoid publishing results that are valid only if whitespace is stripped
from source documents
(b) eliminate any remaining distinction between "Text" and "Fragment"
(c) avoid outputting a trailing newline in "Fragment" output where the query
does not actually generate it
In other words, by insisting that the published results are correct in
pernickety detail.
Michael Kay
> -----Original Message-----
> From: David Carlisle [mailto:davidc at nag.co.uk]
> Sent: 12 November 2005 23:46
> To: mhk at mhk.me.uk
> Cc: talk at xquery.com
> Subject: Test Suite comparison mechanisms
>
>
> [changing the subject as my reply isn't really saxon related]
>
> > http://www.saxonica.com/conformance/xqts080/results080.html
>
> Impressive result.
>
> Interesting. The test suite comparison mechanisms described there are
> remarkably similar to the ones described here
>
> http://monet.nag.co.uk/xq2xml/XQTSReport.html
>
> As we both comment, neither of us is actually following the comparison
> scheme specified by the test suite. Would it make sense for the test
> suite to explictly authorise the use of comparisons at the
> level of XDM
> trees rather than serialised results. Perhaps even specifying
> an xquery
> function like deep-equal but doing something different with namespaces
> and comments. (I think currently all comments are at the top level but
> if any tests generated comment nodes as children of elements,
> deep-equal
> wouldn't see their contents. (Actually I suspect I'm not correctly
> checking comments that are children of the document root either, as
> deep-equal won't see those, must check..)
>
>
> David
>
> ______________________________________________________________
> __________
> This e-mail has been scanned for all viruses by Star. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ______________________________________________________________
> __________
>
More information about the talk
mailing list