Unofficial Draft
Copyright © 2025 the document editors/authors. Text is available under the Creative Commons Attribution 4.0 International Public License; additional terms may apply.
This extension of [YARRRML] applies the semantics specified by [RML-DYNAMIC-TARGET], an extension of [RML], dynamically defining targets based on source data.
This section is non-normative.
We assume readers have basic familiarity with [RDF], [RML] and [YARRRML] concepts.
In this document, examples assume the following namespace prefix bindings unless otherwise stated:
| Prefix | Namespace | 
|---|---|
| rml: | http://w3id.org/rml/ | 
| rmle: | https://w3id.org/imec/rml/ns/extensions# | 
| htv: | http://www.w3.org/2011/http# | 
| ex: | http://example.org/ | 
| foaf: | http://xmlns.com/foaf/0.1/ | 
The examples are contained in color-coded boxes. We use the Turtle syntax [Turtle] to write RDF.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key word MAY in this document is to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, it appears in all capitals, as shown here.
Dynamic targets generate targets based on data of a data source, referred to in this specification as generated targets. 
Dynamic targets are defined in the targets collections at the root of a [YARRRML] document. 
To describe a dynamic target, [YARRRML] is extended with following keys for targets: 
sources collection.string.Every target with the key source is a dynamic target. 
The value of the other keys of dynamic target are (dynamic) templates instead of (static) strings. 
These templates MAY contain references to data in the source of the mapping where the dynamic target is used. 
The mapping exporting its triples to the generated targets, refers to these generated targets by the id of those generated targets. For this purposing, this specification allows templates as values for the targets key within a mapping. 
The mapping generates the identifiers  for those targets using its own data source, which is not necessarily the same data source as source of the dynamic target. 
If a mapping and a dynamic target have the same data source, this mapping MAY refer to the generated targets by the unique key of that dynamic target.
If a dynamic target is only used in mappings with the same source as this dynamic targets, the key id is optional for this dynamic target.
In the following example the mapping tm_people has the same data source as the dynamic target lt_persons, 
while the mapping tm_friends has a different data source. 
The mapping tm_friends can export data to the targets generated by the dynamic target lt_persons, by generating matching identifiers  for the generated targets. 
In the following example the dynamic target lt_persons doesn't need an explicit id key, because it is only used in mappings with the same data source as the dynamic target. 
Referenced in: