diff --git a/csvw/config.js b/csvw/config.js index f84b3a0..ce342db 100644 --- a/csvw/config.js +++ b/csvw/config.js @@ -39,12 +39,12 @@ var respecConfig = { companyURL: "https://skemu.com" }, { - name: "Dylan Van Assche", + name: "Sitt Min Oo", company: "Ghent University – imec – IDLab", - url: "https://dylanvanassche.be", - orcid: "0000-0002-7195-9935", + url: "https://data.knows.idlab.ugent.be/person/minoo/#me", + orcid: "0000-0001-9157-7507", companyURL: "https://knows.idlab.ugent.be/" - }, + } ], edDraftURI: "https://w3id.org/rml/io-registry/csvw/spec", editors: [ @@ -62,19 +62,54 @@ var respecConfig = { orcid: "0009-0000-2598-1894", companyURL: "https://skemu.com" }, + { + name: "Sitt Min Oo", + company: "Ghent University – imec – IDLab", + url: "https://data.knows.idlab.ugent.be/person/minoo/#me", + orcid: "0000-0001-9157-7507", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + formerEditors: [ { name: "Dylan Van Assche", company: "Ghent University – imec – IDLab", url: "https://dylanvanassche.be", orcid: "0000-0002-7195-9935", companyURL: "https://knows.idlab.ugent.be/" - }, - ], - formerEditors: [ + } ], github: "https://github.com/kg-construct/rml-io-registry", license: "w3c-software-doc", localBiblio: { + "Metadata-Tabular":{ + title: "Metadata Vocabulary for Tabular Data", + href: "https://www.w3.org/TR/tabular-metadata/", + status: "W3C Recommendation", + publisher: "W3C", + date: "17 December 2015", + }, + "Turtle": { + title: "RDF 1.1 Turtle", + href: "https://www.w3.org/TR/turtle/", + status: "W3C Recommendation", + publisher: "W3C", + date: "25 February 2014", + }, + "CSVW-Namespace": { + title: "CSVW Namespace Vocabulary Terms", + href: "https://www.w3.org/ns/csvw", + status: "W3C Document", + publisher: "W3C", + date: "06 June 2017", + }, + "CSV": { + title: "Common Format and MIME Type for Comma-Separated Values (CSV) Files", + href: "https://www.ietf.org/rfc/rfc4180.txt", + status: "Internet Standard", + publisher: "IETF", + date: "October 2005", + }, "RML-Core": { title: "RML-Core", href: "https://w3id.org/rml/core/spec", @@ -91,7 +126,7 @@ var respecConfig = { }, }, otherLinks: [], - shortName: "RML-Ref-JSON-Path", + shortName: "RML-IO-Registry", specStatus: "CG-DRAFT", // W3C config copyrightStart: "2024", diff --git a/csvw/index.html b/csvw/index.html index c814236..89bdeb3 100644 --- a/csvw/index.html +++ b/csvw/index.html @@ -7,17 +7,25 @@ @@ -87,6 +114,8 @@
+
+
diff --git a/csvw/section/abstract.md b/csvw/section/abstract.md index be1ad5e..97fae07 100644 --- a/csvw/section/abstract.md +++ b/csvw/section/abstract.md @@ -1,3 +1,7 @@ -# Abstract - -This document provides an overview of the CSVW reference formulation and its natural RDF mappings. The CSVW reference formulation describes how to access and reference data within CSV data sources by column name. The natural RDF mappings define the process of converting CSV data types into their corresponding RDF literals, ensuring compatibility and interoperability with RDF standards. +This document provides an overview of the CSVW reference formulation, +the vocabulary used to define it, and its natural RDF mappings. +The CSVW reference formulation utilizes CSVW metadata +to describes how to access and reference data within CSV data sources. +The natural RDF mappings define the process of converting CSV data types +into their corresponding RDF literals, +ensuring compatibility and interoperability with RDF standards. diff --git a/csvw/section/natural-rdf-mapping.md b/csvw/section/natural-rdf-mapping.md index 24288b1..9ab72f3 100644 --- a/csvw/section/natural-rdf-mapping.md +++ b/csvw/section/natural-rdf-mapping.md @@ -1,18 +1,18 @@ # Natural RDF mapping of CSV values CSV does not provide any native data types, therefore there is no natural RDF mapping of CSV values upon XSD data types. -CSVW allows to specify for each column the data type in a `csvw:Table`: +CSVW allows specifying the data type for each column in a `csvw:Table` using +`csvw:tableSchema` : -``` - a csvw:Table; +
+<CSVWTable> a csvw:Table;
   csvw:tableSchema [
     csvw:columns [
       csvw:name "Column";
       csvw:datatype xsd:integer;
     ];
-  ];
-.
-```
+  ]. 
+
The `csvw:datatype` must be used for the natural mapping of datatypes in RDF from CSV values. diff --git a/csvw/section/overview.md b/csvw/section/overview.md new file mode 100644 index 0000000..0699c93 --- /dev/null +++ b/csvw/section/overview.md @@ -0,0 +1,21 @@ +# Document Conventions {#document-convention} + +The following namespace prefixes are used throughout the rest of the document unless otherwise stated. + +| Prefix | Namespace | +| ------- | --------------------------------- | +| `rml:` | http://w3id.org/rml/ | +| `csvw:` | https://www.w3.org/ns/csvw# | +| `xsd:` | http://www.w3.org/2001/XMLSchema# | +| `ex:` | http://example.org/ | +| `:` | http://example.org/ | + +The examples are contained in color-coded boxes. We use the Turtle syntax [[Turtle]] to write RDF. + +
+# This box contains an example input data
+
+ +
+# This box contains an example mapping
+
diff --git a/csvw/section/reference-formulation.md b/csvw/section/reference-formulation.md index c4808da..44e455a 100644 --- a/csvw/section/reference-formulation.md +++ b/csvw/section/reference-formulation.md @@ -6,6 +6,7 @@ A CSVW reference formulation (`rml:CSVWReferenceFormulation`) is a reference formulation identified with the IRI `rml:CSVW`. It has no specific properties. + ## Iterator The iterator for a logical source with the [=CSVW reference formulation=] is always row-based over a table. @@ -15,20 +16,81 @@ The [=CSV row=] that is the result of evaluating the expression for expression maps associated with a logical source with the [=CSV reference formulation=] SHOULD be expressed as [=CSV column=] names of a [=CSV row=]. +An expression for expression maps associated with a logical source with the CSV reference formulation SHOULD be expressed as [=CSV column=] names of a [=CSV row=]. An expression is evaluated against a logical iteration which is a [=CSV value=]. The result of evaluating the expression is a [=CSV row=], which MUST be transformed to a list of [=CSV values=] that forms the expression evaluation result. The order of the [=CSV row=] MUST be preserved in the expression evaluation result. -## CSV derivates -CSVW allows to specify how a CSV should be parsed and read in terms of NULL values, separator, encoding, etc. -These CSVW properties must be used by the engine to correctly read the CSV file. +## CSVW metadata +CSVW provides metadata which helps in parsing the CSV in terms of NULL values, separator, encoding, etc. +These CSVW metadata must be used by the engine to correctly parse the CSV file. +[[CSVW-Namespace]] vocabulary is used by this spec to define the metadata that +helps with parsing the CSV file. + + +### No headers +CSVW enables parsing CSV files without a header row. +Parsing CSV files with `1..N` columns with `csv:header` set to `false` will +produce a table with the column names "1" to "N" respectively. + + +Provided with the following input CSV file with 4 columns: +
+647,434244.172304,428652.920455
+646,434546.276382,428380.451633
+6212,434644.819095,428412.411432
+651,434758.675879,428527.599874
+650,434821.652431,428439.025039
+...
+
+ +and the following RML mapping containing the CSVW reference formulation definitions for +the aforementioned CSV file: +
+<CSVWTable> a csvw:Table;
+    csvw:null "";
+    csvw:separator ";"; 
+    csvw:dialect [
+        csvw:header "false"^^xsd:boolean;
+    ];
+
+ + +It is the same as working with the following CSV table where the headers are +named "1", "2", "3", and "4": +
+1,2,3,4 #numbered header row
+647,434244.172304,428652.920455
+646,434546.276382,428380.451633
+6212,434644.819095,428412.411432
+651,434758.675879,428527.599874
+650,434821.652431,428439.025039
+...
+
+ + + +### Default properties +While the default reference formulation identifier (`rml:CSVW`) specifies the +use of the CSVW reference formulation, it does not by itself describe how to +parse a given CSV file. + +Thus, a default set of CSVW properties and corresponding values is defined +to ensure consistent behaviour across implementations. +These defaults provide a minimal, functional CSVW configuration suitable for +parsing standard CSV files in the absence of explicit definition of +CSVW properties. + + +See https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions +for the actual default values for CSVW dialect metadata. -``` - a csvw:Table; - csvw:separator ";"; - csvw:null ""; - csvw:encoding "utf-16"; -. -``` +
 
+<CSVWTable> a csvw:Table;
+    csvw:null "";
+    csvw:separator ";"; 
+    csvw:dialect [
+        # Default CSVW dialect options 
+    ];
+