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

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.

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

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

     ex:Adult
         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:

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

3) Introduce another property

     ex:Adult
         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.

Thanks
Holger

PS: thanks, Martin, for the cc.

Received on Thursday, 10 January 2013 23:43:02 UTC