Dear users,
for those interested in SPIN, I would like to get feedback on a small
internal change with potentially large implications.
Many people over the years (most recently [1]) have suggested that the
SPIN RDF syntax (representing SPARQL in RDF) is too hard to use in
conjunction with text editors and puts unnecessary obstacles in the way
of implementors.
What I'd like to add is some flexibility that makes the SPIN RDF syntax
no longer mandatory to encode SPIN rules, constraints, functions etc.
Here is how the pure textual SPIN syntax would look like
ss:Rectangle
spin:rule [
rdf:type sp:Construct ;
sp:text """
# Computes area := width * height
CONSTRUCT {
?this ss:area ?area .
}
WHERE {
?this ss:width ?width .
?this ss:height ?height .
BIND ((?width * ?height) AS ?area) .
}
"""^^xsd:string ;
] ;
In other words, the SPARQL query is embedded as entered into the file
and more easy to read for people examining the Turtle source code.
Another example, this time with an even more compact single-line string:
ss:Square
rdf:type rdfs:Class ;
spin:constraint [
rdf:type sp:Ask ;
sp:text "ASK WHERE { ?this ss:width ?width . ?this ss:height
?height . FILTER (?width != ?height) . }"
] ;
rdfs:label "Square"^^xsd:string ;
rdfs:subClassOf ss:Rectangle .
sp:text was already supported since the beginning, so the only change
that I want to make is to remove the need to use the RDF syntax if
sp:text is present. I expect that for most people who use SPIN through
TopBraid, the RDF syntax will remain the preferred storage mechanism,
because it does have several advantages:
- allows structural analysis and walking through the RDF graph
- makes it easier to find references to properties etc
- usages of properties and resources within queries get automatically
renamed
- no need to ever worry about prefixes
With those changes I hope to attract more external users and
implementations that will eventually grow the size of the SPIN community.
Feedback welcome.
Thanks,
Holger
[1] http://lists.w3.org/Archives/Public/public-vocabs/2013Jan/0079.html
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en