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

Use RDF Dataset definition from RDF Concepts #152

Merged
merged 5 commits into from
Oct 31, 2024
Merged
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
62 changes: 26 additions & 36 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3124,9 +3124,9 @@ <h2>RDF Dataset</h2>
predicate and object. Many RDF data stores hold multiple RDF graphs and record information
about each graph, allowing an application to make queries that involve information from more
than one graph.</p>
<p>A SPARQL query is executed against an <em>RDF Dataset</em> which represents a collection of
<p>A SPARQL query is executed against an <a data-cite="RDF12-CONCEPTS#dfn-rdf-dataset">RDF Dataset</a> [[RDF12-CONCEPTS]] which represents a collection of
graphs. An RDF Dataset comprises one graph, the default graph, which does not have a name, and
zero or more named graphs, where each named graph is identified by an IRI. A SPARQL query can
zero or more named graphs, where each named graph is identified by an IRI or a blank node. A SPARQL query can
match different parts of the query pattern against different graphs as described in section
<a href="#queryDataset">13.3 Querying the Dataset</a>.</p>
<p>An RDF Dataset may contain zero named graphs; an RDF Dataset always contains one default
Expand All @@ -3138,7 +3138,7 @@ <h2>RDF Dataset</h2>
active graph one of all of the named graphs in the dataset for part of the query.</p>
<section id="exampleDatasets">
<h3>Examples of RDF Datasets</h3>
<p>The definition of RDF Dataset does not restrict the relationships of named and default
<p>The <a data-cite="RDF12-CONCEPTS#dfn-rdf-dataset">definition of RDF Dataset</a> [[RDF12-CONCEPTS]] does not restrict the relationships of named and default
graphs. Information can be repeated in different graphs; relationships between graphs can be
exposed. Two useful arrangements are:</p>
<ul>
Expand All @@ -3149,25 +3149,20 @@ <h3>Examples of RDF Datasets</h3>
<div class="exampleGroup">
<b>Example 1:</b>
<pre class="data nohighlight">
# <b>Default graph</b>
PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;

&lt;http://example.org/bob&gt; dc:publisher "Bob" .
&lt;http://example.org/alice&gt; dc:publisher "Alice" .
</pre>
<pre class="data nohighlight">
# <b>Named graph: http://example.org/bob</b>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;

_:a foaf:name "Bob" .
_:a foaf:mbox &lt;mailto:bob@oldcorp.example.org&gt; .
</pre>
<pre class="data nohighlight">
# <b>Named graph: http://example.org/alice</b>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
GRAPH &lt;http://example.org/bob&gt; {
_:a foaf:name "Bob" .
_:a foaf:mbox &lt;mailto:bob@oldcorp.example.org&gt; .
}

_:a foaf:name "Alice" .
_:a foaf:mbox &lt;mailto:alice@work.example.org&gt; .
GRAPH &lt;http://example.org/alice&gt; {
_:a foaf:name "Alice" .
_:a foaf:mbox &lt;mailto:alice@work.example.org&gt; .
}
</pre>
</div>
<p>In this example, the default graph contains the names of the publishers of two named
Expand All @@ -3184,28 +3179,23 @@ <h3>Examples of RDF Datasets</h3>
</p>
<div class="exampleGroup">
<pre class="data nohighlight">
# <b>Default graph</b>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;

_:x foaf:name "Bob" .
_:x foaf:mbox &lt;mailto:bob@oldcorp.example.org&gt; .

_:y foaf:name "Alice" .
_:y foaf:mbox &lt;mailto:alice@work.example.org&gt; .
</pre>
<pre class="data nohighlight">
# <b>Named graph: http://example.org/bob</b>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;

_:a foaf:name "Bob" .
_:a foaf:mbox &lt;mailto:bob@oldcorp.example.org&gt; .
</pre>
<pre class="data nohighlight">
# <b>Named graph: http://example.org/alice</b>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
GRAPH &lt;http://example.org/bob&gt; {
_:a foaf:name "Bob" .
_:a foaf:mbox &lt;mailto:bob@oldcorp.example.org&gt; .
}

_:a foaf:name "Alice" .
_:a foaf:mbox &lt;<a href="mailto:alice@work.example">mailto:alice@work.example</a>&gt; .
GRAPH &lt;http://example.org/alice&gt; {
_:a foaf:name "Alice" .
_:a foaf:mbox &lt;mailto:alice@work.example&gt; .
}
</pre>
<p>In an RDF merge, blank nodes in the merged graph are not shared with blank nodes from
the graphs being merged.</p>
Expand Down Expand Up @@ -7884,12 +7874,12 @@ <h2>Definition of SPARQL</h2>
<h3>Initial Definitions</h3>
rubensworks marked this conversation as resolved.
Show resolved Hide resolved
<section id="sparqlDataset">
<h4>RDF Dataset</h4>
<div class="defn">
<p><b>Definition: <span id="defn_RDFDataset">RDF Dataset</span></b></p>
<p>An RDF dataset is a set:<br>
{ G, (&lt;u<sub>1</sub>&gt;, G<sub>1</sub>), (&lt;u<sub>2</sub>&gt;, G<sub>2</sub>), . .
. (&lt;u<sub>n</sub>&gt;, G<sub>n</sub>) }<br>
where G and each G<sub>i</sub> are graphs, and each &lt;u<sub>i</sub>&gt; is an IRI. Each
<div>
<p>The concept of an <a data-cite="RDF12-CONCEPTS#dfn-rdf-dataset">RDF Dataset</a> is defined in [[RDF12-CONCEPTS]].</p>
<p>For the following definitions, we capture each RDF dataset as a set:<br>
{ G, (&lt;u<sub>1</sub>&gt;, G<sub>1</sub>), (&lt;u<sub>2</sub>&gt;, G<sub>2</sub>),
... (&lt;u<sub>n</sub>&gt;, G<sub>n</sub>) }<br>
where G and each G<sub>i</sub> are graphs, and each &lt;u<sub>i</sub>&gt; is an IRI or blank node. Each
&lt;u<sub>i</sub>&gt; is distinct.</p>
<p>G is called the default graph. (&lt;u<sub>i</sub>&gt;, G<sub>i</sub>) are called named
graphs.</p>
Expand Down Expand Up @@ -8062,7 +8052,7 @@ <h4>SPARQL Query</h4>
<ul>
<li>E is a <a href="#sparqlAlgebra">SPARQL algebra</a> expression
</li>
<li>DS is an <a href="#defn_RDFDataset">RDF Dataset</a>
<li>DS is an <a data-cite="RDF12-CONCEPTS#dfn-rdf-dataset">RDF Dataset</a> [[RDF12-CONCEPTS]]
</li>
<li>QF is a <a href="#QueryForms">query form</a>
</li>
Expand Down
Loading