This document describes the CSVW Namespace Vocabulary Terms and Term definitions used for creating Metadata descriptions for Tabular Data. This document provides the RDFS [[RDF-SCHEMA]] vocabulary definition for terms defined in [[tabular-metadata]] and a description of the JSON-LD context definition for use with defining metadata documents.

Alternate versions of the vocabulary definition exist in Turtle and JSON-LD, which also includes the @context required for metadata descriptions. These versions may also be retrieved from http://www.w3.org/ns/csvw using an appropiate HTTP Accept header.

Published:
Imports:
http://www.w3.org/ns/prov
Version Info:
https://github.com/w3c/csvw/commit/fcc9db20ba4de10e41e964eee1b5d01defa4c664
See Also:
http://www.w3.org/TR/tabular-metadata

The CSV on the Web Working Group was chartered to produce a recommendation "Access methods for CSV Metadata" as well as recommendations for "Metadata vocabulary for CSV data" and "Mapping mechanism to transforming CSV into various formats (e.g., RDF, JSON, or XML)". This document attempts to partially satisfy the "Metadata vocabulary for CSV data" recommendation by definin all terms used in [[tabular-metadata]].

Introduction

This document describes the RDFS vocabulary description used in the Metadata Vocabulary for Tabular Data [[tabular-metadata]] along with the default JSON-LD Context.

This specification makes use of the following namespaces:

csvw:
http://www.w3.org/ns/csvw#
rdf:
http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs:
http://www.w3.org/2000/01/rdf-schema#
xsd:
http://www.w3.org/2001/XMLSchema#
dc:
http://purl.org/dc/terms/
dcat:
http://www.w3.org/ns/dcat#
prov:
http://www.w3.org/ns/prov#

Class Definitions

The following are class definitions in the csvw namespace:

Cell Cell

A Cell represents a cell at the intersection of a Row and a Column within a Table.

Column Column Description

A Column represents a vertical arrangement of Cells within a Table.

Datatype Datatype

Describes facets of a datatype.

Dialect Dialect Description

A Dialect Description provides hints to parsers about how to parse a linked file.

Direction Direction

The class of table/text directions.

ForeignKey Foreign Key Definition

Describes relationships between Columns in one or more Tables.

NumericFormat Numeric Format

If the datatype is a numeric type, the format property indicates the expected format for that number. Its value must be either a single string or an object with one or more properties.

Row Row

A Row represents a horizontal arrangement of cells within a Table.

Schema Schema

A Schema is a definition of a tabular format that may be common to multiple tables.

Table Annotated Table

An annotated table is a table that is annotated with additional metadata.

TableGroup Group of Tables

A Group of Tables comprises a set of Annotated Tables and a set of annotations that relate to those Tables.

TableReference Table Reference

An object property that identifies a referenced table and a set of referenced columns within that table.

Transformation Transformation Definition

A Transformation Definition is a definition of how tabular data can be transformed into another format.

Property Definitions

The following are property definitions in the csvw namespace:

aboutUrl about URL

A URI template property that MAY be used to indicate what a cell contains information about.

rdfs:range
csvw:uriTemplate
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
base base

An atomic property that contains a single string: a term defined in the default context representing a built-in datatype URL, as listed above.

rdfs:range
xsd:string
rdfs:domain
csvw:Datatype
columnReference column reference

A column reference property that holds either a single reference to a column description object within this schema, or an array of references. These form the referencing columns for the foreign key definition.

rdfs:range
xsd:string
rdfs:domain
Union of csvw:ForeignKey csvw:TableReference
column column

An array property of column descriptions as described in section 5.6 Columns.

rdfs:range
csvw:Column
rdfs:domain
csvw:Schema
commentPrefix comment prefix

An atomic property that sets the comment prefix flag to the single provided value, which MUST be a string.

rdfs:range
xsd:string
rdfs:domain
csvw:Dialect
datatype datatype

An object property that contains either a single string that is the main datatype of the values of the cell or a datatype description object. If the value of this property is a string, it MUST be one of the built-in datatypes defined in section 5.11.1 Built-in Datatypes or an absolute URL; if it is an object then it describes a more specialised datatype.

rdfs:range
Union of csvw:Datatype xsd:string
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
decimalChar decimal character

A string whose value is used to represent a decimal point within the number.

rdfs:range
xsd:string
rdfs:domain
csvw:NumericFormat
default default

An atomic property holding a single string that is used to create a default value for the cell in cases where the original string value is an empty string.

rdfs:range
xsd:string
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
describes describes

From IANA describes: The relationship A 'describes' B asserts that resource A provides a description of resource B. There are no constraints on the format or representation of either A or B, neither are there any further constraints on either resource.

rdfs:domain
csvw:Row
delimiter delimiter

An atomic property that sets the delimiter flag to the single provided value, which MUST be a string.

rdfs:range
xsd:string
rdfs:domain
csvw:Dialect
dialect dialect

An object property that provides a single dialect description. If provided, dialect provides hints to processors about how to parse the referenced files to create tabular data models for the tables in the group.

rdfs:range
csvw:Dialect
rdfs:domain
Union of csvw:TableGroup csvw:Table
doubleQuote double quote

A boolean atomic property that, if `true`, sets the escape character flag to `"`.

rdfs:range
xsd:boolean
rdfs:domain
csvw:Dialect
encoding encoding

An atomic property that sets the encoding flag to the single provided string value, which MUST be a defined in [[encoding]]. The default is "utf-8".

rdfs:range
xsd:string
rdfs:domain
csvw:Dialect
foreignKey foreign key

For a Table: a list of foreign keys on the table. For a Schema: an array property of foreign key definitions that define how the values from specified columns within this table link to rows within this table or other tables.

rdfs:range
csvw:ForeignKey
rdfs:domain
Union of csvw:Table csvw:Schema
format format

An atomic property that contains either a single string or an object that defines the format of a value of this type, used when parsing a string value as described in Parsing Cells in [[tabular-data-model]].

rdfs:range
xsd:string
rdfs:domain
csvw:Datatype
groupChar group character

A string whose value is used to group digits within the number.

rdfs:range
xsd:string
rdfs:domain
csvw:NumericFormat
header header

A boolean atomic property that, if `true`, sets the header row count flag to `1`, and if `false` to `0`, unless headerRowCount is provided, in which case the value provided for the header property is ignored.

rdfs:range
xsd:boolean
rdfs:domain
csvw:Dialect
headerRowCount header row count

An numeric atomic property that sets the header row count flag to the single provided value, which must be a non-negative integer.

rdfs:range
xsd:nonNegativeInteger
rdfs:domain
csvw:Dialect
lang language

An atomic property giving a single string language code as defined by [[BCP47]].

rdfs:range
xsd:string
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
length length

The exact length of the value of the cell.

rdfs:range
xsd:nonNegativeInteger
rdfs:domain
csvw:Datatype
lineTerminators line terminators

An atomic property that sets the line terminators flag to either an array containing the single provided string value, or the provided array.

rdfs:range
xsd:string
rdfs:domain
csvw:Dialect
maxExclusive max exclusive

An atomic property that contains a single number that is the maximum valid value (exclusive).

rdfs:range
xsd:integer
rdfs:domain
csvw:Datatype
maxInclusive max inclusive

An atomic property that contains a single number that is the maximum valid value (inclusive).

rdfs:range
xsd:integer
rdfs:domain
csvw:Datatype
maxLength max length

A numeric atomic property that contains a single integer that is the maximum length of the value.

rdfs:range
xsd:nonNegativeInteger
rdfs:domain
csvw:Datatype
minExclusive min exclusive

An atomic property that contains a single number that is the minimum valid value (exclusive).

rdfs:range
xsd:integer
rdfs:domain
csvw:Datatype
minInclusive min inclusive

An atomic property that contains a single number that is the minimum valid value (inclusive).

rdfs:range
xsd:integer
rdfs:domain
csvw:Datatype
minLength min length

An atomic property that contains a single integer that is the minimum length of the value.

rdfs:range
xsd:nonNegativeInteger
rdfs:domain
csvw:Datatype
name name

An atomic property that gives a single canonical name for the column. The value of this property becomes the name annotation for the described column.

rdfs:range
xsd:string
rdfs:domain
csvw:Column
note note

An array property that provides an array of objects representing arbitrary annotations on the annotated tabular data model.

rdfs:domain
Union of csvw:TableGroup csvw:Table
null null

An atomic property giving the string or strings used for null values within the data. If the string value of the cell is equal to any one of these values, the cell value is `null`.

rdfs:range
xsd:string
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
ordered ordered

A boolean atomic property taking a single value which indicates whether a list that is the value of the cell is ordered (if `true`) or unordered (if `false`).

rdfs:range
xsd:boolean
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
pattern pattern

A regular expression string, in the syntax and interpreted as defined by [[ECMASCRIPT]].

rdfs:range
xsd:string
rdfs:domain
csvw:NumericFormat
primaryKey primary key

For Schema: A column reference property that holds either a single reference to a column description object or an array of references. For Row: a possibly empty list of cells whose values together provide a unique identifier for this row. This is similar to the name of a column.

rdfs:range
xsd:string
rdfs:domain
Union of csvw:Schema csvw:Row
propertyUrl property URL

An URI template property that MAY be used to create a URI for a property if the table is mapped to another format.

rdfs:range
csvw:uriTemplate
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
quoteChar quote char

An atomic property that sets the quote character flag to the single provided value, which must be a string or `null`.

rdfs:range
xsd:string
rdfs:domain
csvw:Dialect
reference reference

An object property that identifies a **referenced table** and a set of **referenced columns** within that table.

rdfs:range
csvw:TableReference
rdfs:domain
csvw:ForeignKey
referencedRow referenced rows

A possibly empty list of pairs of a foreign key and a row in a table within the same group of tables.

rdfs:domain
csvw:Row
required required

A boolean atomic property taking a single value which indicates whether the cell must have a non-null value. The default is `false`.

rdfs:range
xsd:boolean
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
resource resource

A link property holding a URL that is the identifier for a specific table that is being referenced.

rdfs:range
xsd:anyURI
rdfs:domain
csvw:TableReference
row row

Relates a Table to each Row output.

rdfs:subPropertyOf
rdfs:member
rdfs:range
csvw:Row
rdfs:domain
csvw:Table
rowTitle row titles

A column reference property that holds either a single reference to a column description object or an array of references.

rdfs:range
xsd:string
rdfs:domain
csvw:Schema
rownum row number

The position of the row amongst the rows of the Annotated Tabl, starting from 1

rdfs:range
xsd:integer
scriptFormat script format

A link property giving the single URL for the format that is used by the script or template.

rdfs:range
xsd:anyURI
rdfs:domain
csvw:Transformation
schemaReference schema reference

A link property holding a URL that is the identifier for a schema that is being referenced.

rdfs:range
xsd:anyURI
rdfs:domain
csvw:TableReference
separator separator

An atomic property that MUST have a single string value that is the character used to separate items in the string value of the cell.

rdfs:range
xsd:string
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
skipBlankRows skip blank rows

An boolean atomic property that sets the `skip blank rows` flag to the single provided boolean value.

rdfs:range
xsd:boolean
rdfs:domain
csvw:Dialect
skipColumns skip columns

An numeric atomic property that sets the `skip columns` flag to the single provided numeric value, which MUST be a non-negative integer.

rdfs:range
xsd:nonNegativeInteger
rdfs:domain
csvw:Dialect
skipInitialSpace skip initial space

A boolean atomic property that, if `true`, sets the trim flag to "start". If `false`, to `false`.

rdfs:range
xsd:boolean
rdfs:domain
csvw:Dialect
skipRows skip rows

An numeric atomic property that sets the `skip rows` flag to the single provided numeric value, which MUST be a non-negative integer.

rdfs:range
xsd:nonNegativeInteger
rdfs:domain
csvw:Dialect
source source

A single string atomic property that provides, if specified, the format to which the tabular data should be transformed prior to the transformation using the script or template.

rdfs:range
xsd:string
rdfs:domain
csvw:Transformation
suppressOutput suppress output

A boolean atomic property. If `true`, suppresses any output that would be generated when converting a table or cells within a column.

rdfs:range
xsd:boolean
rdfs:domain
Union of csvw:Table csvw:Column
table table

Relates an Table group to annotated tables.

rdfs:subPropertyOf
rdfs:member
rdfs:range
csvw:Table
rdfs:domain
csvw:TableGroup
tableDirection table direction

One of `rtl`, `ltr` or `auto`. Indicates whether the tables in the group should be displayed with the first column on the right, on the left, or based on the first character in the table that has a specific direction.

rdfs:range
csvw:Direction
rdfs:domain
Union of csvw:TableGroup csvw:Table
tableSchema table schema

An object property that provides a single schema description as described in section 5.5 Schemas, used as the default for all the tables in the group

rdfs:range
csvw:Schema
rdfs:domain
Union of csvw:TableGroup csvw:Table
targetFormat target format

A link property giving the single URL for the format that will be created through the transformation.

rdfs:range
xsd:anyURI
rdfs:domain
csvw:Transformation
transformations transformations

An array property of transformation definitions that provide mechanisms to transform the tabular data into other formats.

rdfs:range
csvw:Transformation
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
textDirection text direction

An atomic property that must have a single value that is one of `rtl` or `ltr` (the default).

rdfs:range
csvw:Direction
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
title title

For a Transformation A natural language property that describes the format that will be generated from the transformation. For a Column: A natural language property that provides possible alternative names for the column.

rdfs:domain
Union of csvw:Transformation csvw:Column csvw:Row
trim trim

An atomic property that, if the boolean `true`, sets the trim flag to `true` and if the boolean `false` to `false`. If the value provided is a string, sets the trim flag to the provided value, which must be one of "true", "false", "start" or "end".

rdfs:range
xsd:boolean
rdfs:domain
csvw:Dialect
url url

For a Table: This link property gives the single URL of the CSV file that the table is held in, relative to the location of the metadata document. For a Transformation: A link property giving the single URL of the file that the script or template is held in, relative to the location of the metadata document.

rdfs:range
xsd:anyURI
rdfs:domain
Union of csvw:Table csvw:Transformation
valueUrl valueUrl

An URI template property that is used to map the values of cells into URLs.

rdfs:range
csvw:uriTemplate
rdfs:domain
Union of csvw:TableGroup csvw:Table csvw:Schema csvw:Column
virtual virtual

A boolean atomic property taking a single value which indicates whether the column is a virtual column not present in the original source

rdfs:range
xsd:boolean
rdfs:domain
csvw:Column

Datatype Definitions

The following are datatype definitions in the csvw namespace:

JSON JSON

A literal containing JSON.

rdfs:subClassOf
xsd:string
uriTemplate uri template

rdfs:subClassOf
xsd:string

Instance Definitions

The following are instance definitions in the csvw namespace:

auto auto

Indicates whether the tables in the group should be displayed based on the first character in the table that has a specific direction.

inherit inherit

For `textDirection`, indicates that the direction is inherited from the `tableDirection` annotation of the `table`.

ltr left to right

Indicates whether the tables in the group should be displayed with the first column on the right.

rtl right to left

Indicates whether the tables in the group should be displayed with the first column on the left.

csvEncodedTabularData CSV Encoded Tabular Data

Describes the role of a CSV file in the tabular data mapping.

tabularMetadata Tabular Metadata

Describes the role of a Metadata file in the tabular data mapping.

Term Definitions

Cell
csvw:Cell
Column
csvw:Column
Datatype
csvw:Datatype
Dialect
csvw:Dialect
Direction
csvw:Direction
ForeignKey
csvw:ForeignKey
JSON
csvw:JSON
NCName
xsd:NCName
NMTOKEN
xsd:NMTOKEN
Name
xsd:Name
NumericFormat
csvw:NumericFormat
QName
xsd:QName
Row
csvw:Row
Schema
csvw:Schema
Table
csvw:Table
TableGroup
csvw:TableGroup
TableReference
csvw:TableReference
Transformation
csvw:Transformation
aboutUrl
csvw:aboutUrl with string values interpreted as csvw:uriTemplate
any
xsd:anyAtomicType
anyAtomicType
xsd:anyAtomicType
anyURI
xsd:anyURI
as
https://www.w3.org/ns/activitystreams#
base
csvw:base
base64Binary
xsd:base64Binary
binary
xsd:base64Binary
boolean
xsd:boolean
byte
xsd:byte
cc
http://creativecommons.org/ns#
columnReference
csvw:columnReference with array values interpreted as @list
columns
csvw:column with string values interpreted as @id with array values interpreted as @list
commentPrefix
csvw:commentPrefix
csvw
http://www.w3.org/ns/csvw#
ctag
http://commontag.org/ns#
datatype
csvw:datatype with string values interpreted as @vocab
date
xsd:date
dateTime
xsd:dateTime
dateTimeStamp
xsd:dateTimeStamp
datetime
xsd:dateTime
dayTimeDuration
xsd:dayTimeDuration
dc
http://purl.org/dc/terms/
dc11
http://purl.org/dc/elements/1.1/
dcat
http://www.w3.org/ns/dcat#
dcterms
http://purl.org/dc/terms/
dctypes
http://purl.org/dc/dcmitype/
decimal
xsd:decimal
decimalChar
csvw:decimalChar
default
csvw:default
delimiter
csvw:delimiter
describedby
wrds:describedby
describes
csvw:describes
dialect
csvw:dialect with string values interpreted as @id
double
xsd:double
doubleQuote
csvw:doubleQuote with string values interpreted as xsd:boolean
dqv
http://www.w3.org/ns/dqv#
duration
xsd:duration
duv
https://www.w3.org/TR/vocab-duv#
encoding
csvw:encoding
float
xsd:float
foaf
http://xmlns.com/foaf/0.1/
foreignKeys
csvw:foreignKey with string values interpreted as @id
format
csvw:format
gDay
xsd:gDay
gMonth
xsd:gMonth
gMonthDay
xsd:gMonthDay
gYear
xsd:gYear
gYearMonth
xsd:gYearMonth
gr
http://purl.org/goodrelations/v1#
grddl
http://www.w3.org/2003/g/data-view#
groupChar
csvw:groupChar
header
csvw:header with string values interpreted as xsd:boolean
headerRowCount
csvw:headerRowCount with string values interpreted as xsd:nonNegativeInteger
hexBinary
xsd:hexBinary
html
rdf:HTML
ical
http://www.w3.org/2002/12/cal/icaltzd#
int
xsd:int
integer
xsd:integer
json
csvw:JSON
lang
csvw:lang
language
xsd:language
ldp
http://www.w3.org/ns/ldp#
length
csvw:length with string values interpreted as xsd:nonNegativeInteger
license
xhv:license
lineTerminators
csvw:lineTerminators
long
xsd:long
ma
http://www.w3.org/ns/ma-ont#
maxExclusive
csvw:maxExclusive with string values interpreted as xsd:integer
maxInclusive
csvw:maxInclusive with string values interpreted as xsd:integer
maxLength
csvw:maxLength with string values interpreted as xsd:nonNegativeInteger
maximum
csvw:maxInclusive
minExclusive
csvw:minExclusive with string values interpreted as xsd:integer
minInclusive
csvw:minInclusive with string values interpreted as xsd:integer
minLength
csvw:minLength with string values interpreted as xsd:nonNegativeInteger
minimum
csvw:minInclusive
name
csvw:name
negativeInteger
xsd:negativeInteger
nonNegativeInteger
xsd:nonNegativeInteger
nonPositiveInteger
xsd:nonPositiveInteger
normalizedString
xsd:normalizedString
notes
csvw:note
null
csvw:null
number
xsd:double
oa
http://www.w3.org/ns/oa#
og
http://ogp.me/ns#
ordered
csvw:ordered with string values interpreted as xsd:boolean
org
http://www.w3.org/ns/org#
owl
http://www.w3.org/2002/07/owl#
pattern
csvw:pattern
positiveInteger
xsd:positiveInteger
primaryKey
csvw:primaryKey
propertyUrl
csvw:propertyUrl with string values interpreted as csvw:uriTemplate
prov
http://www.w3.org/ns/prov#
qb
http://purl.org/linked-data/cube#
quoteChar
csvw:quoteChar
rdf
http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfa
http://www.w3.org/ns/rdfa#
rdfs
http://www.w3.org/2000/01/rdf-schema#
reference
csvw:reference with string values interpreted as @id
referencedRows
csvw:referencedRow
required
csvw:required with string values interpreted as xsd:boolean
resource
csvw:resource with string values interpreted as xsd:anyURI
rev
http://purl.org/stuff/rev#
rif
http://www.w3.org/2007/rif#
role
xhv:role
row
csvw:row with string values interpreted as @id with array values interpreted as @set
rowTitles
csvw:rowTitle
rownum
csvw:rownum with string values interpreted as xsd:integer
rr
http://www.w3.org/ns/r2rml#
schema
http://schema.org/
schemaReference
csvw:schemaReference with string values interpreted as xsd:anyURI
scriptFormat
csvw:scriptFormat with string values interpreted as xsd:anyURI
sd
http://www.w3.org/ns/sparql-service-description#
separator
csvw:separator
short
xsd:short
sioc
http://rdfs.org/sioc/ns#
skipBlankRows
csvw:skipBlankRows with string values interpreted as xsd:boolean
skipColumns
csvw:skipColumns with string values interpreted as xsd:nonNegativeInteger
skipInitialSpace
csvw:skipInitialSpace with string values interpreted as xsd:boolean
skipRows
csvw:skipRows with string values interpreted as xsd:nonNegativeInteger
skos
http://www.w3.org/2004/02/skos/core#
skosxl
http://www.w3.org/2008/05/skos-xl#
source
csvw:source
string
xsd:string
suppressOutput
csvw:suppressOutput with string values interpreted as xsd:boolean
tableDirection
csvw:tableDirection with string values interpreted as @vocab
tableSchema
csvw:tableSchema with string values interpreted as @id
tables
csvw:table with string values interpreted as @id with array values interpreted as @set
targetFormat
csvw:targetFormat with string values interpreted as xsd:anyURI
textDirection
csvw:textDirection with string values interpreted as @vocab
time
xsd:time
titles
csvw:title with object values interpreted as language-specific, indexed by language
token
xsd:token
transformations
csvw:transformations with string values interpreted as @id
trim
csvw:trim with string values interpreted as xsd:boolean
unsignedByte
xsd:unsignedByte
unsignedInt
xsd:unsignedInt
unsignedLong
xsd:unsignedLong
unsignedShort
xsd:unsignedShort
uriTemplate
csvw:uriTemplate
url
csvw:url with string values interpreted as xsd:anyURI
v
http://rdf.data-vocabulary.org/#
valueUrl
csvw:valueUrl with string values interpreted as csvw:uriTemplate
vcard
http://www.w3.org/2006/vcard/ns#
virtual
csvw:virtual with string values interpreted as xsd:boolean
void
http://rdfs.org/ns/void#
wdr
http://www.w3.org/2007/05/powder#
wrds
http://www.w3.org/2007/05/powder-s#
xhv
http://www.w3.org/1999/xhtml/vocab#
xml
rdf:XMLLiteral
xsd
http://www.w3.org/2001/XMLSchema#
yearMonthDuration
xsd:yearMonthDuration