diff --git a/spec/dev.html b/spec/dev.html index 4d58917b..b7fbeb49 100644 --- a/spec/dev.html +++ b/spec/dev.html @@ -194,9 +194,9 @@
-
+
-
+ diff --git a/spec/section/graphmap.md b/spec/section/graphmap.md index 1c43a94c..3c264c58 100644 --- a/spec/section/graphmap.md +++ b/spec/section/graphmap.md @@ -7,7 +7,7 @@ Any [=subject map=] or [=predicate-object map=] MUST have zero or more associate 1. using the `rml:graphMap` property, whose value MUST be a [=graph map=], 2. using the [=constant shortcut property=] `rml:graph`. -[=Graph maps=] are themselves [=term maps=]. When [=RDF triples are generated=], the set of target graphs is determined by taking into account any [=graph maps=] associated with the [=subject map=] or [=predicate-object map=]. +[=Graph maps=] are themselves [=term maps=]. When [=RDF triples=] are generated, the set of target graphs is determined by taking into account any [=graph maps=] associated with the [=subject map=] or [=predicate-object map=]. If a [=graph map=] generates the special IRI `rml:defaultGraph`, then the target graph is the [=default graph=] of the [=output dataset=]. diff --git a/spec/section/introduction.md b/spec/section/introduction.md index c080b9e8..e69de29b 100644 --- a/spec/section/introduction.md +++ b/spec/section/introduction.md @@ -1,25 +0,0 @@ -# Base IRIs -The base IRI of the [=mapping document=] is used to resolve relative [=IRIs=] in the RML document following the specification of the Turtle serialisaiton. - -## Base IRI for mapping rules - -The [=base IRI=] of the [=Triples Map=] is used in resolving relative [=IRIs=] produced by the [=RML mapping=]. - - -
-# Triples Map that has a declared base IRI
-<#TriplesMap>
-    a rml:TriplesMap;
-    rml:baseIri  .
-
- -The [=base IRI=] MUST be a valid [=IRI=]. It SHOULD NOT contain question mark ("`?`") or hash ("`#`") characters and SHOULD end in a slash ("`/`") character. - -To obtain an absolute [=IRI=] from a relative [=IRI=], the term generation rules of RML use simple string concatenation, rather than the more complex algorithm for resolution of relative URIs defined in Section 5.2 of [RFC3986]. This ensures that the original database value can be reconstructed from the generated absolute [=IRI=]. Both algorithms are equivalent if all of the following are true: - - 1. The base IRI does not contain question marks or hashes, - 2. the base IRI ends in a slash, - 3. the relative [=IRI=] does not start with a slash, and - 4. the relative [=IRI=] does not contain any "`.`" or "`..`" path segments. - - diff --git a/spec/section/joinconditions.md b/spec/section/joinconditions.md index b8afba7e..692f0d46 100644 --- a/spec/section/joinconditions.md +++ b/spec/section/joinconditions.md @@ -55,9 +55,9 @@ The following RDF triples are generated by the [=RML mapping=] above. A join condition is represented by a resource that has exactly one value for each of the following two properties: -* a child map (`rml:childMap`) property, whose value is a [=child map=].
A child map (`rml:ChildMap`) is an [=expression map=] which MUST be evaluated against the [=logical source=] of the [=triples map=] that contains the [=referencing object map=], i.e. the current [=triples map=], or it should have a [=constant value=]. +* a child map (`rml:childMap`) property, whose value is a [=child map=], or a [=constant-valued expression map=].
A child map (`rml:ChildMap`) is an [=expression map=] which MUST be evaluated against the [=child logical source=]. The child logical source is the [=logical source=] of the [=triples map=] that contains the [=referencing object map=], i.e. the current [=triples map=].. -* a parent map (`rml:parentMap`) property, whose value is a [=parent map=].
A parent map (`rml:ParentMap`) is an [=expression map=], which MUST be evaluated against the [=logical source=] of the [=referencing object map=]'s [=parent triples map=], i.e. the referenced [=triples map=], or it should have a [=constant value=]. +* a parent map (`rml:parentMap`) property, whose value is a [=parent map=], or a [=constant-valued expression map=].
A parent map (`rml:ParentMap`) is an [=expression map=], which MUST be evaluated against the [=parent logical source=]. The parent logical source is the [=logical source=] of the [=referencing object map=]'s [=parent triples map=], i.e. the referenced [=triples map=]. If the the [=logical source=] of the [=triples map=] that contains the [=referencing object map=] and the [=logical source=] of the [=referencing object map=]'s [=parent triples map=] are not [=effectively equal=], then the referencing object map MUST have one or more [=join conditions=]. diff --git a/spec/section/output.md b/spec/section/output.md index 1fd747d6..f5c81dc7 100644 --- a/spec/section/output.md +++ b/spec/section/output.md @@ -1,8 +1,11 @@ # The Output Dataset +The output dataset of an [=RML mapping=] is an [=RDF dataset=] that contains the [=generated RDF triples=] for each of the [=triples maps=] of the [=RML mapping=]. +The [=output dataset=] MUST NOT contain any other [=RDF triples=] or [=named graphs=] besides these. +However, [=RML processors=] MAY provide access to datasets that contain additional triples or graphs beyond those in the [=output dataset=], such as inferred triples or provenance information. -The output dataset of an [=RML mapping=] is an [=RDF dataset=] that contains the [=generated RDF triples=] for each of the [=triples maps=] of the [=RML mapping=]. The [=output dataset=] MUST NOT contain any other [=RDF triples=] or [=named graphs=] besides these. However, [=RML processors=] MAY provide access to datasets that contain additional triples or graphs beyond those in the [=output dataset=], such as inferred triples or provenance information. - -Conforming [=RML processors=] MAY rename [=blank nodes=] when providing access to the [=output dataset=]. This means that client applications may see actual [=blank node identifiers=] that differ from those produced by the [=RML mapping=]. Client applications SHOULD NOT rely on the specific text of the blank node identifier for any purpose. +Conforming [=RML processors=] MAY rename [=blank nodes=] when providing access to the [=output dataset=]. +This means that client applications may see actual [=blank node identifiers=] that differ from those produced by the [=RML mapping=]. +Client applications SHOULD NOT rely on the specific text of the blank node identifier for any purpose. + + + -## IRIs, Literal, Blank Nodes (rml:termType) +## IRIs, URIs, Literal, Blank Nodes (rml:termType) The term type of a [=reference-valued term map=] or [=template-valued term map=] -determines the kind of [=generated RDF term=] ([=IRIs=], [=blank nodes=] or [=literals=]). +determines the kind of [=generated RDF term=] ([=IRIs=], [=URI=], [=blank nodes=] or [=literals=]). If the term map has an optional `rml:termType` property, then its [=term type=] is the value of that property. The value MUST be an [=IRI=] and MUST be one of the following options: -* If the term map is a [=subject map=]: `rml:IRI` or `rml:BlankNode` -* If the term map is a [=predicate map=]: `rml:IRI` -* If the term map is an [=object map=]: `rml:IRI`, `rml:BlankNode`, or `rml:Literal` -* If the term map is a [=graph map=]: `rml:IRI` +* If the term map is a [=subject map=]: `rml:IRI`, `rml:URI` or `rml:BlankNode` +* If the term map is a [=predicate map=]: `rml:IRI`, `rml:URI` +* If the term map is an [=object map=]: `rml:IRI`, `rml:URI`, `rml:BlankNode`, or `rml:Literal` +* If the term map is a [=graph map=]: `rml:IRI`, `rml:URI` + + ### Default Term Types If the [=term map=] does not have a `rml:termType` property, then its [=term type=] is: * `rml:IRI`, if it is a [=subject map=], [=predicate map=] or [=graph map=] -* `rml:Literal`, if it is an [=object map=] -and at least one of the following conditions is true: -* It is a [=reference-valued term map=]. - * It has a `rml:languageMap` property (and thus a specified [=language tag=]). - * It has a `rml:datatypeMap` property (and thus a specified [=datatype=]). -* `rml:IRI`, otherwise. +* `rml:Literal`, if it is an [=object map=] and at least one of the following conditions is true (`rml:IRI`, otherwise): + * It is a [=reference-valued term map=]. + * It has a `rml:languageMap` property (and thus a specified [=language tag=]). + * It has a `rml:datatypeMap` property (and thus a specified [=datatype=]). + ### Explicitly Defined Term Types To change the default [=term type=] of a [=subject map=] or [=graph map=] -to a [=blank node=], the [=term type=] MUST be explicitly defined to be a `rml:BlankNode`. +to a [=blank node=], the [=term type=] MUST be explicitly defined to be a `rml:BlankNode` or `rml:URI. To change the default [=term type=] of an [=object map=], the [=term type=] MUST be explicitly defined: -* If the [=term type=] is `rml:IRI`, an [=IRI=] will be generated; +* If the [=term type=] is `rml:IRI`, an [=IRI=] will be generated`;` +* If the [=term type=] is `rml:URI`, a [=URI=] will be generated`;` * If the [=term type=] is `rml:BlankNode`, a [=blank node=] will be generated. If the [=term type=] is explicitly defined to be a `rml:BlankNode`, @@ -334,13 +372,23 @@ This creates the following [=RDF triples=]. + + + ## Datatypes of Literals (`rml:datatypeMap` and `rml:datatype`) -A datatypeable term map is a [=term map=] with a [=term type=] of `rml:Literal` that does not have a [specified language map](#language-tags-rml-languagemap-and-rml-language). +A datatypeable term map is a [=term map=] with a [=term type=] of `rml:Literal` that does not have a specified [=language map=]. [=Datatypeable term maps=] MUST generate zero or more [=literals=]. The [=datatype=] of these [=literals=] can be automatically determined with a [=natural mapping=] (producing a [=natural RDF literal=]), or it can be explicitly specified using a [=datatype map=] (producing a [=datatype-override RDF literal=]). -A datatype map (`rml:DatatypeMap`) is an [=expression map=]. It specifies a rule for generating one or more [=datatypes=] of a [=datatypeable term map=]. A [=datatype map=] MUST generate a list of [=IRI=] values, in which the [=IRIs=] are the [=datatype IRIs=] of the [=datatypeable term map=]. +A datatype map (`rml:DatatypeMap`) is a [=term map=]. It specifies a rule for generating one or more [=datatypes=] for a [=datatypeable term map=]. A [=datatype map=] MUST generate a list of [=IRI=] values, in which the [=IRIs=] are the [=datatype IRIs=] of the [=datatypeable term map=]. Given the list of values resulting from a [=datatypeable term map=] `T`, and the list of values resulting from its [=datatype map=] `D`, the resulting terms are generated by the [=n-ary Cartesian product=] combination of `T × D`, where the values in `T` are the [=literal=] values, and the values in `D` are the [=datatype IRIs=]. diff --git a/spec/section/tooling.md b/spec/section/tooling.md index f4d4fff3..f6c14fd9 100644 --- a/spec/section/tooling.md +++ b/spec/section/tooling.md @@ -16,21 +16,71 @@ or offer any other means of providing access to the [=output dataset=]. An [=RML processor=] also has access to an execution environment consisting of: * A [=logical source=] -* A base IRI used in resolving relative [=IRIs=] produced by the RML mapping. +* A [=base IRI=] How the [=logical source=] is accessed, or how users are authenticated against the database, is outside of the scope of this document. -The [=base IRI=] MUST be a valid [=IRI=]. -It SHOULD NOT contain question mark ("`?`") or hash ("`#`") characters and +#### Base IRI +A [=base IRI=] is used in resolving relative [=IRIs=] produced by the RML mapping. The [=base IRI=] MUST be +defined within the mapping document for each [=Triples Map=] or as execution environment for the [=mapping document=]. + + + + + +The [=base IRI=] MUST be a valid [=IRI=]. It SHOULD NOT contain question mark ("`?`") or hash ("`#`") characters and SHOULD end in a slash ("`/`") character. +If no specific [=base IRI=] is provided and the [=mapping process=] needs to generate absolute [=IRIs=] from relative ones, +the default base IRI to be used by the [=RML Processor=] MUST be http://example.org/. + ### RML Validator An RML data validator is a system that takes as its input diff --git a/spec/section/xsdTerminology.md b/spec/section/xsdTerminology.md deleted file mode 100644 index f255a800..00000000 --- a/spec/section/xsdTerminology.md +++ /dev/null @@ -1,6 +0,0 @@ -# XML Schema Definition Language (XSD) Terminology - -This section lists some terms normatively defined in [[XMLSCHEMA11-2]] and used in RML: - -- XSD Datatype -- Canonical mapping