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

Re: Simplifying XML Schema

From: Philip Wadler <wadler@research.bell-labs.com>
Date: Thu, 08 Jun 2000 11:38:24 -0400
Message-Id: <200006081538.LAA1092415@nslocum.cs.bell-labs.com>
To: David Beech <dbeech@us.oracle.com>
cc: Philip Wadler <wadler@research.bell-labs.com>, www-xml-schema-comments@w3.org, w3c-xml-query-wg@w3.org
> > Ashok,
> >
> > Thanks for your message, sorry to be so long in replying (all free
> > time has gone to hammering out the algebra).
> >
> > You suggest that xsi:type might be useful in data integration.
> > (In fact, the same point had occurred to me, so I am softening
> > a little with regard to xsi:type.)  However, I'm confused by one
> > thing.  Here's the last example you give:
> >
> >   <authors>
> >     <author xsi:type='firstAuthor'>Peter Buneman</author>
> >     <author xsi:type='secondAuthor'><first>Dan</first><last>Suciu</last><author>
> >   <authors>
> >
> > Does this work in Schema?  I thought that Schema disallowed two
> > sibling elements to have the same name but different types.
> 
> It's valid if <author> is declared with type 'anAuthor'
> from which both 'firstAuthor' and 'secondAuthor' are
> derived.
> 
> I believe this approach had been proposed with 'anAuthor'
> as an abstract type.  Of course, it's a bit clumsy but
> saves extending XML Schema if it is adequate for a possibly
> unusual use case.

Let me stress this strongly: I don't believe what you sketch above is
adequate, because I don't believe data integration is an unusual use
case.  XML Query has made a formal request to XML Schema for a
solution that would allow siblings to have the same element name but
different types, if xsi:type is present to disambiguate.  In order to
support data integration, it is important that the two types not be
required to be descended from the same supertype.  For data
integration one will typically be provided with two separately
developed schemas, and altering them to add a common supertype may be
difficult or impossible.  -- P
Received on Thursday, 8 June 2000 11:40:03 UTC

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