Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
18 changes: 9 additions & 9 deletions shacl12-sparql/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ <h3>Select Expressions</h3>
sh:name "full name" ;
sh:path ex:fullName ;
sh:values <b>[
sh:prefixes &lt;http://example.org/ns&gt; ;
sh:prefixes &lt;http://example.com/ns&gt; ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Why change .org to .com?)

Even better change - use http://example/.

It is specifically for this purpose.

RFC 2606 section 2

 ".example" is recommended for use in documentation or as examples.

It is registered and fixed. It does not have a website at that address by design.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The choice between .org and .com was made before, not by me. I am merely aligning these test cases with all others.

sh:select """
SELECT ?fullName
WHERE {
Expand All @@ -1725,11 +1725,11 @@ <h3>Select Expressions</h3>
]</b> ;
sh:datatype xsd:string .

&lt;http://example.org/ns&gt;
&lt;http://example.com/ns&gt;
a owl:Ontology ;
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://example.org/ns#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .
</div>
<div class="jsonld">
Expand All @@ -1747,18 +1747,18 @@ <h3>Select Expressions</h3>
},
"sh:values": {
"sh:prefixes": {
"@id": "http://example.org/ns"
"@id": "http://example.com/ns"
},
"sh:select": "\n\t\t\tSELECT ?fullName\n\t\t\tWHERE {\n\t\t\t\t$this ex:firstName ?firstName .\n\t\t\t\t$this ex:lastName ?lastName .\n\t\t\t\tBIND (CONCAT(?firstName, \" \", ?lastName) AS ?fullName) .\n\t\t\t}\n\t\t"
}
},
{
"@id": "http://example.org/ns",
"@id": "http://example.com/ns",
"@type": "owl:Ontology",
"sh:declare": {
"sh:namespace": {
"@type": "xsd:anyURI",
"@value": "http://example.org/ns#"
"@value": "http://example.com/ns#"
},
"sh:prefix": "ex"
}
Expand All @@ -1785,7 +1785,7 @@ <h3>Select Expressions</h3>
rdfs:comment "This shape applies to all persons under 18 years of age." ;
sh:targetNode <b>[
sh:select """
PREFIX ex: &lt;http://example.org/ns#&gt;
PREFIX ex: &lt;http://example.com/ns#&gt;
SELECT ?person
WHERE {
?person a/rdfs:subClassOf* ex:Person .
Expand All @@ -1802,7 +1802,7 @@ <h3>Select Expressions</h3>
"rdfs:comment": "This shape applies to all persons under 18 years of age.",
"rdfs:label": "Child shape",
"sh:targetNode": {
"sh:select": "\n\t\t\tPREFIX ex: &lt;http://example.org/ns#&gt;\n\t\t\tSELECT ?person\n\t\t\tWHERE {\n\t\t\t\t?person a/rdfs:subClassOf* ex:Person .\n\t\t\t\t?person ex:age ?age .\n\t\t\t\tFILTER (?age &lt; 18) .\n\t\t\t}\n\t\t"
"sh:select": "\n\t\t\tPREFIX ex: &lt;http://example.com/ns#&gt;\n\t\t\tSELECT ?person\n\t\t\tWHERE {\n\t\t\t\t?person a/rdfs:subClassOf* ex:Person .\n\t\t\t\t?person ex:age ?age .\n\t\t\t\tFILTER (?age &lt; 18) .\n\t\t\t}\n\t\t"
}
}</pre>
</div>
Expand Down Expand Up @@ -1920,7 +1920,7 @@ <h3>SPARQL Expr Expressions</h3>
</div>
</div>
<p>
When applied to a focus node with URI <code>http://example.org/ns#Test</code> the result will be <code>26</code>.
When applied to a focus node with URI <code>http://example.com/ns#Test</code> the result will be <code>26</code>.
This produces the same results as this variation:
</p>
<div class="shapes-graph">
Expand Down
2 changes: 1 addition & 1 deletion shacl12-test-suite/tests/sparql/node/prefixes-001.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<http://example.com/ns#>
sh:declare [
rdf:type sh:PrefixDeclaration ;
sh:namespace "http://datashapes.org/sh/tests/sparql/node/prefixes-001.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
sh:prefix "ex" ;
] ;
.
Expand Down
11 changes: 5 additions & 6 deletions shacl12-test-suite/tests/sparql/node/sparql-001.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ ex:TestShape
.
ex:TestShape-sparql
sh:message "Cannot have a label" ;
sh:prefixes <http://example.com/ns#> ;
sh:select """
SELECT $this ?path ?value
WHERE {
$this ?path ?value .
FILTER (?path = <http://www.w3.org/2000/01/rdf-schema#label>) .
sh:select """
SELECT $this ?path ?value
WHERE {
$this ?path ?value .
FILTER (?path = <http://www.w3.org/2000/01/rdf-schema#label>) .
}""" ;
.
ex:ValidResource1
Expand Down
2 changes: 1 addition & 1 deletion shacl12-test-suite/tests/sparql/node/sparql-002.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<http://example.com/ns#>
sh:declare [
rdf:type sh:PrefixDeclaration ;
sh:namespace "http://datashapes.org/sh/tests/sparql/node/sparql-002.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
sh:prefix "ex" ;
] ;
.
Expand Down
14 changes: 7 additions & 7 deletions shacl12-test-suite/tests/sparql/node/sparql-003.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<http://example.com/ns#>
sh:declare [
rdf:type sh:PrefixDeclaration ;
sh:namespace "http://datashapes.org/sh/tests/sparql/node/sparql-003.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
sh:prefix "ex" ;
] ;
.
Expand All @@ -24,12 +24,12 @@ ex:LanguageExampleShape
rdf:type sh:SPARQLConstraint ;
sh:message "Values are literals with German language tag." ;
sh:prefixes <http://example.com/ns#> ;
sh:select """
SELECT $this (ex:germanLabel AS ?path)
WHERE {
$this ex:germanLabel ?value .
FILTER (!isLiteral(?value) || !langMatches(lang(?value), \"de\"))
}
sh:select """
SELECT $this (ex:germanLabel AS ?path)
WHERE {
$this ex:germanLabel ?value .
FILTER (!isLiteral(?value) || !langMatches(lang(?value), \"de\"))
}
""" ;
sh:severity sh:Warning ;
sh:sparql ex:LanguageExampleShape ;
Expand Down
10 changes: 5 additions & 5 deletions shacl12-test-suite/tests/sparql/pre-binding/pre-binding-001.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-001.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:TestShape
Expand All @@ -23,10 +23,10 @@ ex:TestShape
ex:TestShape-sparql
sh:message "Test message" ;
sh:prefixes ex: ;
sh:select """
SELECT $this
WHERE {
FILTER ($this = ex:InvalidResource) .
sh:select """
SELECT $this
WHERE {
FILTER ($this = ex:InvalidResource) .
}""" ;
.
ex:ValidResource1
Expand Down
10 changes: 5 additions & 5 deletions shacl12-test-suite/tests/sparql/pre-binding/pre-binding-002.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-002.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:TestShape
Expand All @@ -22,16 +22,16 @@ ex:TestShape
.
ex:TestShape-sparql
sh:prefixes ex: ;
sh:select """
SELECT $this
sh:select """
SELECT $this
WHERE {
{
FILTER (false) .
}
UNION
{
{
FILTER ($this = ex:InvalidResource) .
}
}
}""" ;
.
ex:ValidResource1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-003.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:TestShape
Expand All @@ -22,16 +22,16 @@ ex:TestShape
.
ex:TestShape-sparql
sh:prefixes ex: ;
sh:select """
SELECT $this
sh:select """
SELECT $this
WHERE {
{
{
FILTER ($this = ex:InvalidResource) .
}
FILTER bound($this) .
}
FILTER (true) .
FILTER (true) .
}""" ;
.
ex:ValidResource1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-004.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:TestShape
Expand All @@ -22,8 +22,8 @@ ex:TestShape
.
ex:TestShape-sparql
sh:prefixes ex: ;
sh:select """
SELECT $this
sh:select """
SELECT $this
WHERE {
BIND ($this AS ?that) .
FILTER (?that = ex:InvalidResource) .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-005.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:InvalidResource
Expand All @@ -25,8 +25,8 @@ ex:TestShape
.
ex:TestShape-sparql
sh:prefixes ex: ;
sh:select """
SELECT $this
sh:select """
SELECT $this
WHERE {
{
FILTER (bound($this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-006.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:TestShape
Expand All @@ -22,8 +22,8 @@ ex:TestShape
.
ex:TestShape-sparql
sh:prefixes ex: ;
sh:select """
SELECT $this
sh:select """
SELECT $this
WHERE {
{
SELECT *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ex:
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://datashapes.org/sh/tests/sparql/pre-binding/pre-binding-007.test#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:TestShape
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ex:Person-fullName
sh:name "full name" ;
sh:path ex:fullName ;
sh:values [
sh:prefixes <http://example.org/ns> ;
sh:prefixes <http://example.com/ns> ;
sh:select """
SELECT ?fullName
WHERE {
Expand All @@ -27,11 +27,11 @@ ex:Person-fullName
sh:datatype xsd:string ;
sh:hasValue "John Muir" .

<http://example.org/ns>
<http://example.com/ns>
a owl:Ontology ;
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://example.org/ns#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

ex:JohnMuir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:Resource-uriLength
a sh:PropertyShape ;
sh:targetNode ex:Invalid ; # The URI of this has 29 chars
sh:targetNode ex:Valid ; # The URI of this has 27 chars
sh:name "URI length" ;

a sh:PropertyShape ;
sh:targetNode ex:Invalid ; # The URI of this has 29 chars
sh:targetNode ex:Valid ; # The URI of this has 27 chars
sh:name "URI length" ;
sh:path ex:uriLength ;
sh:values [
sh:prefixes <http://example.com/ns> ;
sh:sparqlExpr "STRLEN(STR($this))" ;
sh:prefixes <http://example.org/ns> ;
] ;
sh:datatype xsd:integer ;
sh:hasValue 27 .

<http://example.org/ns>
<http://example.com/ns>
a owl:Ontology ;
sh:declare [
sh:prefix "ex" ;
sh:namespace "http://example.org/ns#"^^xsd:anyURI ;
sh:namespace "http://example.com/ns#"^^xsd:anyURI ;
] .

<>
Expand Down