[Pellet-users] A query on SPARQL Evaluation in Pellet

Swanson, Tim tim.swanson at semanticarts.com
Fri Mar 23 17:49:13 UTC 2007


A couple notes on your RDF syntax. 

Your document is missing a base URI (xml:base), which means that declarations like rdf:resource="#p" will not resolve correctly (at least not as you intended). In this case, the 'p' which appears in the restriction definition and the 'p' which appears in the definition of 'a' will be different. The former will be resolved using the physical location of this XML document; the latter will be resolved as you intended, using the 'xmlns' declaration.

The declaration
 
<X rdf:ID="a">
  ...
  <p rdf:parseType="Resource">
     <owl:Thing/>
  </p>
</X>

is also wrong. What you want is this:

<X rdf:ID="a">
  ...
  <p>
    <owl:Thing/>
  <p>
</X>

The parseType="Resource" declaration means that the target of the property is a blank node with the listed properties. So you are actually trying to use owl:Thing as a property.


You can try it again after you make those changes, but I still don't think you will find the results you are looking for. Just because X is a subclass of (p some owl:Thing) doesn't mean that an OWL reasoner will create a blank owl:Thing that is a successor of p for any given X. The reverse is true, if a given node has an owl:Thing successor of p, then it will be inferred to be a member of (p some owl:Thing). The open world assumption in OWL dictates that there does not have to be a successor of p in the actual RDF graph for an individual to be a member of (p some owl:Thing), or any other restriction class.

While the approach that you expect would not be technically incorrect, it wouldn't be very useful either. In general, it's not the way DL reasoners work.

Hope That Helps,

Tim Swanson
Semantic Arts, Inc.
Fort Collins, CO



> -----Original Message-----
> From: pellet-users-bounces at lists.owldl.com [mailto:pellet-users-
> bounces at lists.owldl.com] On Behalf Of Petr Křemen
> Sent: Friday, March 23, 2007 8:12 AM
> To: pellet-users at lists.owldl.com
> Subject: [Pellet-users] A query on SPARQL Evaluation in Pellet
> 
>  Dear all,
> 
>  I have the following question about evaluating SPARQL in Pellet.
> 
>  =================================================================
>  Data
>  =================================================================
>  <?xml version="1.0"?>
>  <!DOCTYPE rdf:RDF [
>       <!ENTITY owl  "http://www.w3.org/2002/07/owl#" >
>       <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#" >
>     ]>
> 
>  <rdf:RDF
>    xmlns     = "http://www.example.org/e1#"
>    xmlns:owl = "http://www.w3.org/2002/07/owl#"
>    xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>    xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#"
>    xmlns:xsd = "http://www.w3.org/2001/XMLSchema#">
> 
>    <owl:Ontology rdf:about="">
>      <rdfs:comment>SPARQL example ontology</rdfs:comment>
>      <rdfs:label>SPARQL example</rdfs:label>
>    </owl:Ontology>
> 
>    <owl:Class rdf:ID="X">
>      <rdfs:subClassOf>
>        <owl:Restriction>
>          <owl:onProperty rdf:resource="#p"/>
>          <owl:someValuesFrom rdf:resource="&owl;Thing"/>
>        </owl:Restriction>
>      </rdfs:subClassOf>
>    </owl:Class>
> 
>    <X rdf:ID="a">
>        <p rdf:resource="#d" />
>        <p rdf:parseType="Resource">
>          <owl:Thing/>
>        </p>
>    </X>
>  </rdf:RDF>
> 
>  =================================================================
>   Query :
>  =================================================================
>  PREFIX my:  <http://www.example.org/e1#>
>  PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>  PREFIX owl: <http://www.w3.org/2002/07/owl#>
>  SELECT ?x ?y
>  WHERE {?x my:p ?y}
> 
>  =================================================================
>  Result ( demo on Pellet web page ):
>  =================================================================
>  x 	y
>  my:a 	eb3e2fb:-7fff
>  my:a 	my:d
>  I would expect to have one more result with another blank node as ?y
>  binding for 'p' of 'my:a'. Another possibility is that the engine will
>  merge the information and outputs just 'my:a my:d' result (as the blank
>  nodes do not add any information).
> 
>  When I tried to run the query on the same RDF graph without the triples
>  specifying the p-successors of 'my:a' I expected to obtain a result
>  inferred from the OWL semantics from the definition of the class X, but
>  the result was empty. This looks as if the reasoner performes the RDFS
>  inference, not the OWL one.
> 
>  Could You help me ? Do I understand it well ?
> 
>  Thanks in advance for Your answer
> 
>  Petr Kremen
> 
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
> 
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/


More information about the Pellet-users mailing list