W3C home > Mailing lists > Public > semantic-web@w3.org > January 2013

Re: SPIN Syntax simplified

From: Holger Knublauch <holger@knublauch.com>
Date: Fri, 01 Feb 2013 08:22:22 +1000
Message-ID: <510AEE9E.7080003@knublauch.com>
To: David Booth <david@dbooth.org>, semantic-web@w3.org
Hi David,

the prefixes from the surrounding graph should be used for parsing. In a 
typical application, SPIN rules would be loaded from a file at start-up 
time and then those prefixes are readily available.

This does have limitations of course, if no prefixes are available. But 
forcing full URIs we would sacrifice readability again - I don't think 
people would always want to repeat the PREFIX statements nor spell out 
the full URIs each time.

I guess the best practices will evolve through usage, and on the web we 
can never predict what will turn out to be the winning notation...

Holger


On 2/1/2013 2:45, David Booth wrote:
> Hi Holger,
>
> On Thu, 2013-01-31 at 11:06 +1000, Holger Knublauch wrote:
>> For those interested in SPIN, I have just published a blog post [1] that
>> introduces a fundamental change to the SPIN syntax. In a nutshell, too
>> many people have complained about the triple-based format to store
>> SPARQL queries. In the updated spec, the property sp:text can be used to
>> store the SPARQL query in textual form. This can happen either in
>> addition to the RDF syntax or alone. Existing SPIN files will of course
>> continue to work - the technical change to the spec was minimal.
>>
>> I hope this change is in the best interest of the semantic web community
>> and leads to more SPIN implementations from other vendors than TopQuadrant.
>>
>> Regards,
>> Holger
>>
>> [1]
>> http://composing-the-semantic-web.blogspot.com/2013/01/spin-syntax-simplified.html
> That sounds like a good improvement.  And I think it would be great if
> SPIN were standardized by W3C at some point.  But I have a question,
> which I was not able to post on your blog because it does not allow
> public comments.
>
> The example in the blog includes a CONSTRUCT as the quoted string value
> of the spin:text property:
>
> ex:Person a rdfs:Class ;
>          ...
>        spin:rule
>                [ ...
>                  sp:text """
>                      CONSTRUCT {
>                          ?this ex:grandParent ?grandParent .
>                      }
>                      WHERE {
>                          ?parent ex:child ?this .
>                          ?grandParent ex:child ?parent .
>                      }"""
>          ...
>
> I notice that the CONSTRUCT query above does not define the "ex:"
> namespace prefix.  How are namespace prefixes handled inside the quoted
> strings?  I.e., where/how are they defined?  Are there some other RDF
> statements somewhere that explicitly define them?  Or are they magically
> imported from the enclosing Turtle environment?  Or something else?
>
>
Received on Thursday, 31 January 2013 22:22:59 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:53 GMT