Re: Rationale for restricted uses of "all"

Hi Jeni

Hope you're well. You certainly seem very prolific at the moment!

> But then I've never understood the requirement to not impose order
> where there is chaos :) If the order of an object's properties doesn't
> matter, then imposing an order on them for purposes of serialization
> within an XML document isn't going to matter either. Just decide on an
> order and you can use XML Schema to your heart's content!

Sounds good but the cost of data order may be software disorder!

o As long as the order in which my application stores/retrieves the records
is one XML element type, followed by the next, followed by the next
then it is convenient and efficient to put them out in that order. Otherwise
they have to be taken out and saved into separate lists first. Not the end
of the world but irritating and inefficient.

o Even if it is convenient for my software to export in a fixed order,
why should I impose the burden of this arbitrary order on somebody
else whose application is trying to produce XML in my format? It's not
as if it's any easier for me to read the elements in just because their
order is fixed (unless minoccurs=maxoccurs in all cases, of course).

>Or, as Eric just suggested, write your XML documents with whatever
>ordering you want, and then use a transformation to map them on to the
>strict ordering that's acceptable to an XML Schema schema.

A good workaround but, if part of the purpose of a schema is to
make a data model available to those with whom you wish to
exchange data, not really a solution.

What is really needed is for it to be legal to write something like:

<xs:all>
  <A minoccurs=0 maxoccurs=unbounded>
  <B minoccurs=1 maxoccurs=unbounded>
  <C minoccurs=2 maxoccurs=5>
</xs:all>

Although xs:nosequence might be more descriptive than xs:all.

I worry that once again the expressive power of XML schema doesn't
seem sufficient to meet my business needs. History has shown that
into such power vacuums step unscrupulous monopolists with proprietary
extensions, designed to seduce people like me in order to undermine,
and ultimately destroy, open standards. :-(

Many thanks from an ordinary punter to everybody continuing to work
on improving the XML schema spec to remove its present shortcomings.
I hope that in many cases this will involve removing usage restrictions
rather than bolting more and more new stuff onto it. What end users
like me don't want is more new ways of not achieving our aims ;-)

--
Gaz

Received on Tuesday, 20 November 2001 12:07:53 UTC