Simon; Perhaps afn:localname() is what you are looking for?  You can
find a library with this and other SPARQL functions at Help >
Reference > SPARQLMotion Functions reference.

-- Scott

On Sep 19, 6:31 am, Simon Cox <dr.shorth...@gmail.com> wrote:
> I need to extract the trailing field of a URI to use as text.
> First it is necessary to cast the URI to text, for which STR() seems to be
> the thing.
> Then SPARQL 1.1 STRAFTER() would be ideal, but does not appear to be
> supported by TopBraid yet.
> So I'm trying to do something with tops:split.
> This is how far I've got:
>
> SELECT *
> WHERE {
>     ?subject a owl:Class .
>     BIND ( str(?subject) AS ?c)
>     ?cc tops:split ( ?c "#" )
>
> }
>
> However, I'm getting only an apparently random subset of the expected
> results, and the following error
>
> com.hp.hpl.jena.graph.Node$NotLiteral: ?c is not a literal node
>     at com.hp.hpl.jena.graph.Node.getLiteralLexicalForm(Node.java:165)
>     at
> org.topbraid.spin.functions.internal.magic.SplitPFunction.exec(SplitPFunction.java:52)
>     at
> com.hp.hpl.jena.sparql.pfunction.PropertyFunctionBase$RepeatApplyIteratorPF.nextStage(PropertyFunctionBase.java:94)
>     at
> com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:91)
>
> (lots more in the trace, but I guess these are the important lines. )
>
> Is it me or is it TopBraid?

-- 
-- 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
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en


Reply via email to