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 2184 - R-191: Question about e-props-correct.2
Summary: R-191: Question about e-props-correct.2
Status: NEW
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0 only
Hardware: All Windows 3.1
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: needsDrafting
Depends on:
Blocks:
 
Reported: 2005-09-14 18:47 UTC by Sandy Gao
Modified: 2012-12-04 00:51 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-14 18:47:59 UTC
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
Comment 1 Sandy Gao 2005-09-14 18:48:15 UTC
Henry's response:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JanMar/0020.html

Discussed at the Feb. 7 concall. WG agreed to classify R-191 as an error 
w/erratum.