Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion shacl12-core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ <h3>Terminology</h3>
<dfn data-cite="rdf12-concepts#dfn-iri" data-lt="IRI|IRIs">IRI</dfn>,
<dfn data-cite="rdf12-concepts#dfn-rdf-literal" data-lt="literal|literals">literal</dfn>,
<dfn data-cite="rdf12-concepts#dfn-datatype" data-lt="datatype">datatype</dfn>,
<dfn data-cite="rdf12-concepts#dfn-base-direction" data-lt="base direction">base direction</dfn>,
<dfn data-cite="rdf12-concepts#dfn-blank-node" data-lt="blank node|blank nodes">blank node</dfn>,
<dfn data-cite="rdf12-concepts#dfn-triple-term" data-lt="triple term|triple terms">triple term</dfn>,
<dfn data-cite="rdf12-concepts#dfn-reifier" data-lt="reifier">reifier</dfn>,
Expand Down Expand Up @@ -3552,7 +3553,7 @@ <h4>sh:languageIn</h4>
<section id="UniqueLangConstraintComponent">
<h4>sh:uniqueLang</h4>
<p>
The property <code>sh:uniqueLang</code> can be set to <code>true</code> to specify that no pair of <a>value nodes</a> may use the same language tag.
The property <code>sh:uniqueLang</code> can be set to <code>true</code> to specify that no pair of <a>value nodes</a> may use the same language tag and text direction.
</p>
<p>
<span class="component-class">Constraint Component IRI</span>: <code>sh:UniqueLangConstraintComponent</code>
Expand Down Expand Up @@ -3585,6 +3586,8 @@ <h4>sh:uniqueLang</h4>
If <code>$uniqueLang</code> is <code>true</code>
then for each non-empty language tag that is used by at least two <a>value nodes</a>,
there is a <a>validation result</a>.
For <a>value nodes</a> of <a>datatype</a> <code>rdf:dirLangString</code>, the <a>base direction</a>
is considered part of the language tag, e.g. <code>"1"@ar--ltr</code> counts as distinct from <code>"1"@ar--rtl</code>.
</div>
</div>
<p><em>The remainder of this section is informative.</em></p>
Expand Down Expand Up @@ -5780,6 +5783,7 @@ <h2>Changes between the original SHACL Core and SHACL 1.2 Core</h2>
<li>Added annotation property <a href="#codeIdentifier"></a>; see <a href="https://github.com/w3c/data-shapes/issues/559">Issue 559</a></li>
<li>Added the target types <a href="#targetWhere"></a> and <a href="#explicit-shape-target"></a>, see <a href="https://github.com/w3c/data-shapes/issues/517">Issue 517</a></li>
<li>Added support for units and currencies <a href="#unit"></a>, see <a href="https://github.com/w3c/data-shapes/issues/709">Issue 709</a></li>
<li>Added support rdf:dirLangString to <a href="#UniqueLangConstraintComponent"></a>, see <a href="https://github.com/w3c/data-shapes/issues/737">Issue 737</a></li>
</ul>
</section>
</body>
Expand Down
1 change: 1 addition & 0 deletions shacl12-test-suite/tests/core/property/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@
mf:include <someValue-001.ttl> ;
mf:include <uniqueLang-001.ttl> ;
mf:include <uniqueLang-002.ttl> ;
mf:include <uniqueLang-003.ttl> ;
mf:include <uniqueMembers-001.ttl> ;
.
60 changes: 60 additions & 0 deletions shacl12-test-suite/tests/core/property/uniqueLang-003.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@prefix dash: <http://datashapes.org/dash#> .
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:InvalidInstance
rdf:type ex:TestShape ;
ex:testProperty "A" ;
ex:testProperty "A"@ar--ltr ;
ex:testProperty "B"@ar--ltr ;
.
ex:ValidInstance
rdf:type ex:TestShape ;
ex:testProperty "A" ;
ex:testProperty "A"@ar--ltr ;
ex:testProperty "A"@ar--rtl ;
.
ex:TestShape
rdf:type rdfs:Class ;
rdf:type sh:NodeShape ;
rdfs:label "Test shape" ;
sh:property ex:TestShape-testProperty ;
.
ex:TestShape-testProperty
sh:path ex:testProperty ;
rdfs:label "test property" ;
sh:uniqueLang "true"^^xsd:boolean ;
.
<>
rdf:type mf:Manifest ;
mf:entries (
<uniqueLang-003>
) ;
.
<uniqueLang-003>
rdf:type sht:Validate ;
rdfs:label "Test of sh:uniqueLang with rdf:dirLangString values" ;
mf:action [
sht:dataGraph <> ;
sht:shapesGraph <> ;
] ;
mf:result [
rdf:type sh:ValidationReport ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
rdf:type sh:ValidationResult ;
sh:focusNode ex:InvalidInstance ;
sh:resultPath ex:testProperty ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:UniqueLangConstraintComponent ;
sh:sourceShape ex:TestShape-testProperty ;
] ;
] ;
mf:status sht:approved ;
.