Skip to content

Commit

Permalink
Add test for syntax of enumeration-of-literal datatypes
Browse files Browse the repository at this point in the history
This test builds on the PR for Issue 406, and will fail CI as it is
currently filed.  The failure is an intentional demonstration of
non-conformance.  This test will need to be merged into another branch
that had applied the syntax fix.

References:
* #406
* #435

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Aug 8, 2022
1 parent 40e16b0 commit 548f1ab
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ontology/owl/owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ uco-owl:Axiom-shape
sh:targetClass owl:Axiom ;
.

uco-owl:DataOneOf-shape
a sh:NodeShape ;
sh:sparql [
a sh:SPARQLConstraint ;
rdfs:comment "This requirement is determined from review of the canonical parsing process in Section 3.2.4, Table 12, row 4 of the OWL 2 mapping to RDF. All datatypes using owl:oneOf must be blank nodes. Any non-blank node will not be mapped and consumed by the mapping process. See also DataOneOf in the OWL 2 Syntax document, especially with 'Show RDF in Examples' turned on."@en ;
rdfs:seeAlso
<https://www.w3.org/TR/owl2-mapping-to-rdf/#Parsing_of_Expressions> ,
<https://www.w3.org/TR/owl2-syntax/#Enumeration_of_Literals>
;
sh:message "For data ranges that are sets of literals, owl:oneOf must only be used on blank nodes." ;
sh:prefixes <http://www.w3.org/2000/01/rdf-schema#> ;
sh:select """
SELECT $this
WHERE {
$this a rdfs:Datatype .
FILTER ( isIRI($this) )
}
""" ;
] ;
sh:targetSubjectsOf owl:oneOf ;
.

uco-owl:DatatypeProperty-shacl-constraints-shape
a sh:NodeShape ;
sh:sparql
Expand Down

0 comments on commit 548f1ab

Please sign in to comment.