From 808de0b09ebbf907f9012053fc863f49745e1839 Mon Sep 17 00:00:00 2001 From: Pano Maria Date: Thu, 1 Aug 2024 03:04:33 +0200 Subject: [PATCH 1/5] introduce appendix for rdf terminology and add def links --- spec/docs/abstract.md | 2 +- spec/docs/index.html | 1 + spec/docs/introduction.md | 12 +++---- spec/docs/joins.md | 18 +++++------ spec/docs/mapping.md | 10 +++--- spec/docs/overview.md | 42 ++++++++++++------------ spec/docs/rdfTerminology.md | 20 ++++++++++++ spec/docs/termmap.md | 64 ++++++++++++++++++------------------- spec/docs/tooling.md | 16 +++++----- spec/docs/vocabulary.md | 16 +++++----- 10 files changed, 111 insertions(+), 90 deletions(-) create mode 100644 spec/docs/rdfTerminology.md diff --git a/spec/docs/abstract.md b/spec/docs/abstract.md index f402d435..aa41dfe6 100644 --- a/spec/docs/abstract.md +++ b/spec/docs/abstract.md @@ -1 +1 @@ -This document describes RML, a generic mapping language, based on and extending [R2RML](https://www.w3.org/TR/r2rml). The RDF Mapping language (RML) is a mapping language defined to express customized mapping rules from heterogeneous data structures and serializations to the RDF [RDF-CONCEPTS](https://www.w3.org/TR/rdf-concepts/) data model. RML is defined as a superset of the W3C-standardized mapping language [R2RML](https://www.w3.org/TR/r2rml), aiming to extend its applicability and broaden its scope, adding support for data in other structured formats. [R2RML](https://www.w3.org/TR/r2rml) is the W3C standard to express customized mappings from relational databases to RDF. RML follows exactly the same syntax as R2RML; therefore, RML mappings are themselves RDF graphs. The present document describes the RML-Core language and its concepts through definitions and examples. \ No newline at end of file +This document describes RML, a generic mapping language, based on and extending [R2RML](https://www.w3.org/TR/r2rml). The RDF Mapping language (RML) is a mapping language defined to express customized mapping rules from heterogeneous data structures and serializations to the RDF [RDF-CONCEPTS](https://www.w3.org/TR/rdf-concepts/) data model. RML is defined as a superset of the W3C-standardized mapping language [R2RML](https://www.w3.org/TR/r2rml), aiming to extend its applicability and broaden its scope, adding support for data in other structured formats. [R2RML](https://www.w3.org/TR/r2rml) is the W3C standard to express customized mappings from relational databases to RDF. RML follows exactly the same syntax as R2RML; therefore, RML mappings are themselves [=RDF graphs=]. The present document describes the RML-Core language and its concepts through definitions and examples. diff --git a/spec/docs/index.html b/spec/docs/index.html index 0e1e7809..de8edc52 100644 --- a/spec/docs/index.html +++ b/spec/docs/index.html @@ -106,6 +106,7 @@
+
diff --git a/spec/docs/introduction.md b/spec/docs/introduction.md index c2f60fad..c080b9e8 100644 --- a/spec/docs/introduction.md +++ b/spec/docs/introduction.md @@ -1,9 +1,9 @@ # 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. +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=]. +The [=base IRI=] of the [=Triples Map=] is used in resolving relative [=IRIs=] produced by the [=RML mapping=].
@@ -13,13 +13,13 @@ The [=base IRI=] of the [=Triples Map=] is used in resolving relative IRIs produ
     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. +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: +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. + 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/docs/joins.md b/spec/docs/joins.md index 25d3af9f..4c6e188b 100644 --- a/spec/docs/joins.md +++ b/spec/docs/joins.md @@ -19,7 +19,7 @@ as the [Referencing Term Map]()'s [Triples Map]() is known. The [Referencing Term Map]() (`rml:ReferencingTermMap`) can be * a [Referencing Subject Map]() (`rml:ReferencingSubjectMap`) -if it constructs the subject of an RDF triple. +if it constructs the subject of an [=RDF triple=]. ``` <#TM1> @@ -33,7 +33,7 @@ if it constructs the subject of an RDF triple. If the [Referencing Term Map]() (`rml:ReferencingTermMap`) is a [Referencing Subject Map]() (`rml:ReferencingSubjectMap`), then the [Parent Term Map]() (`rml:ParentTermMap`) -should construct an IRI or Blank Node. +should construct an [=IRI=] or [=blank node=]. The aforementioned could be shortcutted by using the [parent subject map]() (`rml:parentSubjectMap`) property as follows: @@ -48,7 +48,7 @@ The aforementioned could be shortcutted by using the [parent subject map]() (`rm ``` * a [Referencing Predicate Map]() (`rml:ReferencingPredicateMap`) -if it constructs the predicate of an RDF triple. +if it constructs the predicate of an [=RDF triple=]. ``` <#TM1> @@ -67,7 +67,7 @@ if it constructs the predicate of an RDF triple. If the [Referencing Term Map]() (`rml:ReferencingTermMap`) is a [Referencing Predicate Map]() (`rml:ReferencingPredicateMap`) then -the [Parent Term Map] should construct an IRI. +the [Parent Term Map] should construct an [=IRI=]. The aforementioned could be shortcutted using the [parent predicate map]() (`rml:parentPredicateMap`) property as follows: @@ -87,7 +87,7 @@ The aforementioned could be shortcutted using the [parent predicate map]() (`rml ``` * a [Referencing Object Map]() (`rml:ReferencingObjectMap`) -if it constructs the object of an RDF triple. +if it constructs the object of an [=RDF triple=]. ``` <#TM1> @@ -123,7 +123,7 @@ The aforementioned could be shortcutted using the [parent object map]() (`rml:pa ``` * a [Referencing Graph Map]() (`rml:ReferencingGraphMap`) -if it constructs the graph of an RDF triple. +if it constructs the graph of an [=RDF triple=]. ``` <#TM1> @@ -240,7 +240,7 @@ The [Parent Term Map]() (`rml:parentTermMap`) can be ### Edge cases for Parent Term Maps **Alternative 1**: -If the Referencing Term Map of the Parent Tiples Map could/should not construct any RDF triples, +If the Referencing Term Map of the Parent Tiples Map could/should not construct any [=RDF triples=], the Triples Map should not have a Subject Map and/or the Predicate Object Map should not have a Predicate or an Object Map. ``` <#TM1> @@ -257,7 +257,7 @@ the Triples Map should not have a Subject Map and/or the Predicate Object Map sh ``` **Alternative 2**: -If the Referencing Term Map of the Parent Tiples Map could/should not construct any RDF triples, +If the Referencing Term Map of the Parent Tiples Map could/should not construct any [=RDF triple=], the Triples Map should not have a Subject Map and the Predicate Object Map should only have a Term Map. ``` <#TM1> @@ -274,7 +274,7 @@ the Triples Map should not have a Subject Map and the Predicate Object Map shoul ``` **Alternative 3**: -If the Referencing Term Map of the Parent Tiples Map should not construct any RDF triples, +If the Referencing Term Map of the Parent Tiples Map should not construct any [=RDF triple=], the Triples Map should only have a Logical Source and a Term Map. ``` <#TM1> diff --git a/spec/docs/mapping.md b/spec/docs/mapping.md index 583fa7f5..321f93e3 100644 --- a/spec/docs/mapping.md +++ b/spec/docs/mapping.md @@ -1,9 +1,9 @@ # Mapping to RDF with Triples Maps A triples map specifies a set of rules for translating -each iteration of a [=logical source=] to zero or more RDF triples. +each iteration of a [=logical source=] to zero or more [=RDF triple=]. -All RDF triples generated from one [=logical iteration=] in the [=logical source=] share the same subject. +All [=RDF triple=] generated from one [=logical iteration=] in the [=logical source=] share the same subject. A [=triples map=] is represented by a resource that references the following other resources: @@ -14,7 +14,7 @@ It may be specified in two ways: 1. using the subject map `rml:subjectMap` property, whose value MUST be the [=subject map=], or 2. using the constant shortcut property (``rml:subject``), - followed by a constant IRI. + followed by a constant [=IRI=]. * It MUST have zero or more predicate-object maps (`rml:predicateObjectMap`) properties, whose values MUST be [=predicate-object maps=]. They specify pairs of [=predicate maps=] and [=object maps=] that, @@ -59,10 +59,10 @@ A [=subject map=] MAY have one or more _**class IRIs**_. They are represented by the `rml:class` property. The values of the `rml:class` property MUST be [=IRIs=]. For each [=RDF term=] generated by the [=subject map=], -[=RDF triples=] with predicate `rdf:type` and the class IRI as object will be generated. +[=RDF triples=] with predicate `rdf:type` and the class [=IRI=] as object will be generated. -from a string "Hello World!" in the `TITLE` reference. By default, `rml:template` generates IRIs. Since the intention here is to create a literal instead, the [=term type=] has to be set. +from a string "Hello World!" in the `TITLE` reference. By default, `rml:template` generates [=IRIs=]. Since the intention here is to create a [=literal=] instead, the [=term type=] has to be set.