Skip to content
Merged
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
11 changes: 6 additions & 5 deletions shacl12-core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@
const selectors = document.createElement("div");
selectors.classList.add("selectors");

// Check if shaclc div exists in this tab group
// Check if JSON-LD or shaclc div exists in this tab group
const hasJsonld = tabs.querySelector(".jsonld");
const hasShaclc = tabs.querySelector(".shaclc");

selectors.innerHTML = `
<button class="selected" data-selects="turtle">Turtle</button>
<button data-selects="jsonld">JSON-LD</button>
${hasJsonld ? '<button data-selects="jsonld">JSON-LD</button>' : ''}
${hasShaclc ? '<button data-selects="shaclc">SHACL-C</button>' : ''}
`

Expand Down Expand Up @@ -1332,7 +1333,7 @@ <h4>Objects-of targets (sh:targetObjectsOf)</h4>
because it is the <a>object</a> of a <a>triple</a> that has <code>ex:knows</code> as its <a>predicate</a>.
</p>
</section>

<section id="targetWhere">
<h4>Where Targets (sh:targetWhere)</h4>
<p class="syntax">
Expand Down Expand Up @@ -1382,7 +1383,7 @@ <h4>Where Targets (sh:targetWhere)</h4>
<span class="focus-node-selected">ex:Bob</span> a ex:Person ;
ex:age 21 .
</div>

</aside>
<p>
In this example, only <code>ex:Bob</code> is a focus node of <code>ex:AdultPerson</code>
Expand All @@ -1403,7 +1404,7 @@ <h4>Where Targets (sh:targetWhere)</h4>
In the worst case, an engine will need to iterate over all nodes in the data graph to filter them one-by-one.
</p>
</section>

<section id="explicit-shape-target">
<h4>Explicit shape targets (sh:shape)</h4>
<p class="syntax">
Expand Down
8 changes: 7 additions & 1 deletion shacl12-node-expr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@
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 = `
<button class="selected" data-selects="turtle">Turtle</button>
<button data-selects="jsonld">JSON-LD</button>
${hasJsonld ? '<button data-selects="jsonld">JSON-LD</button>' : ''}
${hasShaclc ? '<button data-selects="shaclc">SHACL-C</button>' : ''}
`

tabs.prepend(selectors);
Expand Down
8 changes: 7 additions & 1 deletion shacl12-profiling/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,15 @@
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 = `
<button class="selected" data-selects="turtle">Turtle</button>
<button data-selects="jsonld">JSON-LD</button>
${hasJsonld ? '<button data-selects="jsonld">JSON-LD</button>' : ''}
${hasShaclc ? '<button data-selects="shaclc">SHACL-C</button>' : ''}
`

tabs.prepend(selectors);
Expand Down
67 changes: 34 additions & 33 deletions shacl12-rules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>SHACL 1.2 Rules</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove"></script>
<script class="remove">

function prepareSyntaxRules() {
document.querySelectorAll("[data-syntax-rule]").forEach(element => {
let ruleId = element.getAttribute("data-syntax-rule");
Expand Down Expand Up @@ -35,7 +35,7 @@
element.setAttribute("id", "syntax-rule-" + ruleId);
});
}

function prepareValidators() {
document.querySelectorAll("[data-validator]").forEach(element => {
let validatorId = element.getAttribute("data-validator") + "ConstraintComponent";
Expand Down Expand Up @@ -73,13 +73,14 @@
for (const tabs of document.querySelectorAll(".ds-selector-tabs")) {
const selectors = document.createElement("div");
selectors.classList.add("selectors");

// Check if shaclc div exists in this tab group

// Check if JSON-LD or shaclc div exists in this tab group
const hasJsonld = tabs.querySelector(".jsonld")
const hasShaclc = tabs.querySelector(".shaclc");

selectors.innerHTML = `
<button class="selected" data-selects="turtle">Turtle</button>
<button data-selects="jsonld">JSON-LD</button>
${hasJsonld ? '<button data-selects="jsonld">JSON-LD</button>' : ''}
${hasShaclc ? '<button data-selects="shaclc">SHACL-C</button>' : ''}
`

Expand All @@ -97,7 +98,7 @@
}
}
});

var respecConfig = {
localBiblio: {},

Expand All @@ -117,13 +118,13 @@
{
name: "Robert David",
company: "Ontotext",
//mailto:
//mailto:
w3cid: "97894"
},
{
name: "David Habgood",
company: "KurrawongAI",
// mailto:
// mailto:
w3cid: "164266"
},

Expand Down Expand Up @@ -154,7 +155,7 @@
publisher: "W3C",
}
}

};
</script>
<style>
Expand Down Expand Up @@ -713,7 +714,7 @@ <h3>Document Conventions</h3>
<p>TODO</p>

<p class="ednote">RFC 2119 language should autmatically be inserted here.</p>

</section>
</section>

Expand Down Expand Up @@ -766,7 +767,7 @@ <h2>Shape Rules Abstract Syntax</h2>
A <em>data block</em> is a set of triples.
These form extra facts that are included in the inference process.
</dd>

<dt><dfn>triple template</dfn></dt>
<dd>
A <em>triple template</em> is 3-tuple where each element is either
Expand All @@ -778,7 +779,7 @@ <h2>Shape Rules Abstract Syntax</h2>
<dd>
A <em>triple pattern</em> is 3-tuple where each element is either a
variable, or an RDF term (which might be a triple term).
[=Triple patterns=] appear in the [=body=] of a [=rule=].
[=Triple patterns=] appear in the [=body=] of a [=rule=].
</dd>

<dt><dfn>condition expression</dfn></dt>
Expand Down Expand Up @@ -807,19 +808,19 @@ <h2>Shape Rules Abstract Syntax</h2>
A <em>rule head</em> is a sequence where each element
of the sequence is a [=triple template=].
</dd>

<dt>
<dfn data-lt="body|rule body">rule body</dfn>
</dt>
<dd>
A <em>rule body</em> is a sequence where each element
of the sequence is a [=triple pattern=], a
of the sequence is a [=triple pattern=], a
[=condition expression=], or an [=assignment=].
</dd>

<dt><dfn>rule set</dfn></dt>
<dd>
A <em>rule set</em> is a collection of zero or more [=rules=]
A <em>rule set</em> is a collection of zero or more [=rules=]
and a collection of zero or more [=data blocks=].
</dd>
</dl>
Expand All @@ -836,10 +837,10 @@ <h3>Well-formedness Conditions</h3>
<p>
Well-formedness is a set of conditions on the abstract syntax of
shapes rules. Together, these rules ensure that a [=variable=] in the
[=head=] of a rule has a value defined in the [=body=] of the rule;
that each variable in an condition expression or assignment
[=head=] of a rule has a value defined in the [=body=] of the rule;
that each variable in an condition expression or assignment
expression has a value at the point of evaluation; and that each
assignment in a rule introduces a new variable,
assignment in a rule introduces a new variable,
not used earlier in the rule body.
</p>
<p>
Expand All @@ -849,15 +850,15 @@ <h3>Well-formedness Conditions</h3>
<ul>
<li>For every [=variable=] appearing in a [=triple template=]
of the [=head=] of the [=rule=],
there is one or more occurrences of a [=variable=]
of the same name in the [=triple patterns=] in the [=body=],
there is one or more occurrences of a [=variable=]
of the same name in the [=triple patterns=] in the [=body=],
or in an [=assignment=] in the body, or both.
</li>
<li>
For every [=variable=] in an [=expression=] at position <em>i</em>
of the [=body=], there is a corresponding [=variable=] of the same
name occuring in a [=triple pattern=] at a position <em>j</em>,
or occurring as an [=assignment variable=] at a position <em>j</em>,
name occuring in a [=triple pattern=] at a position <em>j</em>,
or occurring as an [=assignment variable=] at a position <em>j</em>,
where <em>i &gt; j</em>.
</li>
<li>
Expand All @@ -870,9 +871,9 @@ <h3>Well-formedness Conditions</h3>
</li>
<li>
For every [=variable=] in an [=assignment expression=] at position <em>i</em>,
there is a corresponding variable in a triple pattern at position
there is a corresponding variable in a triple pattern at position
<em>j</em> where <em>i &gt; j</em>,
or there is an [=assignment variable=] in an [=assignment=] at position
or there is an [=assignment variable=] in an [=assignment=] at position
<em>j</em> where <em>i &gt; j</em>.
</li>
</ul>
Expand Down Expand Up @@ -905,10 +906,10 @@ <h2>Concrete Syntax forms for Shapes Rules</h2>

DATA { :x :p 1 ; :q 2 . }

RULE { ?x :bothPositive true . }
RULE { ?x :bothPositive true . }
WHERE { ?x :p ?v1 FILTER ( ?v1 &gt; 0 ) ?x :q ?v2 FILTER ( ?v2 &gt; 0 ) }

RULE { ?x :oneIsZero true . }
RULE { ?x :oneIsZero true . }
WHERE { ?x :p ?v1 ; :q ?v2 FILTER ( ( ?v1 = 0 ) || ( ?v2 = 0 ) ) }
</pre>

Expand Down Expand Up @@ -1022,7 +1023,7 @@ <h4>Compact Syntax Abbreviations</h4>
<h3>Shape Rules Evaluation</h3>

<p>
This section defines the outcome of evaluating a rule set on given data.
This section defines the outcome of evaluating a rule set on given data.
It does not prescribe the algorithm as the method of implementation.
An implementation can use any algorithm that generates the same outcome.
</p>
Expand All @@ -1044,7 +1045,7 @@ <h4>Evaluation of an expression</h4>

Let [x/row] be
if x is an RDF term, the [x/row] is x
if x is a variable then [x/row] is the value of x in the row
if x is a variable then [x/row] is the value of x in the row
## By well-formedness, it is an error if x is not in the row.

eval(F(expr1, expr2), row) = F(eval(expr1, row), eval(expr2, row))
Expand Down Expand Up @@ -1079,14 +1080,14 @@ <h4>Evaluation of a rule</h4>
add row1 to T1
endfor
T = T1
endif
endif

if rElt is a condition expression F:
T1 = empty list
for each row in T:
if ( eval(F,B) )
add R to T1
endif
endif
endfor
T = T1
endif
Expand All @@ -1105,7 +1106,7 @@ <h4>Evaluation of a rule</h4>
# Evaluate rule head
let H = empty set
for each R in T:
Let S = set of triples obtained by replacing variables
Let S = set of triples obtained by replacing variables
in the triple templates of the head with values from R
define [head(R)/row]
H = H union S
Expand Down
Loading