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

Re: XML Query Comments to XML Schema (1st part)

From: Matthew Fuchs <matthew.fuchs@commerceone.com>
Date: Fri, 19 May 2000 12:27:43 -0700
Message-ID: <4C4A7BE77CE1D311A1D200508BA38C12265FFE@venus.commerceone.com>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Ashok,

I would say that neither approach is ideal and both suffer from the
type/element distinction.  I would argue that a far better resolution would
be:

<authors>
  <simpleAuthor>Serge Abiteboul</simpleAuthor>
  <complexAuthor><first>Dan</first><last>Sucia</last>
</authors>

And since both simpleAuthor and complexAuthor subclass from abstactAuthor,
they're both allowable there.

Matthew


------------------------------------------------------------------

Subject: Re: XML Query Comments to XML Schema (1st part)


Noah:
I think the problem is that the xsi:type has to be indicated explicitly
in the instance:

   <authors>
       <author xsi:type="target:SimpleAuthor">Serge Abiteboul</author>
       <author xsi:type="target:SimpleAuthor">Peter Buneman</author>
       <author xsi:type="target:ComplexAuthor">
           <first>Dan</first><last>Suciu</last>
       </author>

     They would like to be able to say:

  <authors>
     <author>Serge Abiteboul</author>
     <author>Peter Buneman</author>
     <author><first>Dan</first><last>Suciu</last><author>
  <authors>

We know that this gives rise to validation problems.
I also argue that the form with the xsi:type is no better and no worse
than the form that adds another level of nesting to indcate the type e.g.

      <authors>
     <author>
       <simpleAuthor>Serge Abiteboul</simpleAuthor>
              ...

All the best, Ashok
Received on Friday, 19 May 2000 15:27:21 UTC

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