Re: a small document about XML Schema <sequence> vs <all> constructs

It's interesting to note that when the child names are all the same,
i.e. the content model is just xyzzy*, neither author nor reader can
_tell_ whether order matters, without appeal to out-of-band information.

Consider on the one hand
 <!ELEMENT DIV (P*)>
where order definitely _does_ matter, and on the other
 <!ELEMENT BIB (BIBITEM*)>
where order (probably) doesn't.

In other words (no surprise) schemas don't in general make explicit
conditions on "conveys the same information", but we _sometimes_ can at
least make some guesses based on choice of operators.

So using Michael's example, given
 <!ELEMENT process (created|checked|combobulated|modified|copied)*>
we can guess that
 <modified/><copied/>
conveys different information than
 <copied/><modified/>
does, whereas given
 <!ELEMENT features (height,width,wealth,baldness)>
we know that (assuming we ignore validity!)
 <height>200cm</height><wealth>20GBP</wealth>
conveys the _same_ information as
 <wealth>20GBP</wealth><height>200cm</height>
does.

But it takes practical experience to know that
 <p>Atlas shrugged</p><p>Rome fell</p>
conveys different information from
 <p>Rome fell</p><p>Atlas shrugged</p>
but
 <bibitem date="2016" title="Part 2"/>
 <bibitem date="2015" title="Part 1"/>
is probably informationally equivalent to
 <bibitem date="2015" title="Part 1"/>
 <bibitem date="2016" title="Part 2"/>

There's perhaps some interesting space for value-add here in terms of
some meta-vocabulary for expressing when order matters, which might be
useful for generic visualisation tooling?

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Received on Wednesday, 27 July 2016 15:10:47 UTC