[Bug 2184] R-191: Question about e-props-correct.2

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

           Summary: R-191: Question about e-props-correct.2
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 1: Structures
        AssignedTo: ht@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org


Is the following element decl valid? 

<xsd:element name="Element" fixed="1.0e-2">
  <xsd:simpleType>
      <xsd:restriction base="xsd:float">
          <xsd:pattern value="...E.."/>
      <xsd:restriction>
  <xsd:simpleType>
<xs:element>

Note that 1.0e-2 doesn't satisfy the pattern, so it's not valid wrt the 
anonymous simple type. But "e-props-correct.2" only requires the canonical rep 
(not the original lexical rep) to be valid wrt the type defi, and the canonical 
rep of "1.0e-2" (as a float) is "1.0E-2", which does satisfy the pattern. 

"Element Declaration Properties Correct" states: "2 If there is a {value 
constraint}, the canonical lexical representation of its value must be valid 
with respect to the {type definition} as defined in Element Default Valid 
(Immediate) (3.3.6)." 

And to check the above constraint, we need to have the {value constraint}'s 
value (an actual value). To get such actual value: 

"{value constraint} If there is a default or a fixed [attribute], then a pair 
consisting of the actual value (with respect to the {type definition}, if it is 
a simple type definition, or the {type definition}'s {content type}, if that is 
a simple type definition, or else with respect to the built-in string simple 
type definition) of that [attribute] and either default or fixed, as 
appropriate, otherwise absent." 

So it seems that we need to use the type defi to convert the original lexical 
rep to an actual value, then generate a canonical rep from the actual value, 
and use the type defi again to validate such canonical rep. Is this the 
intention? Is it an error if the original lexical rep is not valid? 

See: http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2003Jan/0043.html

Received on Wednesday, 14 September 2005 18:48:20 UTC