[Bug 2449] Datatype Valid is broken

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2449

           Summary: Datatype Valid is broken
           Product: XML Schema
           Version: 1.1
          Platform: PC
               URL: http://www.w3.org/XML/Group/2005/09/xml-schema-ftf-
                    minutes.html#d0e1269
        OS/Version: Windows XP
            Status: NEW
          Keywords: needsAgreement
          Severity: normal
          Priority: P2
         Component: Datatypes: XSD Part 2
        AssignedTo: ht@w3.org
        ReportedBy: ht@inf.ed.ac.uk
         QAContact: www-xml-schema-comments@w3.org
OtherBugsDependingO 2042
             nThis:


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.

Received on Friday, 4 November 2005 12:31:00 UTC