Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The short answer is that the data doesn't look quite like what your query expects it to look like. Let's look at the graph described by this RDF/XML snippet:</p> <pre class="lang-xml prettyprint-override"><code>&lt;rdf:RDF xml:base="http://example.org/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:service="http://www.daml.org/services/owl-s/1.1/Service.owl#" xmlns:profile="http://www.daml.org/services/owl-s/1.1/Profile.owl#"&gt; &lt;profile:Profile rdf:ID="AddServiceName"&gt; &lt;service:presentedBy rdf:resource="AddServicePresenter"/&gt; &lt;profile:serviceName&gt;"ser"&lt;/profile:serviceName&gt; &lt;/profile:Profile&gt; &lt;/rdf:RDF&gt; </code></pre> <p>in Turtle format, which is much closer to the pattern language of SPARQL:</p> <pre class="lang-none prettyprint-override"><code>@prefix service: &lt;http://www.daml.org/services/owl-s/1.1/Service.owl#&gt; . @prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; . @prefix profile: &lt;http://www.daml.org/services/owl-s/1.1/Profile.owl#&gt; . &lt;http://example.org/#AddServiceName&gt; a profile:Profile ; profile:serviceName "\"ser\"" ; service:presentedBy &lt;http://example.org/AddServicePresenter&gt; . </code></pre> <p>In particular, note that an element in RDF/XML that corresponds to an subject or object in the RDF graph can use its XML element name as a shorthand for an <code>rdf:type</code> statement. So <code>&lt;profile:Profile rdf:ID="x"&gt;…&lt;/profile:Profile&gt;</code> says that the resource <code>&lt;...#x&gt;</code> has <code>rdf:type profile:Profile</code>. In Turtle and SPARQL, <code>a</code> is a shorthand for <code>rdf:type</code>, so <code>&lt;...#x&gt; a profile:Profile</code> means <code>&lt;...#x&gt; rdf:type profile:Profile</code>. The other properties of <code>&lt;...#x&gt;</code> are determined by the content of the element. In this case <code>&lt;...#AddServiceName&gt;</code> has two properties, one for <code>service:presentedBy</code> and one for <code>profile:serviceName</code>.</p> <p>To find profiles, their presenters, and names, you need a query like:</p> <pre><code>PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; PREFIX service: &lt;http://www.daml.org/services/owl-s/1.1/Service.owl#&gt; PREFIX profile: &lt;http://www.daml.org/services/owl-s/1.1/Profile.owl#&gt; SELECT ?profile ?presenter ?name WHERE { ?profile a profile:Profile ; service:presentedBy ?presenter ; profile:serviceName ?name . } </code></pre> <p>The triple pattern could also be written in a more verbose form:</p> <pre><code>?profile rdf:type profile:Profile . ?profile service:presentedBy ?presenter . ?profile profile:serviceName ?name . </code></pre> <p>Running this query produces these results:</p> <pre><code>$ arq --query query.sparql --data data.rdf ----------------------------------------------------------------------------------------------- | profile | presenter | name | =============================================================================================== | &lt;http://example.org/#AddServiceName&gt; | &lt;http://example.org/AddServicePresenter&gt; | "\"ser\"" | ----------------------------------------------------------------------------------------------- </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload