- From: Burak Emir <Burak.Emir@epfl.ch>
- Date: Mon, 18 Oct 2004 15:50:08 +0200
- To: xmlschema-dev@w3.org
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 UTC