On Wed, 16 Sep 2020 03:25:54 +1000 John Gardner <gardnerjo...@gmail.com> wrote:
> That's what I mean: there isn't always an obvious distinction between > data and metadata. For structured HTML-like documents, it's common to > see attributes used for anything not seen by readers (i.g., > "metadata"). For general purpose data serialisation, things aren't as > clear-cut. In both cases, the decision to use attributes is still an > arbitrary one. That phenomenon has a name: accidental complexity. As opposed to inherent complexity, where the complexity is inherent in the problem, accidental complexity makes things more complex without adding any power to solve the problem. For years I looked for a general tool to import XML data in to SQL databases. When I finally tried to write one, I realized there was no automatic way possible. The data I was interested in was tabular, but XML has two equivalent attribute-nesting syntaxes (attributes and subordinate tags). To import anything, it's first necessary to map the XML structure onto SQL tables. That pretty much eliminates anything "automatic". > > this *isn't* the same to me: attributes are for metadata and tag > > contents are for data That's right. If XML attributes were always used to describe the *tags*, and not the data, there would be (almost) no problem. At least we'd know where the data are. But it's not uncommon to see XML like <record col1:"a", col2:"b"> <col3>c</col> </record> Like so many might-have-beens, the XML community could have adopted a standard for relational data, ideally one that didn't swamp the data with markup. Alas, history is written by the victors, not the best informed. --jkl