diff --git a/README.md b/README.md index 853062f..f26ccd0 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,5 @@ Turtle prefixes are hard coded for the time being. Ideally, these should be base ```ts const prefixes = new PrefixMapFactory().prefixMap(); -prefixes.set("ex", rdf.namedNode("http://example.org#")); prefixes.set("sh", rdf.namedNode("http://www.w3.org/ns/shacl#")); ``` diff --git a/src/index.ts b/src/index.ts index c0637ee..a97b619 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,7 +21,6 @@ export async function validate( // Initialize the shared serializer. const prefixes = new PrefixMapFactory().prefixMap(); - prefixes.set("ex", rdf.namedNode("http://example.org#")); prefixes.set("sh", rdf.namedNode("http://www.w3.org/ns/shacl#")); const serializer = new Serializer({ prefixes }); const parser = rdf.formats.parsers.get("text/turtle")!; diff --git a/tests/data/invalid.report.ttl b/tests/data/invalid.report.ttl index 4c15d08..b81305d 100644 --- a/tests/data/invalid.report.ttl +++ b/tests/data/invalid.report.ttl @@ -1,28 +1,27 @@ -@prefix ex: . @prefix sh: . [ a sh:ValidationReport; sh:conforms false; sh:result [ a sh:ValidationResult; - sh:focusNode ex:ValidPoint; + sh:focusNode ; sh:resultMessage "Requires an integer Y coordinate"; - sh:resultPath ex:y; + sh:resultPath ; sh:resultSeverity sh:Violation; sh:sourceConstraintComponent sh:DatatypeConstraintComponent; sh:sourceShape []; sh:value "2" ], [ a sh:ValidationResult; - sh:focusNode ex:ValidPoint; + sh:focusNode ; sh:resultMessage "Predicate is not allowed (closed shape)"; - sh:resultPath ex:z; + sh:resultPath ; sh:resultSeverity sh:Violation; sh:sourceConstraintComponent sh:ClosedConstraintComponent; - sh:sourceShape ex:PointShape; + sh:sourceShape ; sh:value "3" ], [ a sh:ValidationResult; - sh:focusNode ex:ValidPoint; + sh:focusNode ; sh:resultMessage "Requires an integer X coordinate"; - sh:resultPath ex:x; + sh:resultPath ; sh:resultSeverity sh:Violation; sh:sourceConstraintComponent sh:DatatypeConstraintComponent; sh:sourceShape [];