[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: any information on how what schema complexType constructs are mos t prevalent?

From: Burak Emir <Burak.Emir@epfl.ch>
Date: Mon, 18 Oct 2004 15:50:08 +0200
Message-ID: <4173CA10.1050307@epfl.ch>
To: xmlschema-dev@w3.org
Re: any information on how what schema complexType constructs are  mos	t prevalent?

I like repetitions. Repetitions. Repetitions. Repetitions... :-)

More seriously:
If you use an all-groups, you cannot derive-by-extension anymore.
This constraint (as fine as it might be for an implementor) separates 
XML Schema types from records or object-oriented classes. Records and 
classes define a set of fields,  and only the compiler writer will know 
in which order they are stored (how they will be aligned in memory).

Apart from those all-groups, a complex type's only  purpose is to talk 
about the structure of an ordered sequence of children.
Sequence, choice, repetitions, min/maxOccurs are just regular 
expressions in disguise.

The more one models data using sequences, the more you need regular 
expressions.

But all mainstream programming languages for decades were and are using 
records (classes) to give some structure to data, which has led to most 
people being used to "think in records"

Think about it: If you were to make a telephone book, would you go for 
this...
<entry>
  <person>
    <name>Fred</name>
    <tel>555</tel>
  </person>
</entry>
<entry> ... Bob ...

... or for this ... 
<name>Fred</name><tel>555</tel><name>Bob</name><tel>444</tel>

It's the same information, the entry, person tags are in fact 
superfluous. This gives you (name,tel)* - if extensibility is not an issue.

Maybe, the question was directed at data models that have more "sequence 
nature" than others?

cheers,
Burak

http://lamp.epfl.ch/~buraq
Received on Monday, 18 October 2004 13:50:11 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.