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

Re: substitutionGroups

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Tue, 08 Dec 2009 15:09:52 +0000
To: "Lolke B. Dijkstra" <lolke.dijkstra@dijkstra-ict.com>
Cc: www-xml-schema-comments@w3.org
Message-ID: <f5bmy1ty01r.fsf@hildegard.inf.ed.ac.uk>
Hash: SHA1

Lolke B. Dijkstra writes:

> example just above section 3.3.3:

> <xs:complexType name="facet">

. . .

> <xs:element name="facet" type="xs:facet" abstract="true"/>
> <xs:element name="encoding" substitutionGroup="xs:facet">

> The substitutionGroup attribute references a type, should this be a
> QName instead (e.g. the name facet instead of the type xs:facet)

W3C XML Schema maintains separate "symbol spaces" for element
declarations on the one hand and type definitions on the other.  In
the fragment above you can see that there is an element decl named
'facet' in the target namespace, _and_ a type definition named 'facet'
in the target namespace.

The mapping rules for <xs:element> make clear that the QName value of
the 'substitutionGroup' attribute is looked up in the element
declaration symbol space, so the right connection is being made in
this case.

- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Tuesday, 8 December 2009 15:10:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:10 UTC