[
Lists Home |
Date Index |
Thread Index
]
OK, I'll soon stop writing in this thread, because at this point I will need
to make drawings and such. I *do* know and acknowledge that XML allows
encoding of hierarchical structure, whereas CSV doesn't. What I claim is
that XML is not more self-descriptive from a programming perspective than
CSV, or any other format in which meta-data is separated from data.
Self-descriptiveness has nothing to do with sheer expressive power
(hierarchical vs. flat).
I could have :
<persons>
<person>
<firstname>John</firstname>
<lastname>Doe</lastname>
<birthdate>
<day>11</day>
<month>6</month>
<year>1934</year>
</birthdate>
</person>
<person>
<firstname>Nicolas</firstname>
<lastname>Lehuen</lastname>
<birthdate>
<day>23</day>
<month>4</month>
<year>1976</year>
</birthdate>
</person>
...
</persons>
Or something like ( !!! CAUTION - DO NOT TRY THIS AT HOME - SAMPLE ONLY !!!
) :
(persons(person(firstname)(lastname)(birthdate(day)(month)(year)))) <-- this
is the meta-data
(
((John)(Doe)((11)(6)(1934)))
((Nicolas)(Lehuen)((23)(4)(1976)))
...
)
Both serialisations can build the same labeled tree, so they would have the
same "lexical" meaning. The fact that meta-data is embedded or not does not
add anything to the semantics - a human understands the semantics, but not a
program.
The term "self-description", in fact, just means that some meta-data
describing the labels of the tree is available. From this perspective, a CSV
file with header columns is also self-descriptive, *even* if it only
describes tabular data and not hierarchical data.
However, there is no doubt that the XML representation is far more readable
for humans than the second one. Plus, the second one would need some rather
ugly patches if there was so choices in the schema (a 'birthdate?' or
'birthdate|birthday' in the DTD).
The second representation was just an attempt to prove that separating
meta-data from data is feasable even with hierarchical structures. It also
gives a clue that the XML serialisation mode is maybe the easiest and most
flexible way to serialise and parse labeled trees. But tag names are just an
artefact of serialisation, not a way to add meaning to the document.
Regards,
Nicolas
>-----Message d'origine-----
>De : Simon St.Laurent [mailto:simonstl@simonstl.com]
>Envoyé : mardi 15 janvier 2002 19:23
>À : Nicolas LEHUEN
>Cc : 'Elliotte Rusty Harold'; 'xml-dev@lists.xml.org'
>Objet : RE: SV: SV: [xml-dev] XML=WAP? And DOA?
>
>
>On Tue, 2002-01-15 at 11:51, Nicolas LEHUEN wrote:
>> Maybe what we try to say is that from a programmatical point
>of view, there
>> is no added information in a format where the meta-data is
>embedded into the
>> data, compared to a format where meta-data is expressed in a
>header and pure
>> data follows.
>
>Not true. XML's embedded markup permits the creation of arbitrarily
>labeled hierarchies. It's rather difficult to connect headers to such
>things - CSV column headers only work with columns. Markup structures
>introduce the possibility of a very different kind of structural
>metadata.
>
>(And that is, I think, why XML is a much more interesting topic of
>discussion than CSV.)
>
>--
>Simon St.Laurent
>Ring around the content, a pocket full of brackets
>Errors, errors, all fall down!
>http://simonstl.com
>
|