When to use sp:as?

13 views
Skip to first unread message

Mark Hale

unread,
Sep 12, 2015, 5:53:47 AM9/12/15
to TopBraid Suite Users
Hi all,

In the sp spec http://spinrdf.org/sp.html it mentions using sp:as in select clauses (section 4.2). There is no example, but it seems like it would look like this:

[ 
      sp:as [ sp:varName "result"^^xsd:string ] ;
      a       sp:Count ;
      sp:expression [
sp:varName "object"^^xsd:string ;
] ;
]

On the other-hand the spl rdf file makes no use of sp:as and instead uses an alternative notation:

          [
            sp:expression [
                rdf:type sp:Count ;
                sp:expression [
                    sp:varName "object"^^xsd:string ;
                  ] ;
              ] ;
            sp:varName "result"^^xsd:string ;
          ]

Which should I be using?


Holger Knublauch

unread,
Sep 13, 2015, 8:13:38 PM9/13/15
to topbrai...@googlegroups.com
Hi Mark,

the spec is indeed ambiguous on this, and my recommendation would be to use whatever convention the SPIN API uses, because it is very unlikely that I'd introduce a change that would break deployed SPIN RDF files. This also makes it easier to generate SPIN RDF triples - just enter them in TBC and look at the produced source code.

I believe in the original design I was handling aggregations differently from other projection expressions such as SELECT (1 + 2 AS ?result) while in fact they should be treated uniformly. The sp:varName solution does just that and should be preferred over sp:as. I have dropped sp:as from the spec at spinrdf.org for now.

Thanks for pointing this out!
Holger
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages