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: <petsa@us.ibm.com>
Date: Fri, 19 May 2000 16:51:41 -0400
To: Matthew Fuchs <matthew.fuchs@commerceone.com>
cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <852568E4.007297C2.00@D51MTA03.pok.ibm.com>
Matt:
Lets examine your suggestion below which does seem cleaner than
the other 2 alternatives:

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

First, the element types <simpleAuthor> and <complexAuthor> are
based on complexTypes called simpleAuthor and complexAuthor
derived from abstractAuthor.

Second, when Query and XPath etc want to find all authors what will
they search for?  If they search on elementTypes then we need an
elementType called author and the engines must be educated to
know that <simpleAuthor> and <complexAuthor> can be substituted
for <author>.  This is not difficult.  After all the engines have to be
changed in some way to take derived types into account and this is
as good a way as any.

=============================

On your other comment re. equivalence classes, did you mean to
suggest that the feature be removed?  I was going to suggest merely
that any element type be allowable in an equivalence class regardless
of parentage.  This does not make it a CS equivalence class but I
think such a feature would be useful.  Currently, its not very useful.

All the best, Ashok


Matthew Fuchs <matthew.fuchs@commerceone.com>@w3.org on 05/19/2000 03:27:43
PM

Sent by:  www-xml-schema-comments-request@w3.org


To:   "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
cc:
Subject:  Re: XML Query Comments to XML Schema (1st part)



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 16:52:49 UTC

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