RDF, JSON, DITA (and the "Bolognese" school of document analysis) all show in their different ways that XML has an expressive gap, where we resort to handwaving and claims of it-is-obvious-from-the-element-name..
I dont think this gap is "semantics", "datatyping" or "rhetoric". I'd say it is algebraic or generic structure.
Lets imagine a universal architecture (this is rough): an attribute set we can imply onto every element:
<!ATTLIST ALL
ur-type ( div | p | span | field | marker )
role ( data | metadata | comment | pi)
collection ( bag | set | array | sparse-array | sequence | unordered | other )
parallel ( yes | no )
formal (yes | no) >
where the @ur-type selects element content, mixed content, inline mixed content, data content, empty;
and the @formal says that the element should have information for a title, or name, or number, ID, etc
So
html:p ->
ur-type=p formal=no role=data collection=unordered parallel=no class=p
html:table ->
ur-type=div formal=yes role=div collection=array parallel=yes class=table
What would this give us?
It provides better hints an application needs for databinding: efficient storing and access. For example, that the contents of an element are likely to be accessed sequentially, or by index, or randomly.
It provides more hints that can be used to stub out, fillout and validate transformations and stylesheets: an element with ur-type of p in the input cannot be an ur-type marker in the output, for example. I have seen many examples of xslts written where some element if one ur-type was eroneoysly mapped to some element of another ur-type.
Or hints that an element is a cohesive addressable unit (formal).
Doesnt XML schemas provide this? Maybe the ur-type can be implied, but nothing else. Does't RDF provide much of this? RDF:Bag or whatever? Certainly, but RDF is overkill as it is not limited to universal generic properties of elements.
So we have these things like ordering, or whether an element has data or metadata, and we currently have no standard vocabulary/language to declare it. (Or do we?)
Cheers
Rick