W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

Re: [RESEND] Derivation by restriction

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 2 Apr 2002 09:07:46 +0100
Message-ID: <972065500.20020402090746@jenitennison.com>
To: Simon.Cox@csiro.au
CC: costello@mitre.org, xmlschema-dev@w3.org, gml30.rwg@opengis.org
Hi Simon,

> But we also need to move up one step: we need for circle-container
> and polygon-container to both be geometry-containers.
> But the definition of a circle (i.e. a centre and radius) and
> polygon (a list of coordinates) do not have an obvious common
> ancestor from which they can both be derived by restriction. So we
> had defined GeometryType as a (more or less) empty abstract super
> type, and then derived CircleType and PolygonType by extension.
> This is where we hit the wall, since using XSD we now cannot define
> circle-container and polygon-container as restrictions of
> geometry-container ... the types of the content particles are not
> restrictions of the type of the content particle in the base type.

The only way I can see of solving this problem is to change the way
that you declare either GeometryType or the geometry-container.

First, you could change the definition of GeometryType so that you can
derive CircleType and PolygonType by restriction. Since you want it to
contain anything, you could use something along the lines of:

<xs:complexType name="GeometryType">
    <xs:any minOccurs="0" maxOccurs="unbounded" />
  <xs:anyAttribute />

You could then derive CircleType and PolygonType from this general
type by restriction.

Alternatively, you could change the definition of geometry-container
so that you can derive both circle-container and polygon-container
from it by extension.

I think that changing your definition of GeometryType is probably the
best option.



Jeni Tennison
Received on Tuesday, 2 April 2002 03:08:03 UTC

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