Skip to content

Commit c7d20fa

Browse files
committed
Add test links.
1 parent edb7bbf commit c7d20fa

File tree

1 file changed

+127
-23
lines changed

1 file changed

+127
-23
lines changed

spec/index.html

Lines changed: 127 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
<script src="./common/local-biblio.js" class="remove"></script>
88
<script src="./common/fixup.js" class="remove"></script>
99
<script class='remove'>
10+
// Use fragment identifier of test as name.
11+
function data_test_display() {
12+
const test_references = document.querySelectorAll('details.respec-tests-details a');
13+
for( const a of test_references ) {
14+
const href = a.href;
15+
const test_reference = href.split('#')[1];
16+
a.textContent = test_reference;
17+
}
18+
}
19+
1020
var respecConfig = {
1121
localBiblio: localBibliography,
1222
specStatus: "ED",
@@ -38,7 +48,9 @@
3848
company: "Freie Universität Berlin", companyURL: "http://www.fu-berlin.de/" },
3949
],
4050

41-
xref: [ "RDF11-CONCEPTS", "TURTLE" ], // Fixme: change to RDF12-CONCEPTS and RDF12-TURTLE
51+
xref: [ "RDF12-CONCEPTS", "RDF12-TURTLE" ],
52+
postProcess: [data_test_display],
53+
4254
github: "https://github.com/w3c/rdf-trig/",
4355
group: "rdf-star",
4456
doJsonLd: true,
@@ -378,41 +390,63 @@ <h2>TriG Grammar</h2>
378390
<section id="sec-grammar-ws">
379391
<h3>White Space</h3>
380392

381-
<p>White space (production <a href="#grammar-production-WS"><code>WS</code></a>)
393+
<p id="ws-tests1" data-tests="
394+
../../rdf11/rdf-trig/index.html#trig-eval-struct-02,
395+
../../rdf11/rdf-trig/index.html#trig-subm-23,
396+
../../rdf11/rdf-trig/index.html#trig-subm-24">
397+
White space (production <a href="#grammar-production-WS"><code>WS</code></a>)
382398
is used to separate two terminals which would otherwise be (mis-)recognized as one terminal.
383399
Rule names below in capitals indicate where white space is significant;
384400
these form a possible choice of terminals for constructing a <a>TriG parser</a>.</p>
385401

386-
<p>White space is significant in the production <a href="#grammar-production-String"><code>String</code></a>.</p>
402+
<p id="ws-tests2" data-tests="
403+
../../rdf11/rdf-trig/index.html#trig-syntax-string-08,
404+
../../rdf11/rdf-trig/index.html#trig-syntax-string-09,
405+
../../rdf11/rdf-trig/index.html#trig-syntax-string-10,
406+
../../rdf11/rdf-trig/index.html#trig-syntax-string-11">
407+
White space is significant in the production <a href="#grammar-production-String"><code>String</code></a>.</p>
387408
</section>
388409

389410
<section id="sec-grammar-comments">
390411
<h3>Comments</h3>
391412

392-
<p>Comments in TriG start with a <a href="#cp-number-sign"><code title="number sign">#</code></a> outside an
393-
<a href="#grammar-production-IRIREF" ><code>IRIREF</code> </a>,
394-
<a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE" ><code>STRING_LITERAL_SINGLE_QUOTE</code> </a>,
395-
<a href="#grammar-production-STRING_LITERAL_QUOTE" ><code>STRING_LITERAL_QUOTE</code> </a>,
396-
<a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE"><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></a>, or
397-
<a href="#grammar-production-STRING_LITERAL_LONG_QUOTE" ><code>STRING_LITERAL_LONG_QUOTE</code> </a>,
398-
and continue to the end of line (marked by
399-
<a href="#cp-line-feed"><code title="line feed">LF</code></a>, or
400-
<a href="#cp-carriage-return"><code title="carriage return">CR</code></a>),
401-
or end of file if there is no end of line after the comment marker.
402-
Comments are treated as white space.</p>
413+
<p id="comments-tests1" data-tests="
414+
../../rdf11/rdf-trig/index.html#comment_following_localName,
415+
../../rdf11/rdf-trig/index.html#comment_following_PNAME_NS">
416+
Comments in TriG start with a <a href="#cp-number-sign"><code title="number sign">#</code></a> outside an
417+
<a href="#grammar-production-IRIREF" ><code>IRIREF</code> </a>,
418+
<a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE" ><code>STRING_LITERAL_SINGLE_QUOTE</code> </a>,
419+
<a href="#grammar-production-STRING_LITERAL_QUOTE" ><code>STRING_LITERAL_QUOTE</code> </a>,
420+
<a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE"><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></a>, or
421+
<a href="#grammar-production-STRING_LITERAL_LONG_QUOTE" ><code>STRING_LITERAL_LONG_QUOTE</code> </a>,
422+
and continue to the end of line (marked by
423+
<a href="#cp-line-feed"><code title="line feed">LF</code></a>, or
424+
<a href="#cp-carriage-return"><code title="carriage return">CR</code></a>),
425+
or end of file if there is no end of line after the comment marker.
426+
Comments are treated as white space.</p>
403427
</section>
404428

405429
<section id="sec-iri-references">
406430
<h3>IRI References</h3>
407-
<p>
431+
<p id="iri-tests1" data-tests="
432+
../../rdf11/rdf-trig/index.html#IRI-resolution-01,
433+
../../rdf11/rdf-trig/index.html#IRI-resolution-02,
434+
../../rdf11/rdf-trig/index.html#IRI-resolution-07,
435+
../../rdf11/rdf-trig/index.html#IRI-resolution-08">
408436
<a data-cite="RDF12-CONCEPTS#dfn-relative-iri">Relative IRI references</a> are resolved with base IRIs
409437
as per [[[RFC3986]]] [[RFC3986]] using only the basic algorithm in section 5.2.
410438
Neither Syntax-Based Normalization nor Scheme-Based Normalization
411439
(described in sections 6.2.2 and 6.2.3 of RFC3986) are performed.
412440
Characters additionally allowed in IRI references are treated in the same way that
413441
unreserved characters are treated in URI references, per section 6.5 of [[[RFC3987]]] [[RFC3987]].
414442
</p>
415-
<p>
443+
<p id="iri-tests2" data-tests="
444+
../../rdf11/rdf-trig/index.html#old_style_base,
445+
../../rdf11/rdf-trig/index.html#SPARQL_style_base,
446+
../../rdf11/rdf-trig/index.html#trig-syntax-base-01,
447+
../../rdf11/rdf-trig/index.html#trig-syntax-base-02,
448+
../../rdf11/rdf-trig/index.html#trig-syntax-base-03,
449+
../../rdf11/rdf-trig/index.html#trig-syntax-base-04">
416450
The <code>@base</code> or <a href="#grammar-production-sparqlBase"><code>BASE</code></a> directive
417451
defines the Base IRI used to resolve <a data-cite="RDF12-CONCEPTS#dfn-relative-iri">relative IRI references</a>
418452
per [[RFC3986]] <a data-cite="RFC3986#section-5.1.1">section 5.1.1, "Base URI Embedded in Content"</a>.
@@ -1021,15 +1055,34 @@ <h4 style="padding-bottom:0; margin-bottom:0;">Triple Production</h4>
10211055
<section id="reifier">
10221056
<h4>Reifiers</h4>
10231057

1024-
<p>Beginning the <a href="#grammar-production-reifier"><code>reifier</code></a> production,
1058+
<p data-id="reifier-tests" data-tests="
1059+
syntax/index.html#trig12-ann-5,
1060+
syntax/index.html#trig12-ann-6,
1061+
syntax/index.html#trig12-ann-7,
1062+
syntax/index.html#trig12-ann-8,
1063+
eval/index.html#trig12-annotation-06,
1064+
eval/index.html#trig12-annotation-08,
1065+
eval/index.html#trig12-annotation-09,
1066+
eval/index.html#trig12-annotation-11,
1067+
eval/index.html#trig12-annotation-12">
1068+
Beginning the <a href="#grammar-production-reifier"><code>reifier</code></a> production,
10251069
the |curReifier| is taken from the <a href="#handle-reifier"><code>reifier</code></a> term constructor.
10261070
Then yield the the RDF triple |curReifier| <code>rdf:reifies</code> |curTripleTerm|.</p>
10271071
</section>
10281072

10291073
<section id="reifiedTriple">
10301074
<h4>Reified Triples</h4>
10311075

1032-
<p>Beginning the <a href="#grammar-production-reifiedTriple"><code>reifiedTriple</code></a> production
1076+
<p id="reifiedTriple-tests" data-tests="
1077+
eval/index.html#trig12-rt-01,
1078+
eval/index.html#trig12-rt-02,
1079+
eval/index.html#trig12-rt-03,
1080+
eval/index.html#trig12-rt-04,
1081+
eval/index.html#trig12-rt-05,
1082+
eval/index.html#trig12-rt-06,
1083+
eval/index.html#trig12-rt-07,
1084+
eval/index.html#trig12-rt-08">
1085+
Beginning the <a href="#grammar-production-reifiedTriple"><code>reifiedTriple</code></a> production
10331086
records the |curTripleTerm|.
10341087
A new <a href="#grammar-production-tripleTerm"><code>tripleTerm</code></a> instance |curTripleTerm|
10351088
is created using the
@@ -1048,7 +1101,27 @@ <h4>Reified Triples</h4>
10481101
<section id="annotation">
10491102
<h4>Annotations</h4>
10501103

1051-
<p>Beginning the <a href="#grammar-production-annotation"><code>annotation</code></a> production
1104+
<p id="annotations-test" data-tests="
1105+
syntax/index.html#turtle12-ann-1,
1106+
syntax/index.html#turtle12-ann-2,
1107+
syntax/index.html#turtle12-ann-3,
1108+
syntax/index.html#turtle12-ann-4,
1109+
syntax/index.html#turtle12-ann-5,
1110+
syntax/index.html#turtle12-ann-6,
1111+
syntax/index.html#turtle12-ann-7,
1112+
syntax/index.html#turtle12-ann-8,
1113+
eval/index.html#turtle12-annotation-01,
1114+
eval/index.html#turtle12-annotation-02,
1115+
eval/index.html#turtle12-annotation-03,
1116+
eval/index.html#turtle12-annotation-04,
1117+
eval/index.html#turtle12-annotation-05,
1118+
eval/index.html#turtle12-annotation-06,
1119+
eval/index.html#turtle12-annotation-08,
1120+
eval/index.html#turtle12-annotation-09,
1121+
eval/index.html#turtle12-annotation-10,
1122+
eval/index.html#turtle12-annotation-11,
1123+
eval/index.html#turtle12-annotation-12">
1124+
Beginning the <a href="#grammar-production-annotation"><code>annotation</code></a> production
10521125
records the |curSubject| and |curPredicate|.
10531126
A new <a href="#grammar-production-tripleTerm"><code>tripleTerm</code></a> instance |curTripleTerm|
10541127
is created using the |curSubject| |curPredicate| |curObject|,
@@ -1060,7 +1133,25 @@ <h4>Annotations</h4>
10601133
<section id="annotationBlock">
10611134
<h4>Annotation Blocks</h4>
10621135

1063-
<p>Beginning the <a href="#grammar-production-annotationBlock"><code>annotationBlock</code></a> production records the |curTripleTerm|.
1136+
<p id="annotationBlock-tests" data-tests="
1137+
syntax/index.html#turtle12-ann-1,
1138+
syntax/index.html#turtle12-ann-2,
1139+
syntax/index.html#turtle12-ann-3,
1140+
syntax/index.html#turtle12-ann-4,
1141+
syntax/index.html#turtle12-ann-7,
1142+
syntax/index.html#turtle12-ann-8,
1143+
eval/index.html#turtle12-annotation-01,
1144+
eval/index.html#turtle12-annotation-02,
1145+
eval/index.html#turtle12-annotation-03,
1146+
eval/index.html#turtle12-annotation-04,
1147+
eval/index.html#turtle12-annotation-05,
1148+
eval/index.html#turtle12-annotation-06,
1149+
eval/index.html#turtle12-annotation-08,
1150+
eval/index.html#turtle12-annotation-09,
1151+
eval/index.html#turtle12-annotation-10,
1152+
eval/index.html#turtle12-annotation-11,
1153+
eval/index.html#turtle12-annotation-12">
1154+
Beginning the <a href="#grammar-production-annotationBlock"><code>annotationBlock</code></a> production records the |curTripleTerm|.
10641155
If the |curReifier| is not set, then it is assigned a fresh RDF <a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a>
10651156
and the production yields the RDF triple |curReifier| <code>rdf:reifies</code> |curTripleTerm|.
10661157
The |curSubject| is taken from the |curReifier|
@@ -1075,7 +1166,15 @@ <h4>Annotation Blocks</h4>
10751166
<section id="propertyList">
10761167
<h4 style="padding-bottom:0; margin-bottom:0;">Property Lists</h4>
10771168

1078-
<p style="padding-top:0; margin-top:0;">
1169+
<p id="propertyList-tests" style="padding-top:0; margin-top:0;" data-tests="
1170+
../../rdf11/rdf-trig/index.html#sole_blankNodePropertyList,
1171+
../../rdf11/rdf-trig/index.html#blankNodePropertyList_as_subject,
1172+
../../rdf11/rdf-trig/index.html#blankNodePropertyList_as_object,
1173+
../../rdf11/rdf-trig/index.html#blankNodePropertyList_as_object_containing_objectList,
1174+
../../rdf11/rdf-trig/index.html#blankNodePropertyList_as_object_containing_objectList_of_two_objects,
1175+
../../rdf11/rdf-trig/index.html#blankNodePropertyList_with_multiple_triples,
1176+
../../rdf11/rdf-trig/index.html#nested_blankNodePropertyLists,
1177+
../../rdf11/rdf-trig/index.html#predicateObjectList_with_blankNodePropertyList_as_object">
10791178
Beginning the <a href="#grammar-production-blankNodePropertyList"><code>blankNodePropertyList</code></a> production records the |curSubject| and |curPredicate|, and sets |curSubject| to a novel <a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a> <var>B</var>.
10801179
Finishing the <a href="#grammar-production-blankNodePropertyList"><code>blankNodePropertyList</code></a> production restores |curSubject| and |curPredicate|.
10811180
The node produced by matching <a href="#grammar-production-blankNodePropertyList"><code>blankNodePropertyList</code></a> is the blank node <var>B</var>.
@@ -1084,9 +1183,14 @@ <h4 style="padding-bottom:0; margin-bottom:0;">Property Lists</h4>
10841183

10851184
<section id="collection">
10861185
<h4 style="padding-bottom:0; margin-bottom:0;"><span>Collections</span></h4>
1087-
<p style="padding-top:0; margin-top:0;">
1186+
<p id="collection-tests" style="padding-top:0; margin-top:0;" data-tests="
1187+
../../rdf11/rdf-trig/index.html#collection_subject,
1188+
../../rdf11/rdf-trig/index.html#collection_object,
1189+
../../rdf11/rdf-trig/index.html#empty_collection,
1190+
../../rdf11/rdf-trig/index.html#nested_collection,
1191+
../../rdf11/rdf-trig/index.html#blankNodePropertyList_containing_collection">
10881192
Beginning the <a href="#grammar-production-collection"><code>collection</code></a> production records the |curSubject| and |curPredicate|.
1089-
Each <a href="#grammar-production-object"><code>object</code></a> in the <a href="#grammar-production-collection"><code>collection</code></a> production has a |curSubject| set to a novel <a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a> <var>B</var> and a |curPredicate| set to <code>rdf:first</code>.
1193+
Each <a href="#grammar-production-object"><code>object</code></a> in the <a href="#grammar-production-collection"><code>collection</code></a> production has a |curSubject| set to a novel <a data-cite="RDF12-CONCEPTS#dfn-blank-node">blank node</a> <var>B</var> and a |curPredicate| set to <code>rdf:first</code>.
10901194
For each object <var>object<sub>n</sub></var> after the first produces a triple:<span class="ntriple"><var>object<sub>n-1</sub></var> <code>rdf:rest</code> <var>object<sub>n</sub></var> .</span>
10911195
Finishing the <a href="#grammar-production-collection"><code>collection</code></a> production creates an additional triple <span class="ntriple"><code>curSubject rdf:rest rdf:nil</code> .</span> and restores |curSubject| and |curPredicate|
10921196
The node produced by matching <a href="#grammar-production-collection"><code>collection</code></a> is the first blank node <var>B</var> for non-empty lists and <code>rdf:nil</code> for empty lists.

0 commit comments

Comments
 (0)