W3C home > Mailing lists > Public > public-vocabs@w3.org > January 2013

SPIN text syntax (was: Should we adopt SKOS?)

From: Holger Knublauch <holger@topquadrant.com>
Date: Fri, 11 Jan 2013 09:42:22 +1000
Message-ID: <50EF51DE.3030905@topquadrant.com>
To: Ivan Herman <ivan@w3.org>
CC: Martin Hepp <martin.hepp@ebusiness-unibw.org>, Dan Brickley <danbri@danbri.org>, Richard Wallis <richard.wallis@oclc.org>, "public-vocabs@w3.org Org" <public-vocabs@w3.org>, Jamie Taylor <jamietaylor@google.com>
On 1/11/2013 0:09, Ivan Herman wrote:
> Not exactly. Personally, I like the spin 'processing' model. No 
> problem there. But I think that syntax, ie, turning SPARQL statements 
> into triples, is not really usable for the masses. It may be as simple 
> as adding SPIN-like SPARQL statements into Turtle, ie, extending the 
> syntax in that direction, but there might be some complications on the 
> way that I do not see now.

I agree that the SPIN RDF syntax is putting some people off, because it 
indeed requires tooling to edit. But this is similar to OWL class 
expressions (intersections etc) or SWRL that very few people would want 
to edit by hand. Furthermore, the RDF syntax does have advantages when 
you need to properly identify references to properties, for renaming 
etc. Another obvious advantage is that the RDF syntax is independent of 
namespace prefix declarations. I did not encourage a pure text syntax 
because I wanted to see if we can get by without having to support too 
many different modes at the same time and thus further increase the cost 
of adoption and implementations.

Anyway, not sure how off-topic this is here, but I think it would be 
easy to allow textual syntax as an alternative to the SPIN RDF syntax. 
Some options that I could think of quickly are:

1) Allow spin:rule etc to point to literals, e.g.

         spin:constraint "ASK WHERE { ?this ex:age ?age . FILTER (?age < 
18)  }"^^xsd:string

1b) This could be further clarified by introducing a new datatype

         spin:constraint "ASK WHERE { ?this ex:age ?age . FILTER (?age < 
18)  }"^^sp:askQueryString

2) Allow the blank node to contain the sp:text. sp:text is already 
supported by the SPIN spec in cases where people want to store the 
verbatim text alongside the RDF syntax, for example to preserve special 
cases of indentation, # comments etc:

         spin:constraint [ a sp:Ask ; sp:text "ASK WHERE { ?this ex:age 
?age . FILTER (?age < 18)  }" ]

3) Introduce another property

         spin:constraintText "ASK WHERE { ?this ex:age ?age . FILTER 
(?age < 18)  }"

I am sure there are other options. If anyone here has specific 
suggestions and if we agree that these would extend the reach of SPIN 
without dividing the community too much, then I am sure these are low 
hanging fruits that we can start to support quickly.


PS: thanks, Martin, for the cc.
Received on Thursday, 10 January 2013 23:43:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:48:52 UTC