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>
Lets examine your suggestion below which does seem cleaner than
the other 2 alternatives:

  <simpleAuthor>Serge Abiteboul</simpleAuthor>

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

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

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


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

  <simpleAuthor>Serge Abiteboul</simpleAuthor>

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



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

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

       <author xsi:type="target:SimpleAuthor">Serge Abiteboul</author>
       <author xsi:type="target:SimpleAuthor">Peter Buneman</author>
       <author xsi:type="target:ComplexAuthor">

     They would like to be able to say:

     <author>Serge Abiteboul</author>
     <author>Peter Buneman</author>

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.

       <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