OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: SV: SV: [xml-dev] XML=WAP? And DOA?

[ Lists Home | Date Index | Thread Index ]

On 15 Jan 2002, Simon St.Laurent wrote:

> 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.

That's probably not the point, though. XML is tree structured, CSV is
table structured, both let you assign names to the data items in their
data structures as well as might be expected... XML lets you label
elements and attributes, CSV lets you label fields. Perhaps CSV is lacking
the ability to explicitly name rows, but there is a convention of putting
anything that might be considered a row title in the first row, as used by
many charting packages by default!

To bring up a point I raised in an offlist discussion, look at it this
way: Sure, CSV is limited in only representing tables, but it represents
tables better than XML does; a CSV table is *always* explicit, while a
table in XML is just a pattern of tree structure where an element happens
to contain elements that all have the same name and either all have the
same attributes or all have the same child elements with no further levels
of children.

In particular, any decent spreadsheet will allow you to import a CSV file,
select a couple of columns, and produce a pie chart (as long as the data
column contains numeric information). The logic required is quite simple.

However, there is no obvious 2D structure in an XML document, so you can't
do the same thing. Sure, if you *know* that the XML document follows a
particular layout, you can write an XPath query that would pull out a set
of nodes that are what you need to use to produce the pie chart, but that
query would need to be hand crafted for every different representation of
essentially tabular data in XML...

Me, I'd much rather see a 'general purpose' data language that has *both*
unordered key:value pairings *and* ordered N-dimensional arrays in the
same type system...


                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS