Re: Column number (no csvw:colnum)

> On Dec 14, 2015, at 4:27 AM, Colin Maudry <colin@maudry.com> wrote:
> 
> Hello,

Hi Colin,

> When annotating a column, how is one supposed to indicate in what
> position the column is?
> 
> In the the spec [1], I see that "number" is a possible property for a
> column. But in the csvw @context file [2], "number" resolves to
> xsd:double, that is a datatype and not a property.

The “number” you refer to is the column-number, which is a core-annotation. When turning an input CSV into the tabular data model, each column has such an annotation, which represents the 1-based column number from the original input.

> The spec, in the same section, also mentions a "source number", that
> sounds like a useful property. But I can't find it in the csvw @context [2].
> 
> My experiments lead to the conclusion that the order in which the
> columns are described in the schema implicitly determines their order in
> the source table. If so, what are the properties mentioned in the spec for?

This is the correct interpretation, there is no way to describe the column numbers separately in the metadata, but the column-number (and row-number) for each column/(row) and cell is based on the cardinal ordering from the input document. The columns in the metadata file must correspond with those in the input file by matching on the “titles” annotation, which can also be affected using the skipColumns/skipRows/headerRowCount dialect properties.

Gregg

> [1] www.w3.org/TR/2015/CR-tabular-data-model-20150716/#dfn-column-number
> [2] https://github.com/w3c/csvw/blob/gh-pages/ns/csvw.jsonld
> 
> Thanks,
> Colin Maudry
> @CMaudry
> 
> 

Received on Monday, 14 December 2015 20:43:37 UTC