-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
3160 lines (2767 loc) · 149 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="generator" content="ReSpec 20.0.5"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><style>/* --- EXAMPLES --- */
div.example-title {
min-width: 7.5em;
color: #b9ab2d;
}
div.example-title span {
text-transform: uppercase;
}
aside.example, div.example, div.illegal-example {
padding: 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
div.illegal-example { color: red }
div.illegal-example p { color: black }
aside.example, div.example {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
border-color: #e0cb52;
background: #fcfaee;
}
aside.example div.example {
border-left-width: .1em;
border-color: #999;
background: #fff;
}
aside.example div.example div.example-title {
color: #999;
}
</style><style>/* --- ISSUES/NOTES --- */
div.issue-title, div.note-title , div.ednote-title, div.warning-title {
padding-right: 1em;
min-width: 7.5em;
color: #b9ab2d;
}
div.issue-title { color: #e05252; }
div.note-title, div.ednote-title { color: #2b2; }
div.warning-title { color: #f22; }
div.issue-title span, div.note-title span, div.ednote-title span, div.warning-title span {
text-transform: uppercase;
}
div.note, div.issue, div.ednote, div.warning {
margin-top: 1em;
margin-bottom: 1em;
}
.note > p:first-child, .ednote > p:first-child, .issue > p:first-child, .warning > p:first-child { margin-top: 0 }
.issue, .note, .ednote, .warning {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
}
div.issue, div.note , div.ednote, div.warning {
padding: 1em 1.2em 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
span.note, span.ednote, span.issue, span.warning { padding: .1em .5em .15em; }
.issue {
border-color: #e05252;
background: #fbe9e9;
}
.note, .ednote {
border-color: #52e052;
background: #e9fbe9;
}
.warning {
border-color: #f11;
border-width: .2em;
border-style: solid;
background: #fbe9e9;
}
.warning-title:before{
content: "⚠"; /*U+26A0 WARNING SIGN*/
font-size: 3em;
float: left;
height: 100%;
padding-right: .3em;
vertical-align: top;
margin-top: -0.5em;
}
li.task-list-item {
list-style: none;
}
input.task-list-item-checkbox {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
</style>
<title>YARRRML</title>
<style>
.nanotabs { text-align:left; width:500px; margin:20px auto 0; }
.nanotabs { margin:20px 0 60px; }
.nanotabs li { float:left; list-style:none; }
.nanotabs li a { display:block; padding:4px 6px; background:#DDD; color:#333; font:bold 11pt Verdana; text-decoration:none; }
.nanotabs li a:hover { background:#EEE; color:#000; }
.nanotabs li a.selected { background:#555; color:#FFF; }
/*.nanotabs div {clear:left; display:none; background:#EEE; border-top:1px solid #555; border-bottom:1px solid #888; padding:8px; *padding-top:4px; letter-spacing:1px; }*/
</style>
<style id="respec-mainstyle">/*****************************************************************
* ReSpec 3 CSS
* Robin Berjon - http://berjon.com/
*****************************************************************/
/* Override code highlighter background */
.hljs {
background: transparent !important;
}
/* --- INLINES --- */
h1 abbr,
h2 abbr,
h3 abbr,
h4 abbr,
h5 abbr,
h6 abbr,
a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: 1px solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: 1px dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
cite .bibref {
font-style: normal;
}
code {
color: #c83500;
}
th code {
color: inherit;
}
/* --- TOC --- */
.toc a,
.tof a {
text-decoration: none;
}
a .secno,
a .figno {
color: #000;
}
ul.tof,
ol.tof {
list-style: none outside none;
}
.caption {
margin-top: 0.5em;
font-style: italic;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th[scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd > p:first-child {
margin-top: 0;
}
.section dd > p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd,
.section dl.eldef dd {
margin-bottom: 0;
}
#issue-summary > ul,
.respec-dfn-list {
column-count: 2;
}
#issue-summary li,
.respec-dfn-list li {
list-style: none;
}
details.respec-tests-details {
margin-left: 1em;
display: inline-block;
vertical-align: top;
}
details.respec-tests-details > * {
padding-right: 2em;
}
details.respec-tests-details[open] {
z-index: 999999;
position: absolute;
border: thin solid #cad3e2;
border-radius: .3em;
background-color: white;
padding-bottom: .5em;
}
details.respec-tests-details[open] > summary {
border-bottom: thin solid #cad3e2;
padding-left: 1em;
margin-bottom: 1em;
line-height: 2em;
}
details.respec-tests-details > ul {
width: 100%;
margin-top: -0.3em;
}
details.respec-tests-details > li {
padding-left: 1em;
}
@media print {
.removeOnSave {
display: none;
}
}
</style><style>/*
github.com style (c) Vasily Polovnyov <[email protected]>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
</style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/W3C-UD"><link rel="canonical" href="https://w3id.org/yarrrml/spec/"><script id="initialUserConfig" type="application/json">{
"localBiblio": {
"DCAT": {
"title": "Data Catalog Vocabulary (DCAT) - Version 2",
"href": "https://www.w3.org/TR/vocab-dcat/",
"status": "W3C Recommendation",
"publisher": "W3C",
"date": "22 February 2020"
},
"SD": {
"title": "SPARQL 1.1 Service Description",
"href": "https://www.w3.org/TR/sparql11-service-description/",
"status": "W3C Recommendation",
"publisher": "W3C",
"date": "21 March 2013"
},
"D2RQ": {
"title": "The D2RQ Mapping Language",
"href": "https://d2rq.org/d2rq-language",
"status": "Unofficial Draft",
"authors": [
"Richard Cyganiak",
"Chris Bizer",
"Jörg Garbers",
"Oliver Maresch",
"Christian Becker"
],
"publisher": "Freie Universität Berlin - DERI",
"date": "12 March 2012"
},
"FnO": {
"title": "The Function Ontology",
"href": "https://fno.io/spec/",
"status": "Unofficial Draft",
"authors": [
"Ben De Meester",
"Anastasia Dimou"
],
"publisher": "IDLab - imec - Ghent University",
"date": "10 November 2021"
},
"RMLT": {
"title": "Target in RML",
"href": "https://rml.io/specs/rml-target",
"status": "Unofficial Draft",
"authors": [
"Dylan Van Assche",
"Anastasia Dimou"
],
"publisher": "IDLab - imec - Ghent University",
"date": "18 May 2021"
},
"RML": {
"title": "RDF Mapping Language (RML)",
"href": "https://rml.io/specs/rml/",
"status": "Unofficial Draft",
"authors": [
"Anastasia Dimou",
"Miel Vander Sande"
],
"publisher": "IDLab - imec - Ghent University",
"date": "October 2020"
},
"DataIO": {
"title": "DataIO",
"href": "https://rml.io/specs/dataio",
"status": "Unofficial Draft",
"authors": [
"Dylan Van Assche",
"Anastasia Dimou"
],
"publisher": "IDLab - imec - Ghent University",
"date": "18 May 2021"
}
},
"specStatus": "unofficial",
"editors": [
{
"name": "Dylan Van Assche",
"url": "https://dylanvanassche.be/",
"mailto": "[email protected]",
"company": "Ghent University - IDLab, imec"
},
{
"name": "Ben De Meester",
"url": "https://ben.de-meester.org",
"mailto": "[email protected]",
"company": "Ghent University - IDLab, imec"
},
{
"name": "Pieter Heyvaert",
"url": "https://pieterheyvaert.com",
"mailto": "[email protected]",
"company": "Ghent University - IDLab, imec"
},
{
"name": "Anastasia Dimou",
"mailto": "[email protected]",
"company": "Ghent University - IDLab, imec"
}
],
"shortName": "yarrrml",
"previousURI": "https://w3id.org/yarrrml/spec/index-20210930.html",
"previousPublishDate": "2021-09-30",
"previousMaturity": "unofficial",
"canonicalURI": "https://w3id.org/yarrrml/spec/",
"logos": [
{
"src": "resources/images/logo.png",
"href": "https://w3id.org/yarrrml",
"alt": "YARRRML",
"width": 164
}
],
"otherLinks": [
{
"key": "This Version",
"data": [
{
"value": "https://w3id.org/yarrrml/spec/%thisDate%/",
"href": "https://w3id.org/yarrrml/spec/%thisDate%/"
}
]
},
{
"key": "Previous Version",
"data": [
{
"value": "https://w3id.org/yarrrml/spec/%prevDate%/",
"href": "https://w3id.org/yarrrml/spec/%prevDate%/"
}
]
},
{
"key": "Website",
"data": [
{
"value": "https://w3id.org/yarrrml",
"href": "https://w3id.org/yarrrml"
}
]
}
],
"publishISODate": "2023-01-26T00:00:00.000Z",
"generatedSubtitle": "Unofficial Draft 26 January 2023"
}</script><meta name="description" content="YARRRML (pronounced /jɑɹməl/) is a human readable text-based representation for declarative generation rules.
It is a subset of [YAML],
a widely used data serialization language designed to be human-friendly."></head>
<body class="h-entry"><div class="head">
<h1 class="title p-name" id="title">YARRRML</h1>
<h2 id="unofficial-draft-26-january-2023">Unofficial Draft <time class="dt-published" datetime="2023-01-26">26 January 2023</time></h2>
<dl>
<dt>Editors:</dt>
<dd class="p-author h-card vcard"><a class="u-url url p-name fn" href="https://dylanvanassche.be/">Dylan Van Assche</a>, Ghent University - IDLab, imec, <a class="ed_mailto u-email email" href="mailto:[email protected]">[email protected]</a></dd><dd class="p-author h-card vcard"><a class="u-url url p-name fn" href="https://ben.de-meester.org">Ben De Meester</a>, Ghent University - IDLab, imec, <a class="ed_mailto u-email email" href="mailto:[email protected]">[email protected]</a></dd><dd class="p-author h-card vcard"><a class="u-url url p-name fn" href="https://pieterheyvaert.com">Pieter Heyvaert</a>, Ghent University - IDLab, imec, <a class="ed_mailto u-email email" href="mailto:[email protected]">[email protected]</a></dd><dd class="p-author h-card vcard"><span class="p-name fn">Anastasia Dimou</span>, Ghent University - IDLab, imec, <a class="ed_mailto u-email email" href="mailto:[email protected]">[email protected]</a></dd>
<dt>This Version:</dt><dd>
<a href="https://w3id.org/yarrrml/spec/%thisDate%/">https://w3id.org/yarrrml/spec/%thisDate%/</a>
</dd><dt>Previous Version:</dt><dd>
<a href="https://w3id.org/yarrrml/spec/%prevDate%/">https://w3id.org/yarrrml/spec/%prevDate%/</a>
</dd><dt>Website:</dt><dd>
<a href="https://w3id.org/yarrrml">https://w3id.org/yarrrml</a>
</dd>
</dl>
<p class="copyright">
This document is licensed under a
<a class="subfoot" href="https://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons
Attribution 3.0 License</a>.
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory"><h2 id="abstract-0">Abstract</h2>
<p>
YARRRML (pronounced /jɑɹməl/) is a human readable text-based representation for declarative generation rules.
It is a subset of [<cite><a class="bibref" href="#bib-YAML">YAML</a></cite>],
a widely used data serialization language designed to be human-friendly.
</p>
</section>
<section id="sotd" class="introductory"><h2 id="status-of-this-document">Status of This Document</h2><p>
This document is draft of a potential specification. It has no official standing of
any kind and does not represent the support or consensus of any standards organisation.
</p></section><nav id="toc"><h2 class="introductory" id="table-of-contents">Table of Contents</h2><ol class="toc"><li class="tocline"><a href="#terminology" class="tocxref"><span class="secno">1. </span>Terminology</a></li><li class="tocline"><a href="#profiles" class="tocxref"><span class="secno">2. </span>Profiles</a></li><li class="tocline"><a href="#base-iri" class="tocxref"><span class="secno">3. </span>Base IRI</a></li><li class="tocline"><a href="#prefixes-and-namespaces" class="tocxref"><span class="secno">4. </span>Prefixes and namespaces</a></li><li class="tocline"><a href="#authors" class="tocxref"><span class="secno">5. </span>Authors</a></li><li class="tocline"><a href="#template" class="tocxref"><span class="secno">6. </span>Template</a></li><li class="tocline"><a href="#data-sources" class="tocxref"><span class="secno">7. </span>Data sources</a><ol class="toc"><li class="tocline"><a href="#keys" class="tocxref"><span class="secno">7.1 </span>Keys</a></li><li class="tocline"><a href="#type-1" class="tocxref"><span class="secno">7.2 </span>Type</a></li><li class="tocline"><a href="#access-0" class="tocxref"><span class="secno">7.3 </span>Access</a></li><li class="tocline"><a href="#query-formulation" class="tocxref"><span class="secno">7.4 </span>Query formulation</a></li><li class="tocline"><a href="#query" class="tocxref"><span class="secno">7.5 </span>Query</a></li><li class="tocline"><a href="#reference-formulation" class="tocxref"><span class="secno">7.6 </span>Reference formulation</a></li><li class="tocline"><a href="#iterator" class="tocxref"><span class="secno">7.7 </span>Iterator</a></li><li class="tocline"><a href="#delimiter" class="tocxref"><span class="secno">7.8 </span>Delimiter</a></li><li class="tocline"><a href="#encoding" class="tocxref"><span class="secno">7.9 </span>Encoding</a></li><li class="tocline"><a href="#credentials" class="tocxref"><span class="secno">7.10 </span>Credentials</a></li><li class="tocline"><a href="#content-type" class="tocxref"><span class="secno">7.11 </span>Content type</a></li><li class="tocline"><a href="#operation-type" class="tocxref"><span class="secno">7.12 </span>Operation type</a></li><li class="tocline"><a href="#security" class="tocxref"><span class="secno">7.13 </span>Security</a></li><li class="tocline"><a href="#query-formulation-vs-reference-formulation" class="tocxref"><span class="secno">7.14 </span>Query formulation vs reference formulation</a></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">7.15 </span>Examples</a></li></ol></li><li class="tocline"><a href="#targets" class="tocxref"><span class="secno">8. </span>Targets</a><ol class="toc"><li class="tocline"><a href="#keys-0" class="tocxref"><span class="secno">8.1 </span>Keys</a></li><li class="tocline"><a href="#type-2" class="tocxref"><span class="secno">8.2 </span>Type</a></li><li class="tocline"><a href="#access-1" class="tocxref"><span class="secno">8.3 </span>Access</a></li><li class="tocline"><a href="#serialization" class="tocxref"><span class="secno">8.4 </span>Serialization</a></li><li class="tocline"><a href="#compression" class="tocxref"><span class="secno">8.5 </span>Compression</a></li><li class="tocline"><a href="#examples-0" class="tocxref"><span class="secno">8.6 </span>Examples</a></li></ol></li><li class="tocline"><a href="#mappings" class="tocxref"><span class="secno">9. </span>Mappings</a><ol class="toc"><li class="tocline"><a href="#data-sources-0" class="tocxref"><span class="secno">9.1 </span>Data sources</a></li><li class="tocline"><a href="#targets-0" class="tocxref"><span class="secno">9.2 </span>Targets</a></li><li class="tocline"><a href="#subjects" class="tocxref"><span class="secno">9.3 </span>Subjects</a></li><li class="tocline"><a href="#predicates-and-objects" class="tocxref"><span class="secno">9.4 </span>Predicates and objects</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">9.5 </span>Datatypes</a></li><li class="tocline"><a href="#languages" class="tocxref"><span class="secno">9.6 </span>Languages</a></li><li class="tocline"><a href="#referring-to-other-mappings" class="tocxref"><span class="secno">9.7 </span>Referring to other mappings</a></li><li class="tocline"><a href="#graphs" class="tocxref"><span class="secno">9.8 </span>Graphs</a><ol class="toc"><li class="tocline"><a href="#all-triples" class="tocxref"><span class="secno">9.8.1 </span>All triples</a></li><li class="tocline"><a href="#all-triples-with-a-specific-predicate-and-object" class="tocxref"><span class="secno">9.8.2 </span>All triples with a specific predicate and object</a></li></ol></li></ol></li><li class="tocline"><a href="#functions" class="tocxref"><span class="secno">10. </span>Functions</a></li><li class="tocline"><a href="#conditions" class="tocxref"><span class="secno">11. </span>Conditions</a></li><li class="tocline"><a href="#external-references" class="tocxref"><span class="secno">12. </span>External references</a></li><li class="tocline"><a href="#shortcuts" class="tocxref"><span class="secno">13. </span>Shortcuts</a><ol class="toc"><li class="tocline"><a href="#keys-1" class="tocxref"><span class="secno">13.1 </span>Keys</a></li><li class="tocline"><a href="#predicates" class="tocxref"><span class="secno">13.2 </span>Predicates</a></li></ol></li><li class="tocline"><a href="#reference-implementation" class="tocxref"><span class="secno">14. </span>Reference implementation</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ol class="toc"><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.1 </span>Informative references</a></li></ol></li></ol></nav>
<section id="terminology">
<!--OddPage--><h2 id="x1-terminology"><span class="secno">1. </span>Terminology</h2>
<dl>
<dt><dfn data-dfn-type="dfn" id="dfn-subject">subject</dfn></dt>
<dd>the subject of an RDF triple</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-predicate">predicate</dfn></dt>
<dd>the predicate of an RDF triple</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-object">object</dfn></dt>
<dd>the object of an RDF triple</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-class">class</dfn></dt>
<dd>the type of an entity</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-datatype">datatype</dfn></dt>
<dd>the type of a literal value</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-reference">reference</dfn></dt>
<dd>the reference to a data fraction in a data source</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-function">function</dfn></dt>
<dd>a programmatic function that takes 0 or more input parameters and returns a single result</dd>
</dl>
</section>
<section id="profiles">
<!--OddPage--><h2 id="x2-profiles"><span class="secno">2. </span>Profiles</h2>
<p>
This specification includes the following main profiles for tools that process YARRRML documents:
</p>
<ul>
<li>R2RML: applies the semantics specified by [<cite><a class="bibref" href="#bib-R2RML">R2RML</a></cite>];</li>
<li>RML: applies the semantics specified by [<cite><a class="bibref" href="#bib-RML">RML</a></cite>]; and</li>
<li>RMLT: applies the semantics specified by [<cite><a class="bibref" href="#bib-RMLT">RMLT</a></cite>].</li>
</ul>
<p>
These profiles can be extended with additional profiles, which cannot be used on their own:
</p>
<ul>
<li>FORMATS: applies the semantics specified by the <a href="http://w3.org/ns/formats">W3C Formats namespace</a>.</li>
<li>COMP: applies the semantics specified by the <a href="http://semweb.mmlab.be/ns/rml-compression#">Compression namespace</a>.</li>
<li>VOID: applies the semantics specified by [<cite><a class="bibref" href="#bib-VoID">VoID</a></cite>];</li>
<li>FnO: applies the semantics specified by [<cite><a class="bibref" href="#bib-FnO">FnO</a></cite>];</li>
<li>DCAT: applies the semantics specified by [<cite><a class="bibref" href="#bib-DCAT">DCAT</a></cite>];</li>
<li>D2RQ: applies the semantics specified by [<cite><a class="bibref" href="#bib-D2RQ">D2RQ</a></cite>];</li>
<li>SD: applies the semantics specified by SD ([<cite><a class="bibref" href="#bib-sparql11-service-description">sparql11-service-description</a></cite>]); and</li>
<li>CSVW: applies the semantics specified by CSVW ([<cite><a class="bibref" href="#bib-csv2rdf">csv2rdf</a></cite>]).</li>
<li>WOT: applies the semantics specified by WoT Thing Description and WoT Security ([<cite><a class="bibref" href="#bib-wot-thing-description">wot-thing-description</a></cite>], [<cite><a class="bibref" href="#bib-wot-security">wot-security</a></cite>])</li>
</ul>
</section>
<section id="base-iri">
<!--OddPage--><h2 id="x3-base-iri"><span class="secno">3. </span>Base IRI</h2>
<p>
A base IRI can be defined.
This IRI will be used for the creation of the IRIs of the term maps and sources of the [R2]RML rules.
</p>
<p>
A base IRI can be added by adding key <code>base</code> with as value the IRI itself to the root of the document.
In the following example the base IRI is set to <code>http://mybaseiri.com#</code>.
</p>
<div class="example"><div class="example-title marker"><span>Example 1</span><span style="text-transform: none">: base IRI</span></div><pre id="example-base-iri" class="nohighlight">base: http://mybaseiri.com#</pre></div>
</section>
<section id="prefixes-and-namespaces">
<!--OddPage--><h2 id="x4-prefixes-and-namespaces"><span class="secno">4. </span>Prefixes and namespaces</h2>
<p>
A set of prefixes and namespaces are predefined by default in every YARRRML document.
There are the same as the predefined prefixes for <a href="https://www.w3.org/2011/rdfa-context/rdfa-1.1">RDFa</a>.
</p>
<p>
Custom prefixes can be added by adding the collection <code>prefixes</code> to the root of the document.
Each combination of a prefix and namespace is added to this collection as a key-value pair.
In the following example two prefixes are defined: <code>ex</code> and <code>test</code>.
</p>
<div class="example"><div class="example-title marker"><span>Example 2</span><span style="text-transform: none">: custom prefixes</span></div><pre id="example-custom-prefixes" class="nohighlight">prefixes:
ex: http://www.example.com
test: http://www.test.com</pre></div>
</section>
<section id="authors">
<!--OddPage--><h2 id="x5-authors"><span class="secno">5. </span>Authors</h2>
<p>
The authors of the YARRRML rules can be added via the key <code>authors</code>.
The value is an array with an object for each author.
Each author can have the following keys:
</p>
<dl>
<dt><dfn data-dfn-type="dfn" id="dfn-name">name</dfn></dt>
<dd>the name of the author</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-email">email</dfn></dt>
<dd>the email of the author</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-website">website</dfn></dt>
<dd>the website of the author</dd>
</dl>
<p>
In the following example two authors are defined.
</p>
<div id="tabs-author" class="nanotabs">
<ul>
<li><a href="#tab-author-1" class="selected">YARRRML</a></li>
<li><a href="#tab-author-2" class="">RML</a></li>
</ul>
<div id="tab-author-1" style="display: block;">
<div class="example"><div class="example-title marker"><span>Example 3</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-yarrrml" class="nohighlight">authors:
- name: John Doe
email: [email protected]
- name: Jane Doe
website: https://janedoe.com</pre></div>
</div>
<div id="tab-author-2" style="display: none;">
<div class="example"><div class="example-title marker"><span>Example 4</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-rml" class="hljs css" aria-busy="false">:Rules a void:Dataset;
void:exampleResource <#TM>; # linking all Triples Maps
dcterms:contributor [
a foaf:Person;
rdfs:label <span class="hljs-string">"John Doe"</span>;
foaf:mbox <mailto:[email protected]>
], [
a foaf:Person;
rdfs:label <span class="hljs-string">"Jane Doe"</span>;
foaf:homepage <https://janedoe.com>
].</pre></div>
</div>
</div>
<p>
A string template exists that provides a shortcut version: <code>name <email> (website)</code>.
In the following example the same two authors are defined.
</p>
<div id="tabs-author-sc" class="nanotabs">
<ul>
<li><a href="#tab-author-sc-1" class="selected">YARRRML</a></li>
<li><a href="#tab-author-sc-2" class="">RML</a></li>
</ul>
<div id="tab-author-sc-1" style="display: block;">
<div class="example"><div class="example-title marker"><span>Example 5</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-yarrrml-sc" class="nohighlight">authors:
- John Doe <[email protected]>
- Jane Doe (https://janedoe.com)</pre></div>
</div>
<div id="tab-author-sc-2" style="display: none;">
<div class="example"><div class="example-title marker"><span>Example 6</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-rml-sc" class="hljs css" aria-busy="false">:Rules a void:Dataset;
void:exampleResource <#TM>; # linking all Triples Maps
dcterms:contributor [
a foaf:Person;
rdfs:label <span class="hljs-string">"John Doe"</span>;
foaf:mbox <mailto:[email protected]>
], [
a foaf:Person;
rdfs:label <span class="hljs-string">"Jane Doe"</span>;
foaf:homepage <https://janedoe.com>>
].</pre></div>
</div>
</div>
<p>
In the case that authors have a WebID, it can be used instead of providing the name, email and so on.
In the following example the same two authors are added via their WebIDs.
</p>
<div id="tabs-author-webid" class="nanotabs">
<ul>
<li><a href="#tab-author-webid-1" class="selected">YARRRML</a></li>
<li><a href="#tab-author-webid-2" class="">RML</a></li>
</ul>
<div id="tab-author-webid-1" style="display: block;">
<div class="example"><div class="example-title marker"><span>Example 7</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-yarrrml-webid" class="nohighlight">authors:
- http://johndoe.com/#me
- http://janedoe.com/#me</pre></div>
</div>
<div id="tab-author-webid-2" style="display: none;">
<div class="example"><div class="example-title marker"><span>Example 8</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-rml-webid" class="hljs css" aria-busy="false">:Rules a void:Dataset;
void:exampleResource <#TM>; # linking all Triples Maps
dcterms:contributor <http://johndoe.com/#me>,
<http://janedoe.com/#me>.</pre></div>
</div>
</div>
<p>
In all the above cases when there is only author, an array is not needed.
In the following example one author is defined.
</p>
<div id="tabs-author-sc-single" class="nanotabs">
<ul>
<li><a href="#tab-author-sc-single-1" class="selected">YARRRML</a></li>
<li><a href="#tab-author-sc-single-2" class="">RML</a></li>
</ul>
<div id="tab-author-sc-single-1" style="display: block;">
<div class="example"><div class="example-title marker"><span>Example 9</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-yarrrml-sc-single" class="nohighlight">authors: John Doe <[email protected]></pre></div>
</div>
<div id="tab-author-sc-single-2" style="display: none;">
<div class="example"><div class="example-title marker"><span>Example 10</span><span style="text-transform: none">: mapping with multiple authors</span></div><pre id="example-author-rml-sc-single" class="hljs css" aria-busy="false">:Rules a void:Dataset;
void:exampleResource <#TM>; # linking all Triples Maps
dcterms:contributor [
a foaf:Person;
rdfs:label <span class="hljs-string">"John Doe"</span>;
foaf:mbox <mailto:[email protected]>
].</pre></div>
</div>
</div>
</section>
<section id="template">
<!--OddPage--><h2 id="x6-template"><span class="secno">6. </span>Template</h2>
<p>
A template contains 0 or more constant strings and 0 or more references to data in a data.
References are prefixed with <code>$(</code> and suffixed with <code>)</code>.
For example, <code>foo</code> is a template with one constant string.
<code>$(id)</code> is a template with one reference to <code>id</code>.
<code>foo-$(id)</code> is a template with one constant string <code>foo-</code> and one reference to <code>id</code>.
</p>
</section>
<section id="data-sources">
<!--OddPage--><h2 id="x7-data-sources"><span class="secno">7. </span>Data sources</h2>
<p>
The data sources are defined in the <code>sources</code> collection in the root of the document.
Each source is added to this collection via a key-value pair.
The key has to be unique for every source.
The value is a collection with the keys described below.
</p>
<section id="keys">
<h3 id="x7-1-keys"><span class="secno">7.1 </span>Keys</h3>
<dl>
<dt><dfn data-dfn-type="dfn" id="dfn-type">type</dfn></dt>
<dd>Type of the data source.<br>
Required profiles: RML. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-access">access</dfn></dt>
<dd>Local or remote location of the data source. <br>
Required profiles: RML. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-credentials">credentials</dfn></dt>
<dd>Credentials required to access the data source.<br>
Required profiles: RML. <br>
Datatype: collection.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-queryformulation">queryFormulation</dfn></dt>
<dd>Query formulation used to query the data source. <br>
Required profiles: RML or R2RML. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-query">query</dfn></dt>
<dd>Query to execute on the data source to retrieve the desired data. <br>
Required profiles: RML or R2RML. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-encoding">encoding</dfn></dt>
<dd>Encoding used by the data. <br>
Required profiles: RML and CSVW. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-delimiter">delimiter</dfn></dt>
<dd>Delimiter to separate fields in a record. <br>
Required profiles: RML and CSVW. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-contenttype">contentType</dfn></dt>
<dd>Content type to expect expressed as MIME types. <br>
Required profiles: RML and WOT. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-operationtype">operationType</dfn></dt>
<dd>Indicates the operation type of the Web of Things description. <br>
Required profiles: RML and WOT. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-referenceformulation">referenceFormulation</dfn></dt>
<dd>Reference formulation used to access the data retrieved from the data source. <br>
Required profiles: RML. <br>
Datatype: string.
</dd>
<dt><dfn data-dfn-type="dfn" id="dfn-iterator">iterator</dfn></dt>
<dd>Path to the records over which to iterate. <br>
Required profiles: RML. <br>
Datatype: string.
</dd>
</dl>
</section>
<section id="type-1">
<h3 id="x7-2-type"><span class="secno">7.2 </span>Type</h3>
<p>
This key's value describes what type of data source is used,
so that the correct way of connecting to the data source can be determined.
By default a local file is assumed when the <code>access</code> value is a path such as <code>file.json</code>.
The value of type is then implicitly <code>localfile</code>.
By default a remote file is assumed and retrieved via an HTTP GET when a URL is given such as <code>http://example.org/file.json</code>.
The value of type is then implicitly <code>remotefile</code>.
The following values are supported:
</p>
<table>
<tbody><tr><th>Data source type</th><th>Value</th><th>Required profiles</th></tr>
<tr><td><a href="https://www.oracle.com/database/technologies/">Oracle Database</a></td><td>oracle</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.mysql.com/">MySQL</a></td><td>mysql</td><td>RML and D2RQ</td></tr>
<tr><td><a href="http://hsqldb.org/">HSQLDB</a></td><td>hsql</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.postgresql.org/">PostgreSQL</a></td><td>postgresql</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.ibm.com/products/db2-database">IBM DB2</a></td><td>db2</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.ibm.com/products/informix">IBM Informix</a></td><td>informix</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.actian.com/data-management/actian-x-hybrid-rdbms/">Ingres</a></td><td>ingres</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.sap.com/products/sybase-ase.html">SAP Adaptive Server Enterprise</a></td><td>sapase</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.sap.com/products/sql-anywhere.html">SAP SQL Anywhere</a></td><td>sapsqlanywhere</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://firebirdsql.org/">Firebird</a></td><td>firebird</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.microsoft.com/en-gb/sql-server/sql-server-2019">Microsoft SQL Server</a></td><td>mssqlserver</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://virtuoso.openlinksw.com/">Virtuoso</a></td><td>virtuoso</td><td>RML and D2RQ</td></tr>
<tr><td><a href="https://www.w3.org/WoT/">Web of Things</a></td><td>wot</td><td>RML and WOT</td></tr>
<tr><td>SPARQL endpoint</td><td>sparql</td><td>RML and SD</td></tr>
<tr><td>Local file</td><td>localfile</td><td>RML</td></tr>
<tr><td>Remote file</td><td>remotefile</td><td>RML</td></tr>
</tbody></table>
<div class="note"><div role="heading" class="note-title marker" id="h-note" aria-level="4"><span>Note</span></div><div class="">
<p>
R2RML rules do not include this information:
it is supplied directly to the used R2RML processor.
Also, it does not support SPARQL endpoints, local files, and remote files.
</p>
</div></div>
</section>
<section id="access-0">
<h3 id="x7-3-access"><span class="secno">7.3 </span>Access</h3>
<p>
This key's value describes where the data source can be accessed.
Examples are <code>file.json</code> and <code>http://example.org/my/db</code>.
</p>
</section>
<section id="query-formulation">
<h3 id="x7-4-query-formulation"><span class="secno">7.4 </span>Query formulation</h3>
<p>
Query formulations define what type of query is used query to a data source.
This key's supported values are the same as the values for the type,
together with the additional values below.
Therefore, if only a type is provided the query formulation is implicitly the same.
But if you want for example to use a MySQL query with an Oracle Database,
then you need to specify both the type and the query formulation.
</p>
<p>
In the case of SPARQL endpoints, defined by the value <code>sparql</code> for type,
the query formulation is by default <code>sparql11</code>: the data sources are queried
via a <a href="https://www.w3.org/TR/sparql11-query/">SPARQL 1.1 query</a>.
</p>
<table>
<tbody><tr><th>Query formulation</th><th>Value</th><th>Required profiles</th></tr>
<tr><td><a href="https://www.w3.org/TR/sparql11-query/">SPARQL 1.1 query</a> (default for SPARQL endpoint)</td><td>sparql11</td><td>RML and SD</td></tr>
<tr><td><a href="https://en.wikipedia.org/wiki/SQL:2008">SQL:2008</a></td><td>sql2008</td><td>RML and D2RQ, or R2RML</td></tr>
<tr><td><a href="https://en.wikipedia.org/wiki/SQL:2011">SQL:2011</a></td><td>sql2011</td><td>RML and D2RQ, or R2RML</td></tr>
<tr><td><a href="https://en.wikipedia.org/wiki/SQL:2016">SQL:2016</a></td><td>sql2016</td><td>RML and D2RQ, or R2RML</td></tr>
</tbody></table>
</section>
<section id="query">
<h3 id="x7-5-query"><span class="secno">7.5 </span>Query</h3>
<p>
This key's value is a query that conforms the selected query formulation.
For example, if the query formulation is <code>mysql</code>, then
the value of <code>query</code> needs to be a valid MySQL query.
</p>
</section>
<section id="reference-formulation">
<h3 id="x7-6-reference-formulation"><span class="secno">7.6 </span>Reference formulation</h3>
<p>
Reference formulations define how to access the data retrieved from the data source.
For example, this retrieved data can be query results coming from a database or
a JSON file on the local file system.
The value of this key is a string.
This key's supported values are.
</p>
<table>
<tbody><tr><th>Reference formulation</th><th>Value</th><th>Required profiles</th></tr>
<tr><td>CSV (tables with columns and rows)</td><td>csv</td><td>RML</td></tr>
<tr><td><a href="https://goessner.net/articles/JsonPath/">JSONPath</a></td><td>jsonpath</td><td>RML</td></tr>
<tr><td><a href="https://www.w3.org/TR/xpath/">XPath</a></td><td>xpath</td><td>RML</td></tr>
<tr><td><a href="https://www.w3.org/TR/xquery/">XQuery</a></td><td>xquery</td><td>RML</td></tr>
</tbody></table>
</section>
<section id="iterator">
<h3 id="x7-7-iterator"><span class="secno">7.7 </span>Iterator</h3>