W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2008

[Bug 6235] Restriction from xs:anySimpleType

From: <bugzilla@wiggum.w3.org>
Date: Tue, 25 Nov 2008 15:24:48 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1L4zmS-0001WF-Ev@farnsworth.w3.org>

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





--- Comment #2 from Michael Kay <mike@saxonica.com>  2008-11-25 15:24:48 ---
I can see that there are cases where we prefer not to detect errors at the XML
representation level because it's too difficult and because they will be
detected later anyway at the component level. But this seems to be a case where
the mapping rules are deliberately triggering an error by generating an invalid
component, and that seems a little perverse; it's certainly unhelpful to the
reader. 

To me it would seem less artificial if we allowed errors to be detected in the
course of evaluating the mapping rules: saying "in this situation there is no
mapping" rather than "in this situation the mapping is to a component X, which
by the way is not actually a valid component".

For this case I certainly think it's worth adding the note. I also think it's
worth unravelling the tortuous prose of this rule. Something like the following
(though I'm not sure about how we number clauses here):

2 If the {base type definition} is a complex type definition B, and all the
following conditions are true:

  2.1 B.{content type}.{variety} = mixed
  2.2 B.{particle} is a Particle which is ·emptiable· as defined in Particle
Emptiable (§3.9.6.3) 
  2.3 the <restriction>  alternative is chosen, 

then the appropriate case among the following:

  2.4 if there is a <simpleType> S among the [children] of <restriction>, a
simple type definition which restricts the simple type definition corresponding
to S with a set of facet components corresponding to the elements among the
<restriction>'s [children] that specify facets, as defined in Simple Type
Restriction (Facets) (§3.16.6.4);

  2.5 if there is no <simpleType> and no element that specifies a facet among
the [children] of <restriction>, then xs:anySimpleType

  2.5 otherwise, there is no mapping defined and the schema is invalid.  


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 25 November 2008 15:25:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:16 GMT