Re: Property Paths and Construct Queries

SPARQL 1.1 only requires an engine to return that there is a path between
the two nodes and it does not require (nor provide a mechanism) for an
engine to return details of that path

Thus you can't reconstruct the matched path because the information simply
does not exist in the engine at the point where it evaluates the CONSTRUCT
template.

There are some creative workarounds such as
http://stackoverflow.com/a/18032019/107591 which let you get information
about intermediate nodes in the path but these would require custom
post-processing to reconstruct the paths so likely can't be used in a
CONSTRUCT template either

Rob

From:  Hanane Ouksili <hanane.ouksili@gmail.com>
Date:  Tuesday, 7 July 2015 12:21
To:  <public-sparql-dev@w3.org>
Subject:  Re:
Resent-From:  <public-sparql-dev@w3.org>
Resent-Date:  Tue, 07 Jul 2015 14:12:01 +0000

> Dear all,
> 
> I have the following question:
> 
> In the previous version of SPRQL I was using the CONSTRUCT clause to extract
> the graph part of a KB.
> 
> This feature does not seam to work in the SPARQL 1.1.  when i use the  Path
> Language
> 
> For example, 
>                  CONSTRUCT
>                    { ?x (^rdfs:subClassOf)*/^rdf:type ?y }
>                     WHERE {
>                     ?x  (^rdfs:subClassOf)*/^rdf:type  ?y
>                    }
> I want, by this query to extract the path between ?x and ?y when it is egale
> to (^rdfs:subClassOf)*/^rdf:type. This query work with the SELECT clause but
> no with the  CONSTRUCT clause
> 
> Can you please tell me if I do something wrong or if there is an other
> solution to do that in SPARQL 1.1?
> 
> Thank you in advance,
> 
> On Tue, Jul 7, 2015 at 1:14 PM, Hanane Ouksili <hanane.ouksili@gmail.com>
> wrote:
>> Dear all,
>> 
>> I have the following question:
>> 
>> In the previous version of SPRQL I was using the CONSTRUCT clause to extract
>> the graph part of a KB.
>> 
>> This feature does not seam to work in the SPARQL 1.1.  when i use the  Path
>> Language
>> 
>> Can you please tell me if I do something wrong or if there is
>> 
>> -- 
>> Hanane OUKSILI
>> Doctorante 
>> - Laboratoire PRiSM
>> Université de Versailles-St-Quentin-en-Yvelines
>> - EDF - R&D
>> Département STEP Chatou
>> 
>> 
> 
> 
> 
> -- 
> Hanane OUKSILI
> Doctorante 
> - Laboratoire PRiSM
> Université de Versailles-St-Quentin-en-Yvelines
> - EDF - R&D
> Département STEP Chatou
> 
> hanane.ouksili@gmail.com
> tél 00336 49 69 43  03

Received on Tuesday, 7 July 2015 14:23:33 UTC