<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2042</bug_id>
          
          <creation_ts>2005-09-08 08:04:14 +0000</creation_ts>
          <short_desc>Clause 1.2 of Datatypes Valid is broken</short_desc>
          <delta_ts>2005-11-09 19:01:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Datatypes: XSD Part 2</component>
          <version>1.0 only</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/xmlschema-2/#cvc-datatype-valid</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>unclassified</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>2449</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry S. Thompson">ht</reporter>
          <assigned_to name="XML Schema WG">w3c-xml-schema-wg</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>5883</commentid>
    <comment_count>0</comment_count>
    <who name="Henry S. Thompson">ht</who>
    <bug_when>2005-09-08 08:04:19 +0000</bug_when>
    <thetext>As written, stds with patterns need not be in the lexical space of the relevant 
type, so e.g. a type restricting an integer with a pattern &quot;a&quot; would validate 
an &quot;a&quot;.

See also R-98 and R-221</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5907</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-09 02:18:25 +0000</bug_when>
    <thetext>There seem to be other problems in the &quot;Datatype Valid&quot; constraint in 4.1.4 of 
the datatypes spec:
- It assumes that there could be literals in the lexical space that don&apos;t 
correspond to any value in the value space. But as pointed out earlier 
(2.4.2) &quot;Constraining the ·value space· consequently constrains the ·lexical 
space·.&quot;
- It ignores the fact that the order of member types in union types is 
significant.

Suggestion: something along the following line:
1. The string must be pattern valid if there is a pattern
2. The string must denote a value:
2.1 Primitive type
2.2 Derived atomic type (must be datatype-valid wrt the base/primitive type
2.3 List type (must be a sequence of items, each of which is datatype-valid wrt 
the item type)
2.4 Union type (must be datatype-valid wrt to at least one of the member types) 
(ues the first one in the list to determine the &quot;denoted value&quot;)
3. The denoted value must be facet valid wrt all non-pattern facets</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>