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 2449 - Datatype Valid is broken
Summary: Datatype Valid is broken
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.1 only
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema comments list
URL: http://www.w3.org/XML/Group/2005/09/x...
Whiteboard:
Keywords: resolved
Depends on:
Blocks: 2042
  Show dependency treegraph
 
Reported: 2005-11-04 12:30 UTC by Henry S. Thompson
Modified: 2006-03-21 00:04 UTC (History)
0 users

See Also:


Attachments

Description Henry S. Thompson 2005-11-04 12:30:53 UTC
Lengthy discussion at Edinburgh f2f, see URL above

Last entry in minutes is

    Validation Rule: Datatype Valid
    A literal is datatype-valid with respect to a Simple Type Definition if and
only if it matches a literal in the lexical space of the corresponding datatype.
    NOTE:
    The constraints on Simple Type Definitions and type construction defined in
this specification have as a consequence that literals are datatype valid if and
only if:

       1. [Lexical rules]
             1. if pattern is a member of {facets}, then the string is pattern
valid (§4.3.4.4);
             2. if {variety} is primitive, then the string matches a literal in
the lexical space of the datatype, as defined in the appropriate section of this
specification;
             3. if {variety} is atomic and the type is not primitive, then the
string matches a literal in the lexical space of {base type definition}
             4. if {variety} is list then the string is a sequence of
space-separated tokens, each of which matches a literal in the lexical space of
{item type definition}
             5. if {variety} is union then the string must match a literal in
the lexical space of at least one member of {member type definitions}
       2. [Value rules] The value denoted by the literal matched in the previous
step is a member of the value space of the datatype, as determined by it being
Facet Valid (§4.1.4) with respect to each member of {facets} (except for pattern).

<davep> +1 to MSM's post.
NM: counterproposal, in your note, make those links.
<Ashok> In fact pattern shd be checked first, before mapping to value
<davep> I don't think those subclauses are sequenced, are they? I was reading
them as anded.
NM: notes that Michael's proposal seems to make more sense if you don't leave
out the other part of Noah's proposal, which is to put in statements of the
lexical forms for types defined using patterns, lists, etc. >to parallel the
declarative statements of the lexical forms of the primitives<. Then MSM's
proposal above looks pretty good, except, that I'd make the notes 1.1 and 1.2,
etc. have links to those new lexical form explanations.
Comment 1 C. M. Sperberg-McQueen 2006-01-28 17:43:35 UTC
A wording proposal with a terse declarative reformulation of 
Datatype Valid and four variant wordings for a Note to follow 
it (with a less terse description of what is entailed by
the normative rule) went to the WG Friday 27 January 2006.

None of the formulations explicitly address the question
of identifying the basic member which actually
validates the value of a union datatype; if the WG
agrees that this is the right place to do that, that
will need to be added.
Comment 2 C. M. Sperberg-McQueen 2006-03-21 00:04:16 UTC
The Working Group discussed this issue at the face to face meeting of 
January 2006 in St. Petersburg, Florida.  After discussion of several
alternatives, the WG asked the editors to draft a revised wording
proposal.  

This proposal was adopted and appears in the Last Call Working Draft
of February 2006.