W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2011

[Bug 11095] Lack of clarity on 'unknown' types

From: <bugzilla@jessica.w3.org>
Date: Tue, 25 Jan 2011 20:43:53 +0000
To: public-qt-comments@w3.org
Message-Id: <E1Phpk1-0004My-Jd@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11095

--- Comment #3 from Jonathan Robie <jonathan.robie@redhat.com> 2011-01-25 20:43:52 UTC ---
We already define the term Data Model Schema, which is currently used only for
consistency constraints. We can expand the definition to include atomic types:

* Definition: Data Model Schema

 [Definition: For a given node <add>or atomic value</add> in an
 XDM instance, the data model schema is defined as the schema
 from which the type annotation of that node was derived.] For a
 node <add>or atomic value</add> that was constructed by some
 process other than schema validation, the data model schema
 consists simply of the schema type definition that is
 represented by the type annotation <del>of the node</del>.

We can then use this concept to extend derives-from() in SequenceType matching,
saying that the Actual Type is a definition in the Data Model Schema, and the
Expected Type is a definition in S:

* SequenceType Matching 

The definition of SequenceType matching relies on a pseudo-function
named derives-from( AT, ET ), which takes an actual simple or complex
schema type AT <add>from a data model schema</add> and an expected
simple or complex schema type ET <add="alt2">from S</add>, and either
returns a boolean value or raises a type error [err:XPTY0004]. This
function is defined as follows:

# derives-from( AT, ET ) raises a type error [err:XPTY0004] if ET is
  not present in S. If AT is not present in S, derives-from( AT, ET )
  returns derives-from(gcd(AT), ET), where gcd(AT) is the most
  specific base type of AT in the data model schema that is
  present in S.


If we go this route, I would be inclined to require an error if the schemas in
S are not consistent, instead of merely allowing one:

* Composing S

 This determination is done by reference to a schema
 S (that is, a set of schema components). This schema S is the
 union of:

 1. the in-scope schema definitions in the static context of the
  module.

 2. potentially, the schema used for validating the instance document;
 whether a processor adds this schema to S is implementation-defined.

 3. potentially, further schema components that have been made
 available to the processor in an implementation-defined way.


A type error [err:XPTY0004] <del>may</del><add>must</add> be raised if this
union does not
constitute a valid schema (for example, if there are conflicts
between types present in the static context and types used
dynamically for validating instances.)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 25 January 2011 20:43:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:45 UTC