- From: Marko Smiljanic <markosm@cs.utwente.nl>
- Date: Fri, 1 Nov 2002 14:28:27 +0100
- To: <www-ql@w3.org>
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"/>
</xs:choice>
</xs:complexType>
</xs:element>
For the document-centric applications it probably does not make any
difference if you replace:
<xs:element name="emphasis"/>
with
<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
name="emphasis"...>.
My problems is that data-centric applications do (or should) care about
this.
To finish:
OK, minOccurs and maxOccurs stay, but so do the problems in data-centric
applications.
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