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 2042 - Clause 1.2 of Datatypes Valid is broken
Summary: Clause 1.2 of Datatypes Valid is broken
Status: ASSIGNED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: XML Schema WG
QA Contact: XML Schema comments list
URL: http://www.w3.org/TR/xmlschema-2/#cvc...
Whiteboard:
Keywords: unclassified
Depends on: 2449
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-08 08:04 UTC by Henry S. Thompson
Modified: 2005-11-09 19:01 UTC (History)
0 users

See Also:


Attachments

Description Henry S. Thompson 2005-09-08 08:04:19 UTC
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 "a" would validate 
an "a".

See also R-98 and R-221
Comment 1 Sandy Gao 2005-09-09 02:18:25 UTC
There seem to be other problems in the "Datatype Valid" constraint in 4.1.4 of 
the datatypes spec:
- It assumes that there could be literals in the lexical space that don't 
correspond to any value in the value space. But as pointed out earlier 
(2.4.2) "Constraining the ·value space· consequently constrains the ·lexical 
space·."
- 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 "denoted value")
3. The denoted value must be facet valid wrt all non-pattern facets