diff --git a/shacl12-core/images/Makefile b/shacl12-core/images/Makefile new file mode 100644 index 000000000..0a74db0f8 --- /dev/null +++ b/shacl12-core/images/Makefile @@ -0,0 +1,4 @@ +all: SHACL-UML.svg + +%.svg: %.puml + plantuml -Tsvg $^ diff --git a/shacl12-core/images/SHACL-UML.puml b/shacl12-core/images/SHACL-UML.puml new file mode 100644 index 000000000..927667a26 --- /dev/null +++ b/shacl12-core/images/SHACL-UML.puml @@ -0,0 +1,66 @@ +@startuml +hide circles +hide empty members +skinparam pathHoverColor red ' on cover, highlight blue links as red +' skinparam topurl https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html ' links resolve to anchors in current HTML page, when the SVG is embedded + +class "sh:Shape" as Shape [[#shapes]] { + [[#targetClass sh:targetClass]] : rdfs:Class + [[#targetNode sh:targetNode]] : any + [[#targetSubjectsOf sh:targetSubjectsOf]] : rdf:Property + [[#targetObjectsOf sh:targetObjectsOf]] : rdf:Property + [[#targetWhere sh:targetWhere]] : sh:NodeShape + .... + [[#deactivated sh:deactivated]] : xsd:boolean + [[#message sh:message]] : xsd:string or rdf:langString + [[#severity sh:severity]] : sh:Severity +} + +class "sh:NodeShape" as NodeShape [[#node-shapes]] { + [[#constraints Constraint parameters]], for example: + [[#NodeKindConstraintComponent sh:nodeKind]] a sh:NodeKind + [[#ClosedConstraintComponent sh:closed]] : xsd:boolean or [[#syntax-rule-closed-datatype sh:ByTypes]] + [[#ClosedConstraintComponent sh:ignoredProperties]] : list + [[#OrConstraintComponent sh:or]], [[#AndConstraintComponent sh:and]], [[#XoneConstraintComponent sh:xone]] : list of Shape + [[#NotConstraintComponent sh:not]] : [[#shapes sh:Shape]] + ... +} + +class "sh:PropertyShape" as PropertyShape [[#property-shapes]] { + [[#property-paths sh:path]] : predicate or list or blank node + .... + [[#constraints Constraint parameters]], for example: + [[#MinCountConstraintComponent sh:minCount]], [[#MaxCountConstraintComponent sh:maxCount]] : xsd:integer + [[#MinLengthConstraintComponent sh:minLength]], [[#MaxLengthConstraintComponent sh:maxLength]] : xsd:integer + [[#ClassConstraintComponent sh:class]] or [[#DatatypeConstraintComponent sh:datatype]] : IRI or list of IRIs + [[#NodeConstraintComponent sh:node]] : [[#node-shapes sh:NodeShape]] + ... + .... + [[#core-components-list List constraints]] + [[#MemberShapeConstraintComponent sh:memberShape]] : [[#node-shapes sh:NodeShape]] + [[#MinListLengthConstraintComponent sh:minListLength]], [[#MaxListLengthConstraintComponent sh:maxListLength]]: xsd:integer + [[#UniqueMembersConstraintComponent sh:uniqueMembers]] : xsd:boolean + .... + [[#name sh:name]] : xsd:string or rdf:langString + [[#description sh:description]] : xsd:string or rdf:langString + [[#syntax-rule-path-defaultValue sh:defaultValue]] : any + [[#syntax-rule-path-defaultValue sh:values]] : any + [[#codeIdentifier sh:codeIdentifier]] : xsd:string + [[#order sh:order]] : xsd:integer or xsd:decimal +} + +class "sh:PropertyGroup" as PropertyGroup [[#group sh:group]] { + [[#group sh:order]] : xsd:integer or xsd:decimal + ... eg rdfs:label +} + +Shape <|-- NodeShape +Shape <|-- PropertyShape +NodeShape -> PropertyShape : [[#property-shapes sh:property]] * +PropertyShape --> PropertyGroup : [[#group sh:group]] + +' These links make the diagram too busy, so omit them for now. They are listed as fields +' PropertyShape -> NodeShape : [[#NodeConstraintComponent sh:node]] +' PropertyShape -> NodeShape : [[#MemberShapeConstraintComponent sh:memberShape]] +' Shape -> NodeShape : [[#targetWhere sh:targetWhere]] +@enduml diff --git a/shacl12-core/images/SHACL-UML.svg b/shacl12-core/images/SHACL-UML.svg new file mode 100644 index 000000000..bc4de5724 --- /dev/null +++ b/shacl12-core/images/SHACL-UML.svg @@ -0,0 +1 @@ +sh:Shapesh:targetClass: rdfs:Classsh:targetNode: anysh:targetSubjectsOf: rdf:Propertysh:targetObjectsOf: rdf:Propertysh:targetWhere: sh:NodeShapesh:deactivated: xsd:booleansh:message: xsd:string or rdf:langStringsh:severity: sh:Severitysh:NodeShapeConstraint parameters, for example:sh:nodeKinda sh:NodeKindsh:closed: xsd:boolean orsh:ByTypessh:ignoredProperties: listsh:or,sh:and,sh:xone: list of Shapesh:not:sh:Shape...sh:PropertyShapesh:path: predicate or list or blank nodeConstraint parameters, for example:sh:minCount,sh:maxCount: xsd:integersh:minLength,sh:maxLength: xsd:integersh:classorsh:datatype: IRI or list of IRIssh:node:sh:NodeShape...List constraintssh:memberShape:sh:NodeShapesh:minListLength,sh:maxListLength: xsd:integersh:uniqueMembers: xsd:booleansh:name: xsd:string or rdf:langStringsh:description: xsd:string or rdf:langStringsh:defaultValue: anysh:values: anysh:codeIdentifier: xsd:stringsh:order: xsd:integer or xsd:decimalsh:PropertyGroupsh:order: xsd:integer or xsd:decimal... eg rdfs:labelsh:property*sh:group diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 9aa57e4fc..7a43c8ba3 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -864,7 +864,7 @@

Shapes and Constraints

The following introduction is non-normative.

- The following informal diagram provides an overview of some of the key classes in the SHACL vocabulary. + The following UML diagram provides an overview of some of the key classes and properties in the SHACL vocabulary. Each box represents a class. The boxes under the class name list a small subset of the frequently used properties that instances of these classes may have, together with their value types. @@ -927,11 +927,16 @@

Shapes and Constraints

-

- The Turtle serialization of the SHACL vocabulary contains the complete SHACL vocabulary. -

- +

+ The content of the boxes under the class name lists some of the properties that instances of these classes may have, together with their value types. + Empty arrowheads indicate inheritance (rdfs:subClassOf) and normal arrowheads indicate RDF relations. +

+
+

+ The Turtle serialization of the SHACL vocabulary contains the complete SHACL vocabulary. +

+

Shapes

@@ -2335,6 +2340,38 @@

Validation Report

] ] . +
+
{
+	"@type": "sh:ValidationReport",
+	"sh:conformanceDisallows": {
+		"@id": "sh:Violation"
+	},
+	"sh:conforms": {
+		"@type": "xsd:boolean",
+		"@value": "true"
+	},
+	"sh:result": {
+		"@type": "sh:ValidationResult",
+		"sh:focusNode": {
+			"@id": "ex:Bob"
+		},
+		"sh:resultMessage": "ex:age expects a literal of datatype xsd:integer.",
+		"sh:resultPath": {
+			"@id": "ex:age"
+		},
+		"sh:resultSeverity": {
+			"@id": "sh:Warning"
+		},
+		"sh:sourceConstraintComponent": {
+			"@id": "sh:DatatypeConstraintComponent"
+		},
+		"sh:sourceShape": {
+			"@id": "ex:PersonShape-age"
+		},
+		"sh:value": "twenty two"
+	}
+}
+

@@ -2359,6 +2396,38 @@

Validation Report

] ] . +
+
{
+	"@type": "sh:ValidationReport",
+	"sh:conformanceDisallows": {
+		"@id": "sh:Violation"
+	},
+	"sh:conforms": {
+		"@type": "xsd:boolean",
+		"@value": "false"
+	},
+	"sh:result": {
+		"@type": "sh:ValidationResult",
+		"sh:focusNode": {
+			"@id": "ex:Bob"
+		},
+		"sh:resultMessage": "ex:age expects a literal of datatype xsd:integer.",
+		"sh:resultPath": {
+			"@id": "ex:age"
+		},
+		"sh:resultSeverity": {
+			"@id": "sh:Violation"
+		},
+		"sh:sourceConstraintComponent": {
+			"@id": "sh:DatatypeConstraintComponent"
+		},
+		"sh:sourceShape": {
+			"@id": "ex:PersonShape-age"
+		},
+		"sh:value": "twenty two"
+	}
+}
+
@@ -5788,5 +5857,27 @@

Changes between the original SHACL Core and SHACL 1.2 Core

  • Added support for `rdf:dirLangString` to , see Issue 737
  • - - + + + + + + + + diff --git a/shacl12-profiling/index.html b/shacl12-profiling/index.html index 214bd12c3..2b1f01ae7 100644 --- a/shacl12-profiling/index.html +++ b/shacl12-profiling/index.html @@ -69,11 +69,16 @@ graph.append(tabs) } - // Generate buttons for the selection logic - for (const tabs of document.querySelectorAll(".ds-selector-tabs")) { - const selectors = document.createElement("div"); - selectors.classList.add("selectors"); - selectors.innerHTML = ` + // Generate buttons for the selection logic + for (const tabs of document.querySelectorAll(".ds-selector-tabs")) { + const selectors = document.createElement("div"); + selectors.classList.add("selectors"); + + // Check if JSON-LD or shaclc div exists in this tab group + const hasJsonld = tabs.querySelector(".jsonld"); + const hasShaclc = tabs.querySelector(".shaclc"); + + selectors.innerHTML = ` ${hasJsonld ? '' : ''} ${hasShaclc ? '' : ''} @@ -1251,4 +1256,4 @@

    Specification Profiles Listing

    When a set of SHACL information is contained within an owl:Ontology, it may be useful to identify the graph used to package the content within a graph using the same IRI as the ontology.

    ---> \ No newline at end of file +--> diff --git a/shacl12-sparql/index.html b/shacl12-sparql/index.html index b546dae9a..9ee114b6d 100644 --- a/shacl12-sparql/index.html +++ b/shacl12-sparql/index.html @@ -665,7 +665,7 @@

    Syntax of SPARQL-based Constraints

    and this value is either true or false.

    - SELECT queries used in the context of property shapes use a special variable named PATH as a placeholder for the path used by the shape. + SELECT queries used in the context of property shapes use a special variable named PATH (spelled in UPPERCASE) as a placeholder for the path used by the shape.

    The only legal use of the variable PATH in the SPARQL queries of SPARQL-based constraints @@ -1284,10 +1284,8 @@

    Validation with SPARQL-based Constraint Components

  • For SELECT-based validators: If the shape is a property shape, then prior to execution - substitute the variable PATH where it appears in the predicate - position of a triple pattern - with a valid SPARQL surface syntax string of the SHACL property path - specified via sh:path at the property shape. + substitute the variable PATH with a valid SPARQL surface syntax string of the SHACL property path + (see the reference "substitute" for details). Let QS be the solutions produced by executing the SPARQL query.