W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > August 2012

Re: 9.1 Property Path Syntax

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Tue, 14 Aug 2012 16:28:10 +0100
Message-ID: <502A6E8A.7090308@epimorphics.com>
To: public-rdf-dawg-comments@w3.org
Nick,

The syntax for IRIs is discussed in section 4.1.1.

http://www.w3.org/TR/sparql11-query/#QSynIRI

and there are some examples of writing equivalent IRIs.

This is not in the property path section as this is not specific to 
property paths.

An IRI can be written in <...> form or a prefixed name - it's just 
surface syntax and for execution purposes the expanded absolute IRI is 
used.  There are no prefix names at execution time in SPARQL, only 
absolute IRIs (the same is true of RDF).

Implementers need to treate prefix names as surface syntax for absolute 
IRIs.

 > $names = $person->all('foaf:knows/foaf:name');

Somewhere EasyRdf needs to provide the prefix mapping for "foaf:" 
because foaf:knows is just shorthand for
<http://xmlns.com/foaf/0.1/knows> which is what will appear in the data 
to be matched.

	Andy

On 13/08/12 11:09, Nicholas Humfrey wrote:
> Hello,
>
> I am looking at implementing a small subset of the SPARQL 1.1 Property Path
> syntax in EasyRdf. Although it doesn't support SPARQL querying internally,
> the property path syntax is useful for fetching values like this:
> $names = $person->all('foaf:knows/foaf:name');
>
>
> However I am finding the Property Path Syntax for an IRI is slightly
> confusing:
> "iri is either an IRI written in full or abbreviated by a prefixed name"
>
> How should implementers distinguish between an IRI and a property path?
> Shouldn't a full IRI be enclosed in angle brackets?
> <http://xmlns.com/foaf/0.1/knows>
>
> Hence property paths can only be used with prefixed names? I think an
> example might help.
>
>
> Thanks,
>
> nick.
>
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
> 					
>
Received on Tuesday, 14 August 2012 15:28:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 14 August 2012 15:28:41 GMT