Re: Simplifying XML Schema

> > 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