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

Re: Are facets permitted on for types with nested <simpleType> - Structure 3.14 should say

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 22 Oct 2001 12:30:49 +0100
To: "Bob Schloss" <rschloss@us.ibm.com>
Cc: www-xml-schema-comments@w3.org
Message-ID: <f5b8ze3kj2u.fsf@cogsci.ed.ac.uk>
"Bob Schloss" <rschloss@us.ibm.com> writes:

> Question 1: Is it syntatically legal to specify some of the constraining
> facets in a nested simpleType definition (under <restriction>) and other
> constraining facets outside that nested simpleType definition but as child
> elements of <restriction>?  What is the algorithm for deciding which
> constraining facet element information items would be permitted in that
> second section?  (This is the question implied by Peter's original question
> to me).

It's willfully obscure, but not ruled out.  The facility is there so
you can constrain e.g. nameless unions.  The algorithm is the same as
if the nested definition were named and external.

> Question 2: Can a simpleType of anySimpleType be implied in a user schema?
> If so, can any facet element information items be used to constrain it?

Yes, and no.

<xs:attribute name="foo"/>

has the ur-simple-type definition, whose name is 'anySimpleType', as
its type definition.

However, you can't restrict this just with facets, as there's no way
to indicate which primitive type is meant.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Monday, 22 October 2001 07:30:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:57 UTC