From b08ea26370f38ead9dc20045e696358fc794e201 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 4 Oct 2024 16:45:45 -0400 Subject: [PATCH 1/2] Fix capitalization typo References: * https://www.w3.org/TR/shacl/#LanguageInConstraintComponent Signed-off-by: Alex Nelson --- pyshacl/constraints/core/string_based_constraints.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyshacl/constraints/core/string_based_constraints.py b/pyshacl/constraints/core/string_based_constraints.py index fbe0547..279f758 100644 --- a/pyshacl/constraints/core/string_based_constraints.py +++ b/pyshacl/constraints/core/string_based_constraints.py @@ -392,15 +392,15 @@ def _evaluate_string_rule(self, r, target_graph, f_v_dict): try: if not isinstance(lang_in, rdflib.Literal) or not isinstance(lang_in.value, str): raise ReportableRuntimeError( - "All languages in sh:LanugageIn must be a Literal with type xsd:string" + "All languages in sh:lanugageIn must be a Literal with type xsd:string" ) except (AssertionError, AttributeError): raise ReportableRuntimeError( - "All languages in sh:LanugageIn must be a Literal with type xsd:string" + "All languages in sh:lanugageIn must be a Literal with type xsd:string" ) languages_need.add(str(lang_in.value).lower()) except (KeyError, AttributeError, ValueError): - raise ReportableRuntimeError("Value of sh:LanguageIn must be a RDF List") + raise ReportableRuntimeError("Value of sh:languageIn must be a RDF List") wildcard = False if '*' in languages_need: wildcard = True From 3b4839ae1a67f9857b7eae0a91fc85d38cbb456f Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 4 Oct 2024 16:46:52 -0400 Subject: [PATCH 2/2] Fix link copy-paste typo Signed-off-by: Alex Nelson --- pyshacl/constraints/core/other_constraints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyshacl/constraints/core/other_constraints.py b/pyshacl/constraints/core/other_constraints.py index 06ff7e0..9bb0e1d 100644 --- a/pyshacl/constraints/core/other_constraints.py +++ b/pyshacl/constraints/core/other_constraints.py @@ -99,7 +99,7 @@ class ClosedConstraintComponent(ConstraintComponent): """ The RDF data model offers a huge amount of flexibility. Any node can in principle have values for any property. However, in some cases it makes sense to specify conditions on which properties can be applied to nodes. The SHACL Core language includes a property called sh:closed that can be used to specify the condition that each value node has values only for those properties that have been explicitly enumerated via the property shapes specified for the shape via sh:property. Link: - https://www.w3.org/TR/shacl/#InConstraintComponent + https://www.w3.org/TR/shacl/#ClosedConstraintComponent Textual Definition: If $closed is true then there is a validation result for each triple that has a value node as its subject and a predicate that is not explicitly enumerated as a value of sh:path in any of the property shapes declared via sh:property at the current shape. If $ignoredProperties has a value then the properties enumerated as members of this SHACL list are also permitted for the value node. The validation result MUST have the predicate of the triple as its sh:resultPath, and the object of the triple as its sh:value. """