W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

Re: using redefine

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 22 Dec 2000 16:39:25 +0000
To: "David Valera" <dvalera@pcl-hage.nl>
Cc: <xmlschema-dev@w3.org>
Message-ID: <f5bg0jgtnpe.fsf@cogsci.ed.ac.uk>
"David Valera" <dvalera@pcl-hage.nl> writes:

> > > Lets say address is:
> > >
> > >  <complexType name="Address">
> > >   <sequence>
> > >    <element name="name"   type="string"/>
> > >    <element name="street" type="string"/>
> > >    <element name="city"   type="string"/>
> > >   </sequence>
> > >  </complexType>
> > >
> > > I would like to have the possibility of redefining Address
> > so that it only
> > > has two elements, 'name' and 'street'. element 'city' is no
> > longer needed.
> > > Is this possible using redefine or do I have to stick to
> > the possibilities
> > > of extension and restriction?
> >
> > You must stick to extension and restriction.  So with the Address
> > above you're stuck, but if it had been
> 
> hmm, I did not have time to read the spec lately, and I was expecting some
> added value to redefinition. I am wondering, can everything that can be done
> with redefinition, also be accomplished using includes and extensions or
> restrictions on types?
> 
> I thought redefinition would give the developer the possibility of
> redefining a type

Yes

> without limitations.

No.

> De XML schema processor would then
> only look at the redefinition and discard the type that is being redefined.

This is indeed what happens.

> I guess this is not the case, is it?

So real redefinition, but not _arbitrary_ redefinition.

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 Friday, 22 December 2000 11:39:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT