implementer's diversity

I'm finding that the query

    //*[1]

posed against "bib.xml", provides a fun little stress test of existing
XQuery (and XPath) implementations. I ran this query (with appropriate use
of the document() function to set the topmost context) on seven of the
engines listed on the XML Query working group's home page
(http://www.w3.org/XML/Query). Less than half the engines tested returned
the correct results:

1) a <bib> element (ie, the entire document), followed by
2) the first <book> element (@year="1994"), followed by
3) 10 additional <title> and <last> elements, all of which are the first
subelements in their respective <book> and <author> wrappers.

Microsoft, X-Hive, and Galax got it right; QuiP was slightly wrong (getting
everything but the <bib>); OpenLink fared worse (getting only the <bib>);
Cognetic Systems couldn't compile a workable query at all; and IPSI-XQ
employed such an imaginatively creative algorithm I was unable to deduce any
logical pattern whatsoever. (I told you bad things happen, Peter, when you
don't respond to your emails. :-)

I haven't tested any of the existing XPath engines (whatever environment
they're embedded in), but I'd be curious to see if these fared any better.

Best,
Howard

Received on Wednesday, 29 May 2002 11:38:35 UTC