Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions csv2json/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ <h4>Row-level processing</h4>
<code>""</code>).</p>
</li>
<li>
<p>The value of <em>name</em> SHALL be <code>_col=<em>[N]</em></code>
<p>The value of <em>name</em> SHALL be <code>_col.<em>[N]</em></code>
where <code><em>[N]</em></code> is the
<a href="http://www.w3.org/TR/tabular-data-model/#dfn-column-number">column number</a>,
whilst the value of <em>value</em> SHALL be provided by the associated
Expand Down Expand Up @@ -377,23 +377,23 @@ <h3>Examples</h3>
"downloadURL": "http://example.org/people-and-points.csv"
},
"row": [{
"_col=1": "1",
"_col=2": "Jill",
"_col=3": "Smith",
"_col=4": "50"
"_col.1": "1",
"_col.2": "Jill",
"_col.3": "Smith",
"_col.4": "50"
},{
"_col=1": "2",
"_col=2": "Eve",
"_col=4": "94"
"_col.1": "2",
"_col.2": "Eve",
"_col.4": "94"
},{
"_col=1": "3",
"_col=2": "Adam",
"_col=3": "Johnson"
"_col.1": "3",
"_col.2": "Adam",
"_col.3": "Johnson"
},{
"_col=1": "4",
"_col=2": "John",
"_col=3": "Doe",
"_col=4": "80"
"_col.1": "4",
"_col.2": "John",
"_col.3": "Doe",
"_col.4": "80"
}]
}
</pre>
Expand Down Expand Up @@ -498,7 +498,7 @@ <h4>Table-level processing</h4>
within the <a title="column description object">column description object</a> for
that <a href="http://www.w3.org/TR/tabular-data-model/#dfn-column">column</a>.</p>
<p>Where the column header is <em>null</em>, the value assigned to <code>name</code> SHALL be
<code>_col=<em>[N]</em></code> where <code><em>[N]</em></code> is the
<code>_col.<em>[N]</em></code> where <code><em>[N]</em></code> is the
<a href="http://www.w3.org/TR/tabular-data-model/#dfn-column-number">column number</a>.</p>
</li>
<li>
Expand Down Expand Up @@ -998,7 +998,7 @@ <h3>Examples</h3>
"required": true,
"unique": true
}, {
"name": "on-street",
"name": "on_street",
"title": "On Street",
"dc:description": "The street that the tree is on.",
"datatype": "string"
Expand All @@ -1008,12 +1008,12 @@ <h3>Examples</h3>
"dc:description": "The species of the tree.",
"datatype": "string"
}, {
"name": "trim-cycle",
"name": "trim_cycle",
"title": "Trim Cycle",
"dc:description": "The operation performed on the tree.",
"datatype": "string"
}, {
"name": "inventory-date",
"name": "inventory_date",
"title": "Inventory Date",
"dc:description": "The date of the operation that was performed.",
"datatype": "date"
Expand Down Expand Up @@ -1043,24 +1043,24 @@ <h3>Examples</h3>
"row": [{
"url": "http://example.org/tree-ops.csv#gid-1",
"GID": "1",
"on-street": "ADDISON AV",
"on_street": "ADDISON AV",
"species": "Celtis australis",
"trim-cycle": "Large Tree Routine Prune",
"inventory-date": "10/18/2010"
"trim_cycle": "Large Tree Routine Prune",
"inventory_date": "10/18/2010"
},{
"url": "http://example.org/tree-ops.csv#gid-2",
"GID": "2",
"on-street": "EMERSON ST",
"on_street": "EMERSON ST",
"species": "Liquidambar styraciflua",
"trim-cycle": "Large Tree Routine Prune",
"inventory-date": "6/2/2010"
"trim_cycle": "Large Tree Routine Prune",
"inventory_date": "6/2/2010"
},{
"url": "http://example.org/tree-ops.csv#gid-3",
"GID": "3",
"on-street": "EMERSON ST",
"on_street": "EMERSON ST",
"species": "Liquidambar styraciflua",
"trim-cycle": "Large Tree Routine Prune",
"inventory-date": "6/2/2010"
"trim_cycle": "Large Tree Routine Prune",
"inventory_date": "6/2/2010"
}],
"describedBy": "http://example.org/tree-ops.csv-metadata.json"
}
Expand Down
62 changes: 31 additions & 31 deletions csv2rdf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ <h4>Row-level processing</h4>
<li>
<p>The <a href="http://www.w3.org/TR/tabular-data-model/#dfn-string-value">cell value</a>
SHALL be related to the <a title="row resource">row resource</a> using a triple with
the <em>predicate</em> <code><em>[CSV Location]</em>#_col=<em>[N]</em></code>,
the <em>predicate</em> <code><em>[CSV Location]</em>#_col.<em>[N]</em></code>,
where <code><em>[CSV Location]</em></code> is the absolute URL of the source CSV file.
and <code><em>[N]</em></code> is the
<a href="http://www.w3.org/TR/tabular-data-model/#dfn-column-number">column number</a>.</p>
Expand Down Expand Up @@ -502,23 +502,23 @@ <h3>Examples</h3>
dcat:downloadURL &lt;http://example.org/people-and-points.csv&gt;
] ;
csvw:row [
:_col=1 "1" ;
:_col=2 "Jill" ;
:_col=3 "Smith" ;
:_col=4 "50" ;
:_col.1 "1" ;
:_col.2 "Jill" ;
:_col.3 "Smith" ;
:_col.4 "50" ;
] , [
:_col=1 "2" ;
:_col=2 "Eve" ;
:_col=4 "94" ;
:_col.1 "2" ;
:_col.2 "Eve" ;
:_col.4 "94" ;
] , [
:_col=1 "3" ;
:_col=2 "Adam" ;
:_col=3 "Johnson" ;
:_col.1 "3" ;
:_col.2 "Adam" ;
:_col.3 "Johnson" ;
] , [
:_col=1 "4" ;
:_col=2 "John" ;
:_col=3 "Doe" ;
:_col=4 "80" ;
:_col.1 "4" ;
:_col.2 "John" ;
:_col.3 "Doe" ;
:_col.4 "80" ;
] ;
prov:activity [
a prov:Activity ;
Expand Down Expand Up @@ -653,7 +653,7 @@ <h4>Table-level processing</h4>
<a href="http://www.w3.org/TR/tabular-metadata/#dfn-inherited-property">
inherited property</a> <code>lang</code>.</p>
<p>Where the column header is <em>null</em>, the value assigned to <code>name</code> SHALL be
<code>_col=<em>[N]</em></code> where <code><em>[N]</em></code> is the
<code>_col.<em>[N]</em></code> where <code><em>[N]</em></code> is the
<a href="http://www.w3.org/TR/tabular-data-model/#dfn-column-number">column number</a>
and no value assigned to <code>title</code>.</p>
</li>
Expand Down Expand Up @@ -1312,7 +1312,7 @@ <h3>Examples</h3>
"required": true,
"unique": true
}, {
"name": "on-street",
"name": "on_street",
"title": "On Street",
"dc:description": "The street that the tree is on.",
"datatype": "string"
Expand All @@ -1322,12 +1322,12 @@ <h3>Examples</h3>
"dc:description": "The species of the tree.",
"datatype": "string"
}, {
"name": "trim-cycle",
"name": "trim_cycle",
"title": "Trim Cycle",
"dc:description": "The operation performed on the tree.",
"datatype": "string"
}, {
"name": "inventory-date",
"name": "inventory_date",
"title": "Inventory Date",
"dc:description": "The date of the operation that was performed.",
"datatype": "date"
Expand Down Expand Up @@ -1360,19 +1360,19 @@ <h3>Examples</h3>
rdfs:label "GID" , "GID" , "Generic Identifier" ;
dc:description "An identifier for the operation on a tree." .

:on-street a rdf:Property ;
:on_street a rdf:Property ;
rdfs:label "On Street" , "On Street" ;
dc:description "The street that the tree is on." .

:species a rdf:Property ;
rdfs:label "Species" , "Species" ;
dc:description "The species of the tree." .

:trim-cycle a rdf:Property ;
:trim_cycle a rdf:Property ;
rdfs:label "Trim Cycle" , "Trim Cycle" ;
dc:description "The operation performed on the tree." .

:inventory-date a rdf:Property ;
:inventory_date a rdf:Property ;
rdfs:label "Inventory Date" , "Inventory Date" ;
dc:description "The date of the operation that was performed." .

Expand Down Expand Up @@ -1410,26 +1410,26 @@ <h3>Examples</h3>

:gid-1
:GID "1"^^xsd:string ;
:on-street "ADDISON AV"^^xsd:string ;
:on_street "ADDISON AV"^^xsd:string ;
:species "Celtis australis"^^xsd:string ;
:trim-cycle "Large Tree Routine Prune"^^xsd:string ;
:inventory-date "2010-10-18"^^xsd:date ;
:trim_cycle "Large Tree Routine Prune"^^xsd:string ;
:inventory_date "2010-10-18"^^xsd:date ;
.

:gid-2
:GID "2"^^xsd:string ;
:on-street "EMERSON ST"^^xsd:string ;
:on_street "EMERSON ST"^^xsd:string ;
:species "Liquidambar styraciflua"^^xsd:string ;
:trim-cycle "Large Tree Routine Prune"^^xsd:string ;
:inventory-date "2010-06-02"^^xsd:date ;
:trim_cycle "Large Tree Routine Prune"^^xsd:string ;
:inventory_date "2010-06-02"^^xsd:date ;
.

:gid-3
:GID "3"^^xsd:string ;
:on-street "EMERSON ST"^^xsd:string ;
:on_street "EMERSON ST"^^xsd:string ;
:species "Liquidambar styraciflua"^^xsd:string ;
:trim-cycle "Large Tree Routine Prune"^^xsd:string ;
:inventory-date "2010-06-02"^^xsd:date ;
:trim_cycle "Large Tree Routine Prune"^^xsd:string ;
:inventory_date "2010-06-02"^^xsd:date ;
.
</pre>

Expand Down
22 changes: 11 additions & 11 deletions metadata/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h2>Introduction</h2>
"datatype": "string",
"required": true
}, {
"name": "on-street",
"name": "on_street",
"title": "On Street",
"dc:description": "The street that the tree is on.",
"datatype": "string"
Expand All @@ -164,12 +164,12 @@ <h2>Introduction</h2>
"dc:description": "The species of the tree.",
"datatype": "string"
}, {
"name": "trim-cycle",
"name": "trim_cycle",
"title": "Trim Cycle",
"dc:description": "The operation performed on the tree.",
"datatype": "string"
}, {
"name": "inventory-date",
"name": "inventory_date",
"title": "Inventory Date",
"dc:description": "The date of the operation that was performed.",
"datatype": "date",
Expand Down Expand Up @@ -224,7 +224,7 @@ <h2>Annotating Tables</h2>
</p>
<pre class="example highlight">
{
"name": "inventory-date",
"name": "inventory_date",
"title": "Inventory Date",
"dc:description": "The date of the operation that was performed.",
"datatype": "date",
Expand Down Expand Up @@ -327,16 +327,16 @@ <h3>Property Syntax</h3>
</div>
</dd>
<dt>column names</dt>
<dd>a variable is set for each column within the schema; the name of the variable is the percent-encoded name of the column and the value is the canonical representation of the value of the cell in that column in the row that is currently being processed</dd>
<dd>a variable is set for each column within the schema; the name of the variable is the name of the column and the value is the canonical representation of the value of the cell in that column in the row that is currently being processed</dd>
</dl>
<p>
For example, the <code>urlTemplate</code> property holds a URI template that is used to generate a URL identifier for each row, which might look like:
</p>
<pre class="example highlight">
"urlTemplate": "http://example.org/example.csv#row={_row}"
"urlTemplate": "http://example.org/example.csv#row.{_row}"
</pre>
<p>
The identifiers that are generated for the rows would then look like <code>http://example.org/example.csv#row=1</code>, <code>http://example.org/example.csv#row=2</code> and so on.
The identifiers that are generated for the rows would then look like <code>http://example.org/example.csv#row.1</code>, <code>http://example.org/example.csv#row.2</code> and so on.
</p>
<p>
Alternatively, with the CSV and metadata in the <a href="#introduction" class="sectionRef"></a>, the <code>urlTemplate</code> might look like:
Expand All @@ -351,10 +351,10 @@ <h3>Property Syntax</h3>
Once the URI has been generated, it is resolved against the location of the resource (eg the CSV file) to create an absolute URI. For example, given a <code>urlTemplate</code> within a schema such as:
</p>
<pre>
"urlTemplate": "#row={_row}"
"urlTemplate": "#row.{_row}"
</pre>
<p>
and given a CSV file at <code>http://example.com/temp.csv</code>, the URL for the first row will be <code>http://example.com/temp.csv#row=1</code>.
and given a CSV file at <code>http://example.com/temp.csv</code>, the URL for the first row will be <code>http://example.com/temp.csv#row.1</code>.
</p>
</dd>
<dt><dfn title="column reference property">column reference properties</dfn></dt>
Expand Down Expand Up @@ -1203,10 +1203,10 @@ <h4>Optional Properties</h4>
<p>
An <a>atomic property</a> that gives a single canonical name for the column. This MUST be a string. Conversion specifications MUST use this property as the basis for the names of properties/elements/attributes in the results of conversions.
</p>
<p>The <a>property value</a> of <code>name</code> is that defined within metadata, if it exists. Otherwise, it is the first value from the <a>property value</a> of <code>title</code> having the same language tag as <a>default language</a> or <code>und</code> of not specified, as a string without language, if any. Otherwise, it is the string <code>"_col=<em>[N]</em>"</code> where <code><em>[N]</em></code> is the <a href="http://www.w3.org/TR/tabular-data-model/#dfn-column-number">column number</a>.
<p>The <a>property value</a> of <code>name</code> is that defined within metadata, if it exists. Otherwise, it is the first value from the <a>property value</a> of <code>title</code> having the same language tag as <a>default language</a> or <code>und</code> of not specified percent-encoded as necessary to conform to the syntactic requirements described below, as a string without language, if any. Otherwise, it is the string <code>"_col.<em>[N]</em>"</code> where <code><em>[N]</em></code> is the <a href="http://www.w3.org/TR/tabular-data-model/#dfn-column-number">column number</a>.
</p>
<p>
For ease of reference within <a title="URI template property">URI template properties</a>, column names SHOULD consist only of alphanumeric characters or underscores (<code>[a-zA-Z0-9_]+</code>). Names beginning with <code>_</code> are reserved by this specification and MUST NOT be used.
For ease of reference within <a title="URI template property">URI template properties</a>, column names MUST consist only of alphanumeric characters, underscores, or <code>"."</code> (<code>[a-zA-Z0-9][a-zA-Z0-9_\.]*</code>). Names beginning with <code>"_"</code> or <code>"."</code> are reserved by this specification and MUST NOT be used.
</p>
<p class="issue" data-number="53">
We invite comment on what the syntactic limitations should be on column names to make them most useful when used as the basis of conversion into other formats, bearing in mind that different target languages such as JSON, RDF and XML have different syntactic limitations and common naming conventions.
Expand Down
Loading