Skip to content

Commit 66108d8

Browse files
committed
chore: use javascript loop to inject unstable SHACL-C warning
1 parent b077d41 commit 66108d8

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

shacl12-core/index.html

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
tabs.prepend(selectors);
8484
}
8585

86+
for (const block of document.querySelectorAll('.shaclc')) {
87+
block.innerHTML = `<i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i>${block.innerHTML}`;
88+
}
89+
8690
// Add example button selection logic
8791
for (const button of document.querySelectorAll(".ds-selector-tabs .selectors button")) {
8892
button.onclick = () => {
@@ -909,7 +913,7 @@ <h3>SHACL Example</h3>
909913
}
910914
}</pre>
911915
</div>
912-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:PersonShape -&gt; ex:Person {
916+
<div class="shaclc"><pre class="shaclc">shape ex:PersonShape -&gt; ex:Person {
913917
closed=true ignoredProperties=[rdf:type] .
914918
ex:ssn xsd:string [0..1] pattern="^\\d{3}-\\d{2}-\\d{4}$" .
915919
ex:worksFor IRI ex:Company .
@@ -1334,7 +1338,7 @@ <h3>Constraints, Parameters and Constraint Components</h3>
13341338
]
13351339
}</pre>
13361340
</div>
1337-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:MultiplePatternsShape {
1341+
<div class="shaclc"><pre class="shaclc">shape ex:MultiplePatternsShape {
13381342
ex:name pattern="^Start" flags="i" .
13391343
ex:name pattern="End$" .
13401344
}</pre></div></div>
@@ -1431,7 +1435,7 @@ <h4>Node targets (sh:targetNode)</h4>
14311435
}
14321436
}</pre>
14331437
</div>
1434-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:PersonShape {
1438+
<div class="shaclc"><pre class="shaclc">shape ex:PersonShape {
14351439
targetNode=ex:Alice .
14361440
}</pre></div></div>
14371441
<div class="data-graph">
@@ -1486,7 +1490,7 @@ <h4>Class-based Targets (sh:targetClass)</h4>
14861490
}
14871491
}</pre>
14881492
</div>
1489-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:PersonShape -&gt; ex:Person {
1493+
<div class="shaclc"><pre class="shaclc">shape ex:PersonShape -&gt; ex:Person {
14901494
}</pre></div></div>
14911495

14921496
<div class="data-graph">
@@ -1610,7 +1614,7 @@ <h4>Implicit Class Targets and sh:ShapeClass</h4>
16101614
]
16111615
}</pre>
16121616
</div>
1613-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shapeClass ex:Person {
1617+
<div class="shaclc"><pre class="shaclc">shapeClass ex:Person {
16141618
}</pre></div></div>
16151619
<div class="data-graph">
16161620
<div class="turtle">
@@ -1683,7 +1687,7 @@ <h4>Subjects-of targets (sh:targetSubjectsOf)</h4>
16831687
}
16841688
}</pre>
16851689
</div>
1686-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:TargetSubjectsOfExampleShape {
1690+
<div class="shaclc"><pre class="shaclc">shape ex:TargetSubjectsOfExampleShape {
16871691
targetSubjectsOf=ex:knows .
16881692
}</pre></div></div>
16891693
<div class="data-graph">
@@ -1747,7 +1751,7 @@ <h4>Objects-of targets (sh:targetObjectsOf)</h4>
17471751
}
17481752
}</pre>
17491753
</div>
1750-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:TargetObjectsOfExampleShape {
1754+
<div class="shaclc"><pre class="shaclc">shape ex:TargetObjectsOfExampleShape {
17511755
targetObjectsOf=ex:knows .
17521756
}</pre></div></div>
17531757
<div class="data-graph">
@@ -1912,7 +1916,7 @@ <h4>Declaring the Severity of a Shape or Constraint</h4>
19121916
}
19131917
}</pre>
19141918
</div>
1915-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:MyShape {
1919+
<div class="shaclc"><pre class="shaclc">shape ex:MyShape {
19161920
targetNode=ex:MyInstance .
19171921
ex:myProperty xsd:string [1..*] severity=Warning .
19181922
ex:myProperty maxLength=10 message="Too many characters"@en message="Zu viele Zeichen"@de .
@@ -3304,7 +3308,7 @@ <h4>sh:class</h4>
33043308
]
33053309
}</pre>
33063310
</div>
3307-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:ClassExampleShape {
3311+
<div class="shaclc"><pre class="shaclc">shape ex:ClassExampleShape {
33083312
targetNode=ex:Bob targetNode=ex:Alice targetNode=ex:Carol .
33093313
ex:address ex:PostalAddress .
33103314
}</pre></div></div>
@@ -3459,7 +3463,7 @@ <h4>sh:datatype</h4>
34593463
]
34603464
}</pre>
34613465
</div>
3462-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:DatatypeExampleShape {
3466+
<div class="shaclc"><pre class="shaclc">shape ex:DatatypeExampleShape {
34633467
targetNode=ex:Alice targetNode=ex:Bob targetNode=ex:Carol .
34643468
ex:age xsd:integer .
34653469
}</pre></div></div>
@@ -3589,7 +3593,7 @@ <h4>sh:nodeKind</h4>
35893593
}
35903594
}</pre>
35913595
</div>
3592-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:NodeKindExampleShape {
3596+
<div class="shaclc"><pre class="shaclc">shape ex:NodeKindExampleShape {
35933597
targetObjectsOf=ex:knows nodeKind=IRI .
35943598
}</pre></div></div>
35953599
<div class="data-graph">
@@ -3782,7 +3786,7 @@ <h4>sh:maxCount</h4>
37823786
}
37833787
}</pre>
37843788
</div>
3785-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:MaxCountExampleShape {
3789+
<div class="shaclc"><pre class="shaclc">shape ex:MaxCountExampleShape {
37863790
targetNode=ex:Bob .
37873791
ex:birthDate [0..1] .
37883792
}</pre></div></div>
@@ -3850,7 +3854,7 @@ <h3>Value Range Constraint Components</h3>
38503854
]
38513855
}</pre>
38523856
</div>
3853-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:NumericRangeExampleShape {
3857+
<div class="shaclc"><pre class="shaclc">shape ex:NumericRangeExampleShape {
38543858
targetNode=ex:Bob targetNode=ex:Alice targetNode=ex:Ted .
38553859
ex:age minInclusive=0 maxInclusive=150 .
38563860
}</pre></div></div>
@@ -4155,7 +4159,7 @@ <h4>sh:maxLength</h4>
41554159
]
41564160
}</pre>
41574161
</div>
4158-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:PasswordExampleShape {
4162+
<div class="shaclc"><pre class="shaclc">shape ex:PasswordExampleShape {
41594163
targetNode=ex:Bob targetNode=ex:Alice .
41604164
ex:password minLength=8 maxLength=10 .
41614165
}</pre></div></div>
@@ -4265,7 +4269,7 @@ <h4>sh:pattern</h4>
42654269
]
42664270
}</pre>
42674271
</div>
4268-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:PatternExampleShape {
4272+
<div class="shaclc"><pre class="shaclc">shape ex:PatternExampleShape {
42694273
targetNode=ex:Bob targetNode=ex:Alice targetNode=ex:Carol .
42704274
ex:bCode pattern="^B" flags="i" .
42714275
}</pre></div></div>
@@ -4489,7 +4493,7 @@ <h4>sh:languageIn</h4>
44894493
]
44904494
}</pre>
44914495
</div>
4492-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:NewZealandLanguagesShape {
4496+
<div class="shaclc"><pre class="shaclc">shape ex:NewZealandLanguagesShape {
44934497
targetNode=ex:Mountain targetNode=ex:Berg .
44944498
ex:prefLabel languageIn=["en" "mi"] .
44954499
}</pre></div></div>
@@ -4620,7 +4624,7 @@ <h4>sh:uniqueLang</h4>
46204624
]
46214625
}</pre>
46224626
</div>
4623-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:UniqueLangExampleShape {
4627+
<div class="shaclc"><pre class="shaclc">shape ex:UniqueLangExampleShape {
46244628
targetNode=ex:Alice targetNode=ex:Bob .
46254629
ex:label uniqueLang=true .
46264630
}</pre></div></div>
@@ -5214,7 +5218,7 @@ <h4>sh:equals</h4>
52145218
}
52155219
}</pre>
52165220
</div>
5217-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:EqualExampleShape {
5221+
<div class="shaclc"><pre class="shaclc">shape ex:EqualExampleShape {
52185222
targetNode=ex:Bob .
52195223
ex:firstName equals=ex:givenName .
52205224
}</pre></div></div>
@@ -5310,7 +5314,7 @@ <h4>sh:disjoint</h4>
53105314
]
53115315
}</pre>
53125316
</div>
5313-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:DisjointExampleShape {
5317+
<div class="shaclc"><pre class="shaclc">shape ex:DisjointExampleShape {
53145318
targetNode=ex:USA targetNode=ex:Germany .
53155319
ex:prefLabel disjoint=ex:altLabel .
53165320
}</pre></div></div>
@@ -5409,7 +5413,7 @@ <h4>sh:lessThan</h4>
54095413
}
54105414
}</pre>
54115415
</div>
5412-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:LessThanExampleShape {
5416+
<div class="shaclc"><pre class="shaclc">shape ex:LessThanExampleShape {
54135417
ex:startDate lessThan=ex:endDate .
54145418
}</pre></div></div>
54155419
</aside>
@@ -5860,7 +5864,7 @@ <h4>sh:or</h4>
58605864
}
58615865
}</pre>
58625866
</div>
5863-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:PersonAddressShape -&gt; ex:Person {
5867+
<div class="shaclc"><pre class="shaclc">shape ex:PersonAddressShape -&gt; ex:Person {
58645868
ex:address xsd:string|ex:Address .
58655869
}</pre></div></div>
58665870
<div class="data-graph">
@@ -6194,7 +6198,7 @@ <h4>sh:node</h4>
61946198
]
61956199
}</pre>
61966200
</div>
6197-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:AddressShape {
6201+
<div class="shaclc"><pre class="shaclc">shape ex:AddressShape {
61986202
ex:postalCode xsd:string [0..1] .
61996203
}
62006204
shape ex:PersonShape -&gt; ex:Person {
@@ -7194,7 +7198,7 @@ <h3>sh:closed, sh:ignoredProperties</h3>
71947198
]
71957199
}</pre>
71967200
</div>
7197-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:ClosedShapeExampleShape {
7201+
<div class="shaclc"><pre class="shaclc">shape ex:ClosedShapeExampleShape {
71987202
targetNode=ex:Alice targetNode=ex:Bob closed=true ignoredProperties=[rdf:type] .
71997203
ex:firstName .
72007204
ex:lastName .
@@ -7297,7 +7301,7 @@ <h4>sh:hasValue</h4>
72977301
}
72987302
}</pre>
72997303
</div>
7300-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:StanfordGraduate {
7304+
<div class="shaclc"><pre class="shaclc">shape ex:StanfordGraduate {
73017305
targetNode=ex:Alice .
73027306
ex:alumniOf hasValue=ex:Stanford .
73037307
}</pre></div></div>
@@ -7398,7 +7402,7 @@ <h4>sh:in</h4>
73987402
}
73997403
}</pre>
74007404
</div>
7401-
<div class="shaclc"><i>SHACL-C specification is unstable - SHACL-C document fragments in this document are informative</i><pre class="shaclc">shape ex:InExampleShape {
7405+
<div class="shaclc"><pre class="shaclc">shape ex:InExampleShape {
74027406
targetNode=ex:RainbowPony .
74037407
ex:color in=[ex:Pink ex:Purple] .
74047408
}</pre></div></div>

0 commit comments

Comments
 (0)