Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for #10 #11

Closed
wants to merge 5 commits into from
Closed
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
44 changes: 28 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h2>Quick Start</h2>
</div>
<div id="example-school-enrolleeAge" class="example wrapper" style="vertical-align: top;">
<pre class="nohighlight shapemap query" id="school-Enrollee-query-shapemap" style="float:left;">
<span class="fullURL">{FOCUS, foaf:age, _}</span> @ <span class="shape-name">school:Enrollee</span>
<span class="fullURL">{FOCUS foaf:age _}</span> @ <span class="shape-name">school:Enrollee</span>
</pre>
</div>
<p class="followup">
Expand Down Expand Up @@ -1996,9 +1996,9 @@ <h3>Combining Value Constraints</h3>
</div>
<table class="example results">
<tbody><tr><th class="data">Node</th><th class="schema">Shape</th><th>Result</th><th>Reason</th></tr>
<tr class="pass"><td>inst:User1</td><td>my:UserShape</td><td>pass</td><td class="noreason"></td></tr>
<tr class="pass"><td>inst:Issue1</td><td>my:IssueShape</td><td>pass</td><td class="noreason"></td></tr>
<tr class="pass"><td>&lt;http://hr.example/id#123&gt;</td><td>my:EmployeeShape</td><td>pass</td><td class="noreason"></td></tr>
<tr class="fail hilight-component top lowlight2"><td>inst:User3</td><td>my:UserShape</td><td>fail</td><td class="fail">Object of <span class="predicate"><span class="type">ex:</span><span class="constant">reproducedBy</span></span> does not match <span class="shape-name">my:EmployeeShape</span>.</td></tr>
<tr class="fail hilight-component top lowlight2"><td>inst:Issue1</td><td>my:IssueShape</td><td>fail</td><td class="fail">Object of <span class="predicate"><span class="type">ex:</span><span class="constant">reproducedBy</span></span> does not match <span class="shape-name">my:EmployeeShape</span>.</td></tr>
Copy link
Contributor

@tombaker tombaker Dec 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agree, but in addition propose to change second inst:Issue1 to inst:Issue3 (for clarity) along with the corresponding try-it link.

<a class="tryit" href="" data-shape-map="inst:Issue1@&lt;http://my.example/#IssueShape&gt;,&lt;http://hr.example/id#abc&gt;@&lt;http://my.example/#EmployeeShape&gt;">try it</a></pre>

<tr class="fail hilight-invComponent lowlight1 bot"><td>&lt;http://hr.example/id#abc&gt;</td><td>my:EmployeeShape</td><td>fail</td><td class="fail"><span class="fullURL">&lt;http://hr.example/id#abc&gt;</span> does not match regular expression.</td></tr>
</tbody></table>
<script type="text/javascript">
Expand Down Expand Up @@ -2258,6 +2258,8 @@ <h2>Value Sets</h2>
An IRI orx string stem matches any IRI or string that starts with the stem.
A language tag stem matches any literal with a language tag that starts with the stem.
These are flagged as stems by appending a tilde ("<code>~</code>").
Note that this example contains an inverse constraint (<code>^ex:hasIssue</code>).
See <a href="#inverse-properties">inverse triple constraints</a>) for a detailed explanation of that concept.
</p>

<p>
Expand All @@ -2268,6 +2270,7 @@ <h2>Value Sets</h2>

<div id="sec-iri-range">
<div class="example wrapper">

<!-- ShExC example -->
<pre class="nohighlight schema shexc" style="float:left;">
<span class="prefixes"><span class="keyword">PREFIX</span> <span class="type">ex:</span> <span class="fullURL">&lt;http://a.example/#&gt;</span>
Expand Down Expand Up @@ -2356,7 +2359,7 @@ <h2>Value Sets</h2>
<tbody><tr><th class="data">Node</th><th class="schema">Shape</th><th>Result</th><th>Reason</th></tr>
<tr class="pass user2 top lowlight1"><td>inst:Issue1</td><td>my:IssueShape</td><td>pass</td><td class="noreason"></td></tr>
<tr class="fail user5 bot lowlight1"><td>inst:Issue2</td><td>my:IssueShape</td><td>fail</td><td class="fail"><span class="done top bot lowlight2"><span class="object"><span class="type">ex:</span><span class="constant">done</span></span></span> not in range of <span class="predicate"><span class="type">ex:</span><span class="constant">status</span></span>.<br/>Excluded language tag for <span class="predicate"><span class="type">ex:</span><span class="constant">mood</span></span>.</td></tr>
<tr class="fail user5 bot lowlight1"><td>inst:Issue3</td><td>my:IssueShape</td><td>fail</td><td class="fail"><span class="done top bot lowlight2"><span class="object"><span class="fullURL">my:Product3</span></span></span> not in range of <span class="predicate"><span class="type">ex:</span><span class="constant">hasIssue</span></span>.</td></tr>
<tr class="fail user5 bot lowlight1"><td>inst:Issue3</td><td>my:IssueShape</td><td>fail</td><td class="fail"><span class="done top bot lowlight2"><span class="object"><span class="fullURL">my:Product3</span></span></span> not in domain of <span class="predicate"><span class="type">ex:</span><span class="constant">hasIssue</span></span>.</td></tr>
</tbody></table>
</div>

Expand Down Expand Up @@ -2586,20 +2589,24 @@ <h3>Inverse Triple Constraints</h3>
}
}
}</pre>
<pre class="nohighlight instance turtle">
<span class="fullURL">inst:Issue1</span> <span class="keyword predicate">a</span> <span class="object"><span class="type">ex:</span><span class="constant">Issue</span></span> ;
<span class="state lowlight1 top bot"><span class="predicate"><span class="type">ex:</span><span class="constant">state</span></span> <span class="object"><span class="type">ex:</span><span class="constant">unassigned</span></span></span> .
<pre class="nohighlight instance turtle pass">
<span class="issue1 lowllight1 top"><span class="fullURL">inst:Issue1</span> <span class="keyword predicate">a</span> <span class="object"><span class="type">ex:</span><span class="constant">Issue</span></span> ;</span>
<span class="state lowlight1 bot"><span class="predicate"><span class="type">ex:</span><span class="constant">state</span></span> <span class="object"><span class="type">ex:</span><span class="constant">unassigned</span></span></span> .

<span class="fullURL">inst:User3</span> <span class="keyword predicate">a</span> <span class="object"><span class="type">foaf:</span><span class="constant">Person</span></span> ;
<span class="name lowlight1 top bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">name</span></span> <span class="string object">"Bob Smith"</span></span> ;
<span class="reportedIssue lowlight1 top bot new"><span class="predicate"><span class="type">ex:</span><span class="constant">reportedIssue</span></span> <span class="fullURL object">inst:Issue1</span></span> ;
<span class="mbox lowlight1 top"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:bob@example.org&gt;</span></span> ;
<span class="mbox lowlight1 bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:rs@example.org&gt;</span> </span>.
</pre>

<span class="fail inst-User6 lowlight2 top"><span class="fullURL">inst:User2</span> <span class="keyword predicate">a</span> <span class="object"><span class="type">foaf:</span><span class="constant">Person</span></span> ; </span>
<span class="fail inst-User6 lowlight2 "> <span class="name lowlight1 top bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">name</span></span> <span class="string top bot object">"Bob Smith"</span></span> ; </span>
<span class="fail inst-User6 lowlight2 "> <span class="mbox lowlight1 top"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:bob@example.org&gt;</span></span> ; </span>
<span class="fail inst-User6 lowlight2 bot"> <span class="mbox lowlight1 bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:rs@example.org&gt;</span> </span>. </span>
<pre class="nohighlight instance turtle fail">
<span class="inst-User2 lowlight1 top"><span class="fullURL">inst:User2</span> <span class="keyword predicate">a</span> <span class="object"><span class="type">foaf:</span><span class="constant">Person</span></span> ; </span>
<span class="name lowlight1"><span class="predicate"><span class="type">foaf:</span><span class="constant">name</span></span> <span class="string top bot object">"Bob Smith"</span> ; </span>
<span class="mbox lowlight1"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:bob@example.org&gt;</span> ; </span>
<span class="mbox lowlight1 bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:rs@example.org&gt;</span> . </span>
Copy link

@ericprud ericprud Dec 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier examples separated passing and failing data for clarity. For later examples, we mix in some where the data is mixed in order to demonstrate that data doesn't have to be all-passing or all-failing. You can validate a single graph and get mixed results.

A try-it button would make this clear.

</pre>

<span class="fullURL">inst:User3</span> <span class="keyword predicate">a</span> <span class="object"><span class="type">foaf:</span><span class="constant">Person</span></span> ;
<span class="name lowlight1 top bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">name</span></span> <span class="string object">"Bob Smith"</span></span> ;
<span class="reportedIssue lowlight1 top bot new"><span class="predicate"><span class="type">ex:</span><span class="constant">reportedIssue</span></span> <span class="fullURL object">inst:Issue1</span></span> ;
<span class="mbox lowlight1 top"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:bob@example.org&gt;</span></span> ;
<span class="mbox lowlight1 bot"><span class="predicate"><span class="type">foaf:</span><span class="constant">mbox</span></span> <span class="fullURL object">&lt;mailto:rs@example.org&gt;</span> </span>.</pre>
<div style="clear:both;"></div>
</div>
<table class="example results">
Expand Down Expand Up @@ -3193,6 +3200,11 @@ <h3>Repeated Properties</h3>
-->
</script>
</div>
<table class="example results">
<tbody><tr><th class="data">Node</th><th class="schema">Shape</th><th>Result</th><th>Reason</th></tr>
<tr class="pass"><td>inst:Issue1</td><td>my:IssueShape</td><td>pass</td><td class="noreason"></td></tr>
<tr class="fail"><td>inst:Issue1</td><td>my:IssueShape</td><td>fail</td><td class="fail">One of the Objects of <span class="predicate"><span class="type">ex:</span><span class="constant">reproducedBy</span></span> matches <span class="shape-name">my:TesterShape</span> but none matches <span class="shape-name">my:ProgrammerShape</span>.</td></tr>
</tbody></table>
</div>
<p id="partition-complexity">
Note that ShEx uses a partitioning strategy to find a solution whereby triples in the data are assigned to triple constraints in the schema.
Expand Down