This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2461 - [XQuery] Data model conformance
Summary: [XQuery] Data model conformance
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-04 16:51 UTC by Michael Kay
Modified: 2006-02-15 21:55 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-11-04 16:51:36 UTC
The XQuery spec (section 5.3) says "A conforming implementation may choose
to claim conformance to [Contruction from an Infoset|PSVI]".

It doesn't actually say what an implementation has to do in order for such a
claim to be valid.

The answer to the question isn't obvious, because PSVIs and Infosets don't
have any real existence: they are abstract models rather than concrete data
structures.

As an implementor I can attempt an argument along the following lines:

* I can take a JDOM as input
* there is a defined mapping from JDOM to the Infoset
* If I take a JDOM as input, then the Infoset that it represents has been
converted to XDM in a way that's consistent with the XDM specification

This works reasonably well for Infoset, because there's a number of
well-known XML document representations with a defined mapping to the
Infoset. Even here there's wriggle room however. If JDOM doesn't define a
mapping to the InfoSet, can I define the mapping myself, and thus claim
conformance?

WIth PSVI it's altogether more difficult. My product doesn't allow you to
supply a PSVI as input, other than a PSVI subset represented in a
proprietary format implemented only by my own product. It does allow you to
supply a source XML file and a schema as input, and produces results
consistent with validating that document against that schema and converting
the resulting PSVI to the XDM. Can I claim conformance with "Construction
from a PSVI" or not?

I don't know what the conformance section should say, but it's meaningless
if it says that it's entirely up to the implementor whether they choose to
claim conformance or not.

Michael Kay

previously raised at
http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2005Oct/0036.html
Comment 1 Jonathan Robie 2006-01-31 19:49:07 UTC
An XML processor creates either a PSVI or an Infoset, so these conformance
claims make it fairly straightforward to say that two processors create the same
Data Model instance from an XML document represented as a stream of characters.
I find this useful.

If you use an API such as JDOM, then I agree that there is wiggle room - we do
not have conformance claims for DOM, JDOM, etc. And the standard APIs are not
typed, so only the Infoset mapping would really apply. For a type-aware DOM,
such as the one in Xerces, you could define a PSVI mapping.

I believe we should retain the conformance claims for the Infoset and PSVI
mappings. The fact that there is no standard mapping from the XML APIs to an
Infoset or PSVI does not mean these are not useful. XML documents are an
important case.
Comment 2 Michael Kay 2006-01-31 20:13:20 UTC
I'm not suggesting we should drop the conformance criteria; we just need to
flesh out what they actually mean. Instead of saying "A product may claim
conformance", we need to say "A product may claim conformance if XYZ". I think
this probably needs to be along the lines you suggest:

"A product may claim conformance with the Infoset mapping if it is able to
generate an XDM document instance from source XML, producing the same XDM
instance that would be produced by generating an Infoset from the source XML as
described in XYZ, and then generating an XDM document from the infoset as
described in PQR."

-- and similarly for the PSVI.

This gets around the problem that infosets and PSVIs are not tangible objects
that can be supplied as input to a product in by a portable test suite.
Comment 3 Don Chamberlin 2006-02-15 21:55:40 UTC
Mike,
The Query working group considered your comment at its meeting on 01 Feb 2006. 
The group agreed to make an editorial change to Section 5.3 (Data Model 
Conformance) in the XQuery specification to clarify that the normative 
definitions for constructing XDM from an infoset or PSVI are found in the Data 
Model specification. Since you were present at this discussion, I have marked 
this issue as Closed.
Regards,
Don Chamberlin (for the Query working group)