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

Re: SPIN Syntax simplified

From: David Booth <david@dbooth.org>
Date: Thu, 31 Jan 2013 11:45:23 -0500
To: Holger Knublauch <holger@knublauch.com>
Cc: semantic-web@w3.org
Message-ID: <1359650723.25867.16947.camel@dbooth-laptop>
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 ;
              [ ...
                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?

David Booth, Ph.D.

Aaron's Law, in memory of Web prodigy and open information 
advocate Aaron Swartz: http://bit.ly/USR4rx 

Opinions expressed herein are my own and do not necessarily 
reflect those of my employer.
Received on Thursday, 31 January 2013 16:45:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:50:16 UTC