SPARQL 1.1 SUBSTR function syntax

2,018 views
Skip to first unread message

PaulZH

unread,
Jan 10, 2012, 5:22:18 AM1/10/12
to TopBraid Suite Users
TBCME 3.5.2

Following query
CONSTRUCT { <> dcterms:date ?date.}
WHERE {
BIND (xsd:string(now()) AS ?now)
BIND (SUBSTR(?now,1,10) AS ?date)
}

gives error
Encountered "(""(" at line 4, column 15. Was expecting regex.

The query works in Sesame and SPARQLer (ARQ).

Bob DuCharme

unread,
Jan 10, 2012, 9:22:12 AM1/10/12
to topbrai...@googlegroups.com
Hi Paul,

It works with ARQ 2.8.8, but not with ARQ 2.8.7, so it looks like it's one of the more recent SPARQL 1.1 functions to be supported there. Until TopBraid includes 2.8.8, fn:substring() works in your example. 

Bob




--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
topbrai...@googlegroups.com
To unsubscribe from this group, send email to
topbraid-user...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

PaulZH

unread,
Jan 10, 2012, 10:08:17 AM1/10/12
to TopBraid Suite Users
Thanks, Bob.

On Jan 10, 3:22 pm, Bob DuCharme <bducha...@topquadrant.com> wrote:
> Hi Paul,
>
> It works with ARQ 2.8.8, but not with ARQ 2.8.7, so it looks like it's one
> of the more recent SPARQL 1.1 functions to be supported there. Until
> TopBraid includes 2.8.8, fn:substring() works in your example.
>
> Bob
>

Scott Henninger

unread,
Jan 10, 2012, 10:28:49 AM1/10/12
to TopBraid Suite Users
Paul; In the meanwhile you can use fn:substring, which will give you
the same results.

SPARQL 1.1 is in its last call and therefore we may soon see
stabilization of the query language, update, etc. In terms of the
query language, the latest draft, January 5, 2012, includes STRBEFORE,
STRAFTER, REPLACE and a few other syntax changes. So it is still a
work in progress.

In light of these circumstances, we will evaluate whether to move to a
later version of ARQ for TBS 3.6 or wait until the SPARQL standard has
been released as a recommendation. We will keep users of the forum
apprised as we proceed.

-- Scott
Reply all
Reply to author
Forward
0 new messages