W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2005

Re: Controlled Intermixing of Namespaced Element Types

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Wed, 23 Mar 2005 09:14:16 +0000
To: Eliot Kimber <ekimber@innodata-isogen.com>
Cc: xml-schema-dev <xmlschema-dev@w3.org>
Message-ID: <f5beke6wwpj.fsf@erasmus.inf.ed.ac.uk>

Same answer as yesterday :-)

Substution groups were specifically designed to reconstruct the use of
parameter entities for content models as mechanisms for controlled

The requirement that the type of a substiution group member be derived
from the type of its head imposes the condition you require.

Again, as yesterday, if you want to require restriction, then use
"final='extension'" on the base type.

Quick sketch:

Table schema doc:
<xs:schema targetNamespace="http://www.example.org/table"

 <xs:import namespace="http://www.example.org/cell"/>

 . . .

 <xs:element name="cell">
    <xs:element ref="tc:content"/>


Table cell schema doc:
<xs:schema targetNamespace="http://www.example.org/cell"

 <xs:element name="content" abstract="true" type="contentType"/>
 <xs:complexType name="contentType">


User schema doc:
<xs:schema targetNamespace="http://www.example.org/user"
 <xs:import namespace="http://www.example.org/table"/>
 <xs:import namespace="http://www.example.org/cell"/>
 <xs:complexType name="myDisplay">
   <xs:element ref="tt:table"/>
 <xs:element name="mdContent" type="mdContentType"
 <xs:complexType name="mdContentType">
   <xs:restriction base="tc:contentType">


Now an instance of the form

   . . .
      . . .
   . . .

is schema-valid.

Hope this helps,

 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, 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]
Received on Wednesday, 23 March 2005 09:14:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:07 UTC