Element order is always important in XML, except when it isn't

Robin La Fontaine · Balisage series on markup technologies · 2021

"Which came first," begins an old joke. But the more interesting question might be, "does it even matter?" There are many obvious and several not-so-obvious ways in which the order of items (be they XML elements or attributes, or JSON maps or arrays) can be understood to be significant or insignificant. These are not new questions and how they’re answered plays out across vocabulary design, schema design, and individual documents. They are important questions when it comes deciding if two documents are “the same” or “different” and to what extent. This paper challenges the one-size-fits-all decree in XML that order needs to be preserved and reviews the implications of 'order'. When ordered elements can be moved then we have something that has some common ground with orderless. This paper establishes a continuum between ordered information and orderless information and proposes that these are not as far apart as they might at first appear.

Read the paper · More papers on PaperTik