- From: Quinton Zondervan <Qyz@clickmarks.com>
- Date: Fri, 16 Nov 2001 15:53:11 -0500 (EST)
- To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
- Cc: <xmlschema-dev@w3.org>
Thank you! I guess I gave up too early on the nested "restriction"
idea. Thanks again for the help!
Quinton
-----Original Message-----
From: Henry S. Thompson [mailto:ht@cogsci.ed.ac.uk]
Sent: Friday, November 16, 2001 11:47 AM
To: Quinton Zondervan
Cc: xmlschema-dev@w3.org
Subject: Re: Type Derivation Problems
qyz@clickmarks.com writes:
> I can't figure out a way to extend a type which
> has an empty content model to create a sub-type with a simple content
> model. The problem is that the only way to declare a type with a
simple
> content model is to restrict a simple type? So I essentially need
> multiple inheritance to do this :-(
Extension is for adding attributes or elements, you can't extend with
a simple type, not even from empty content.
This is an arbitrary decision, but one it would be difficult to
overturn, I think.
If what you want is a relatively unconstrained type from which you can
derive many simple types, use a synonym for the simple ur type:
<xs:complexType name='PropertyType' abstract='true'>
<xs:simpleContent>
<xs:extension base='xs:anySimpleType'/>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name='BooleanPropertyType'>
<xs:simpleContent>
<xs:restriction base='PropertyType'>
<xs:simpleType>
<xs:restriction base='xs:boolean'/>
</xs:simpleType>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
ht
--
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 Saturday, 17 November 2001 05:16:07 UTC