Skip to content

Commit b3fd3a7

Browse files
Merge branch 'gh-pages' into issue-212-ShapeClass
2 parents 544e336 + 3480e93 commit b3fd3a7

File tree

6 files changed

+202
-7
lines changed

6 files changed

+202
-7
lines changed

shacl-af/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
name: "Simon Steyskal",
5959
url: "http://steyskal.at/",
6060
company: "Siemens AG",
61-
companyURL: "https://siemens.com"
61+
companyURL: "https://siemens.com",
6262
w3cid: 73545
6363
}
6464
]

shacl12-core/index.html

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
{
8686
name: "Holger Knublauch",
8787
company: "TopQuadrant, Inc.",
88-
companyURL: "http://topquadrant.com/",
88+
companyURL: "https://topquadrant.com/",
8989
mailto: "[email protected]",
9090
w3cid: 46500
9191
},
@@ -118,7 +118,7 @@
118118
w3cid: 58399
119119
}
120120
],
121-
testSuiteURI: "http://w3c.github.io/data-shapes/data-shapes-test-suite/",
121+
testSuiteURI: "https://w3c.github.io/data-shapes/data-shapes-test-suite/",
122122

123123
lint: {
124124
"no-unused-dfns": false, // This should be removed near the end of the process
@@ -500,7 +500,7 @@ <h3>Terminology</h3>
500500
<div class="def">
501501
<div class="term-def-header">Binding, Solution</div>
502502
<div>
503-
A <dfn data-lt="bindings">binding</dfn> is a pair (<a data-cite="sparql12-query/#defn_QueryVariable">variable</a>, <a>RDF term</a>), consistent with the term's use in [[!sparql12-query]]</a>.
503+
A <dfn data-lt="bindings">binding</dfn> is a pair (<a data-cite="sparql12-query/#defn_QueryVariable">variable</a>, <a>RDF term</a>), consistent with the term's use in [[!sparql12-query]].
504504
A <dfn data-lt="solutions">solution</dfn> is a set of bindings, informally often understood as one row in the body of the result table of a SPARQL query.
505505
Variables are not required to be bound in a solution.
506506
</div>
@@ -1312,6 +1312,7 @@ <h4>Subjects-of targets (sh:targetSubjectsOf)</h4>
13121312
ex:Bob ex:livesIn ex:NewYork .
13131313
</div>
13141314
</div>
1315+
</aside>
13151316
<p>
13161317
In the example above, only <code>ex:Alice</code> is validated against the given shape,
13171318
because it is the <a>subject</a> of a <a>triple</a> that has <code>ex:knows</code> as its <a>predicate</a>.
@@ -1764,7 +1765,7 @@ <h5>sh:name and sh:description</h5>
17641765
<h5>sh:order</h5>
17651766
<p>
17661767
Property shapes may have one <a>value</a> for the property <code>sh:order</code> to indicate the relative order of the property shape for purposes such as form building.
1767-
The values of <code>sh:order</code> are decimals.
1768+
The values of <code>sh:order</code> are literals with datatype <code>xsd:decimal</code> or <code>xsd:integer</code>.
17681769
<code>sh:order</code> is not used for validation purposes and may be used with any type of subjects.
17691770
If present at property shapes, the recommended use of <code>sh:order</code> is to sort the property shapes in an ascending order, for example so that
17701771
properties with smaller order are placed above (or to the left) of properties with larger order.
@@ -2637,6 +2638,7 @@ <h4>sh:maxCount</h4>
26372638
ex:Bob ex:birthDate "May 5th 1990" .
26382639
</div>
26392640
</div>
2641+
</aside>
26402642
</section>
26412643
</section>
26422644

@@ -3022,6 +3024,71 @@ <h4>sh:pattern</h4>
30223024
</aside>
30233025
</section>
30243026

3027+
<section id="SingleLineConstraintComponent">
3028+
<h4>sh:singleLine</h4>
3029+
<p class="issue">
3030+
This feature is "at risk" pending a WG resolution on this (and similar) convenience features.
3031+
The WG is not sure yet where to draw the lines between features that should go into Core versus some other document.
3032+
Originally discussed as <a href="https://github.com/w3c/data-shapes/issues/177">Issue 177</a>.
3033+
</p>
3034+
<p>
3035+
When set to <code>true</code>, <code>sh:singleLine</code> specifies that the <a>value nodes</a> must not contain line breaks.
3036+
In addition to constraint validation, this information can be exploited by user interface builders to select between (single-lined) text fields and (multi-lined) text areas.
3037+
</p>
3038+
<p>
3039+
<span class="component-class">Constraint Component IRI</span>: <code>sh:SingleLineConstraintComponent</code>
3040+
</p>
3041+
3042+
<div class="parameters">Parameters:</div>
3043+
<table class="term-table">
3044+
<tr>
3045+
<th>Property</th>
3046+
<th>Summary and Syntax Rules</th>
3047+
</tr>
3048+
<tr>
3049+
<td><code>sh:singleLine</code></td>
3050+
<td>
3051+
<code>true</code> to activate this constraint.
3052+
<span data-syntax-rule="singleLine-datatype">The values of <code>sh:singleLine</code> in a shape are literals with datatype <code>xsd:boolean</code>.</span>
3053+
<span data-syntax-rule="singleLine-maxCount">A shape has at most one value for <code>sh:singleLine</code>.</span>
3054+
</td>
3055+
</tr>
3056+
</table>
3057+
<div class="def def-text">
3058+
<div class="def-header">TEXTUAL DEFINITION</div>
3059+
<div class="def-text-body" data-validator="SingleLine">
3060+
If <code>$singleLine</code> is <code>true</code>, then, for each <a>value node</a> that is a literal where the lexical form matches the
3061+
regular expression (as defined by the <a data-cite="sparql12-query/#func-regex">SPARQL REGEX function</a>) <code>[\f\r\n\v]</code>, there is a validation result.
3062+
</div>
3063+
</div>
3064+
<p><em>The remainder of this section is informative.</em></p>
3065+
<aside class="example">
3066+
<p>
3067+
In this example, the valid target nodes of the shape can only contain single-lined values for <code>rdfs:label</code>.
3068+
The values of <code>rdfs:comment</code> are explicitly allowed to contain line breaks, indicating to form builders that
3069+
those values should be edited in a multi-line (text area) input widget.
3070+
</p>
3071+
<div class="shapes-graph">
3072+
<div class="turtle">
3073+
ex:SingleLineExampleShape
3074+
a sh:NodeShape ;
3075+
sh:property [
3076+
a sh:PropertyShape ;
3077+
sh:path rdfs:label ;
3078+
sh:datatype xsd:string ;
3079+
sh:singleLine true ;
3080+
] ;
3081+
sh:property [
3082+
a sh:PropertyShape ;
3083+
sh:path rdfs:comment ;
3084+
sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;
3085+
sh:singleLine false ;
3086+
] .
3087+
</div>
3088+
</div>
3089+
</aside>
3090+
</section>
3091+
30253092
<section id="LanguageInConstraintComponent">
30263093
<h4>sh:languageIn</h4>
30273094
<p>
@@ -4753,10 +4820,10 @@ <h2>Revision History</h2>
47534820
<section class="appendix informative" id="changes-12">
47544821
<h2>Changes between SHACL 1.0 Core and SHACL 1.2 Core</h2>
47554822
<ul>
4823+
<li>Added the new constraint component <a href="#SingleLineConstraintComponent"><code>sh:singleLine</code></a>, see <a href="https://github.com/w3c/data-shapes/issues/177">Issue 177</a></li>
47564824
<li>Added the new class <a href="#ShapeClass"><code>sh:ShapeClass</code></a> for implicit class targets, see <a href="https://github.com/w3c/data-shapes/issues/212">Issue 212</a></li>
47574825
</ul>
47584826
</section>
4759-
47604827
</body>
47614828

47624829
<script type="text/javascript">

shacl12-sparql/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ <h4>Prefix Declarations for SPARQL Queries</h4>
737737
<span data-syntax-rule="prefixes-duplicates">A SHACL processor collects a set of prefix mappings as the union of all
738738
individual prefix mappings that are <a>values</a> of the <a>SPARQL property path</a> <code>sh:prefixes/owl:imports*/sh:declare</code>
739739
of the <a>SPARQL-based constraint</a> or <a>validator</a>.
740-
If such a collection of prefix declarations contains multiple namespaces for the same <a>value</a> of <code>sh:prefix</code>,
740+
If such a collection of prefix declarations contains multiple different namespaces for the same <a>value</a> of <code>sh:prefix</code>,
741741
then the <a>shapes graph</a> is <a>ill-formed</a>.</span>
742742
(Note that SHACL processors MAY ignore prefix declarations that are never reached).
743743
</p>

shacl12-test-suite/tests/core/property/manifest.ttl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
mf:include <qualifiedMinCountDisjoint-001.ttl> ;
4242
mf:include <qualifiedValueShape-001.ttl> ;
4343
mf:include <qualifiedValueShapesDisjoint-001.ttl> ;
44+
mf:include <singleLine-001.ttl> ;
4445
mf:include <uniqueLang-001.ttl> ;
4546
mf:include <uniqueLang-002.ttl> ;
4647
.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
@prefix dash: <http://datashapes.org/dash#> .
2+
@prefix ex: <http://datashapes.org/sh/tests/core/property/singleLine-001.test#> .
3+
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
4+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
5+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
6+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
7+
@prefix sh: <http://www.w3.org/ns/shacl#> .
8+
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
9+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
10+
11+
ex:InvalidInstanceF
12+
rdf:type ex:SingleLineExampleShape ;
13+
rdfs:label "Invalid\finstanceF" ;
14+
.
15+
ex:InvalidInstanceN
16+
rdf:type ex:SingleLineExampleShape ;
17+
rdfs:label "Invalid\ninstanceN" ;
18+
.
19+
ex:InvalidInstanceR
20+
rdf:type ex:SingleLineExampleShape ;
21+
rdfs:label "Invalid\rinstanceR" ;
22+
.
23+
ex:InvalidInstanceV
24+
rdf:type ex:SingleLineExampleShape ;
25+
rdfs:label "Invalid\u000BinstanceV" ;
26+
.
27+
ex:SingleLineExampleShape
28+
a sh:NodeShape, rdfs:Class ;
29+
sh:property ex:SingleLineExampleShape-label ;
30+
sh:property ex:SingleLineExampleShape-comment ;
31+
.
32+
ex:SingleLineExampleShape-label
33+
a sh:PropertyShape ;
34+
sh:path rdfs:label ;
35+
sh:datatype xsd:string ;
36+
sh:singleLine true ;
37+
.
38+
ex:SingleLineExampleShape-comment
39+
a sh:PropertyShape ;
40+
sh:path rdfs:comment ;
41+
sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;
42+
sh:singleLine false ;
43+
.
44+
ex:ValidInstance1
45+
rdf:type ex:SingleLineExampleShape ;
46+
rdfs:label "Valid instance1" ;
47+
rdfs:comment """This is a multi-
48+
line comment.
49+
"""
50+
.
51+
<>
52+
rdf:type mf:Manifest ;
53+
mf:entries (
54+
<singleLine-001>
55+
) ;
56+
.
57+
<singleLine-001>
58+
rdf:type sht:Validate ;
59+
rdfs:label "Test of sh:singleLine at property shape 001" ;
60+
mf:action [
61+
sht:dataGraph <> ;
62+
sht:shapesGraph <> ;
63+
] ;
64+
mf:result [
65+
rdf:type sh:ValidationReport ;
66+
sh:conforms "false"^^xsd:boolean ;
67+
sh:result [
68+
rdf:type sh:ValidationResult ;
69+
sh:focusNode ex:InvalidInstanceF ;
70+
sh:resultPath rdfs:label ;
71+
sh:resultSeverity sh:Violation ;
72+
sh:sourceConstraintComponent sh:SingleLineConstraintComponent ;
73+
sh:sourceShape ex:SingleLineExampleShape-label ;
74+
sh:value "Invalid\finstanceF" ;
75+
] ;
76+
sh:result [
77+
rdf:type sh:ValidationResult ;
78+
sh:focusNode ex:InvalidInstanceN ;
79+
sh:resultPath rdfs:label ;
80+
sh:resultSeverity sh:Violation ;
81+
sh:sourceConstraintComponent sh:SingleLineConstraintComponent ;
82+
sh:sourceShape ex:SingleLineExampleShape-label ;
83+
sh:value "Invalid\ninstanceN" ;
84+
] ;
85+
sh:result [
86+
rdf:type sh:ValidationResult ;
87+
sh:focusNode ex:InvalidInstanceR ;
88+
sh:resultPath rdfs:label ;
89+
sh:resultSeverity sh:Violation ;
90+
sh:sourceConstraintComponent sh:SingleLineConstraintComponent ;
91+
sh:sourceShape ex:SingleLineExampleShape-label ;
92+
sh:value "Invalid\rinstanceR" ;
93+
] ;
94+
sh:result [
95+
rdf:type sh:ValidationResult ;
96+
sh:focusNode ex:InvalidInstanceV ;
97+
sh:resultPath rdfs:label ;
98+
sh:resultSeverity sh:Violation ;
99+
sh:sourceConstraintComponent sh:SingleLineConstraintComponent ;
100+
sh:sourceShape ex:SingleLineExampleShape-label ;
101+
sh:value "Invalid\u000BinstanceV" ;
102+
] ;
103+
] ;
104+
mf:status sht:approved ;
105+
.

shacl12-vocabularies/shacl.ttl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,28 @@ sh:qualifiedValueShapesDisjoint
11161116
rdfs:isDefinedBy sh: .
11171117

11181118

1119+
sh:SingleLineConstraintComponent
1120+
a sh:ConstraintComponent ;
1121+
rdfs:label "Single line constraint component"@en ;
1122+
rdfs:comment "A constraint component that can be used to specify that none of the value nodes may contain line breaks."@en ;
1123+
sh:parameter sh:SingleLineConstraintComponent-singleLine ;
1124+
rdfs:isDefinedBy sh: .
1125+
1126+
sh:SingleLineConstraintComponent-singleLine
1127+
a sh:Parameter ;
1128+
sh:path sh:singleLine ;
1129+
sh:datatype xsd:boolean ;
1130+
sh:maxCount 1 ;
1131+
rdfs:isDefinedBy sh: .
1132+
1133+
sh:singleLine
1134+
a rdf:Property ;
1135+
rdfs:label "single line"@en ;
1136+
rdfs:comment "Specifies whether none of the value nodes may contain a line break."@en ;
1137+
rdfs:range xsd:boolean ;
1138+
rdfs:isDefinedBy sh: .
1139+
1140+
11191141
sh:UniqueLangConstraintComponent
11201142
a sh:ConstraintComponent ;
11211143
rdfs:label "Unique-languages constraint component"@en ;

0 commit comments

Comments
 (0)