W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2002

RE: Things that one can define with XML schema but cannot query with XQuery? (2)

From: Marko Smiljanic <markosm@cs.utwente.nl>
Date: Fri, 1 Nov 2002 14:28:27 +0100
To: <www-ql@w3.org>
Message-ID: <FLEIJNHGLMNINLGGKCJIOEDJCFAA.markosm@cs.utwente.nl>

Thank you Bas!

> Sure.  xs:choice with maxOccurs="unbounded" (in a complexType with mixed
> content) seems the natural choice for marked up text, with subelements
> for things like emphasis, superscripts, cross references, etc.

You're right.
I restricted my self too much by thinking only in the data-centric domain.

I guess that you had in mind something like this:

<xs:element name="article">
  <xs:complexType mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element name="emphasis"/>
      <xs:element name="superscripts"/>

For the document-centric applications it probably does not make any
difference if you replace:

<xs:element name="emphasis"/>


<xs:element name="emphasis" minOccurs="0" maxOccurs="unbounded"/>

Both XSDs will validate the same XML documents.

Document-centric applications do not care if two consecutive <emphasis/>
elements exist as a result of:
repeating <xs:element name="emphasis"....> twice,
or because of repeating <xs:choice ....> twice, each with one <xs:element
My problems is that data-centric applications do (or should) care about

To finish:
OK, minOccurs and maxOccurs stay, but so do the problems in data-centric
However, some problems in data-centric applications can be avoided with
smart data-centric design decisions.

Thanks again,
Marko Smiljanic

Research assistant, Database Technology
Department of Computer Science, University of Twente
P.O. Box 217, 7500 AE Enschede, The Netherlands
Phone +31 53 4894520, Fax +31 53 4892927
E-mail: markosm@cs.utwente.nl
WWW: www.cs.utwente.nl/~markosm
Received on Friday, 1 November 2002 08:28:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:15 UTC