W3C home > Mailing lists > Public > public-csv-wg@w3.org > April 2014

RE: Architecture of mapping CSV to other formats

From: Tandy, Jeremy <jeremy.tandy@metoffice.gov.uk>
Date: Mon, 28 Apr 2014 14:03:12 +0000
To: Alf Eaton <eaton.alf@gmail.com>, Jeni Tennison <jeni@jenitennison.com>
CC: "public-csv-wg@w3.org" <public-csv-wg@w3.org>
Message-ID: <2624871D9A05174691BD59F8EFD68AE20883AC84@EXXCMPD1DAG3.cmpd1.metoffice.gov.uk>
Alf - I don’t think this works in the case where there is substructure in a CSV field; see R-CellValueMicroSyntax <http://w3c.github.io/csvw/use-cases-and-requirements/#R-CellValueMicroSyntax>. There may be a list of items in a given field.

Jeremy 

-----Original Message-----
From: Alf Eaton [mailto:eaton.alf@gmail.com] 
Sent: 24 April 2014 09:49
To: Jeni Tennison
Cc: public-csv-wg@w3.org
Subject: Re: Architecture of mapping CSV to other formats

On 23 April 2014 20:13, Jeni Tennison <jeni@jenitennison.com> wrote:

> On the call today we discussed briefly the general architecture of mapping from CSV to other formats (eg RDF, JSON, XML, SQL), specifically where to draw the lines between what we specify and what is specified elsewhere.
>
> To make this clear with an XML-based example, suppose that we have a CSV file like:
>
> GID,On Street,Species,Trim Cycle,Inventory Date 1,ADDISON AV,Celtis 
> australis,Large Tree Routine Prune,10/18/2010 2,EMERSON ST,Liquidambar 
> styraciflua,Large Tree Routine Prune,6/2/2010 3,EMERSON ST,Liquidambar 
> styraciflua,Large Tree Routine Prune,6/2/2010
>
> This will have a basic mapping into XML which might look like:
>
> <data>
>   <row>
>     <GID>1</GID>
>     <On_Street>ADDISON AV</On_Street>
>     <Species>Celtis australis</Species>
>     <Trim_Cycle>Large Tree Routine Prune</Trim_Cycle>
>     <Inventory_Date>10/18/2010</Inventory_Date>
>   </row>
>   ...
> </data>

As there's only ever a single, string value for each property of an item (when the data comes from CSV), it would be most straightforward to map everything to attributes as the default:

<trees>
  <tree gid="1" on-street="ADDISON AV" species="Celtis australis"
trim-cycle="Large Tree Routine Prune" inventory-date="2010-10-18"/>
  …
</trees>

Alf

Received on Monday, 28 April 2014 14:03:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:39 UTC