W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Lee Buck's use case returns: a hesitant proposal for type modification

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 12 May 2000 10:40:26 +0100
To: www-xml-schema-comments@w3.org
Message-ID: <f5bog6chzsl.fsf@cogsci.ed.ac.uk>
Someone recently observed to me that we don't explicitly rule out
circular type definition.  We certainly should, but I wonder if we
should consider a carefully controlled exception to this, and to the
no redefinition/redeclaration rule:  You can redefine or redeclare
imported or included components _inside the include/import element_,
and only there.  Furthermore, such redefinitions may be 
circular in the case of types, named model groups and attribute
groups, and all such redefinitions are retrospective, i.e. they effect 
the included/imported components which reference those definitions.

Simple example


  <schema xmlns='http://www.w3.org/1999/XMLSchema'
   <complexType name="personName">
      <element name="forename"/>
      <element name="middle" minOccurs="0" maxOccurs="unbounded"/>
      <element name="surname"/>

    <element name="person" type="m:personName"/>

    <element name="record">
        <element ref="m:person"/>
        <element name="position">...</element>


  <schema xmlns='http://www.w3.org/1999/XMLSchema'
    <include "schema1.xsd">
      <complexType name="personName" base="m:personName"
        <element name="genMark" minOccurs="0"/>

Documents using schema2 for the http:///www.example.com/stuff would be 
able to have <genMark> as a daughter of <person> in their <record>s,
whereas those using schema1 would not.

I certainly haven't thought through all the ramifications of this, but 
if we want to do anything at all to allow ourselves to reuse our own
work, this is the best thing I've thought of.

  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 Friday, 12 May 2000 05:40:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC