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

Why are element and type needed both?

From: Stefan Haustein <haustein@kimo.cs.uni-dortmund.de>
Date: Fri, 04 Feb 2000 14:58:08 +0100
Message-ID: <389ADAF0.2F01E4A7@ls8.cs.uni-dortmund.de>
To: www-xml-schema-comments@w3.org
Hi,

as far as I understand the specs, types are a kind of abstract element
definitions. Why does <type> exist at all, couldn't it be completely
replaced by something like <element abstract="true">?

Couldn't the whole thing be simplified to e.g. 

<element name="yyy" ref="xxx"> 
  <restrict name="zzz" minOccurs="1"/>
  <element ref="qqq"/>
  <pcdata/>          
  <choice>
    <element name="a" datatype="q"/>
    <element name="b" datatype="r"/>
  </choice>
</element>

where ref means "extends" ("source") if any extension is given, choice
replaces group (can't find the original suggestion), <pcdata> replaces
content type (as suggested by james clarc), <restrict> replaces
derivedBy="restriction", thus avoids unneded named(!) intermediate types
when restriction and extension are needed both.

Best regards

Stefan Haustein
Received on Friday, 4 February 2000 08:58:40 GMT

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