Hopefully the last installment on this thread.  Holger reminded me
that I should look closer at the Help files to discover that
spl:isUntypedLiteral is a SPIN function implemented in SPARQL.
Therefore, you can find untyped literals in SPARQL alone:

ASK WHERE {
    FILTER (isLiteral(?arg1) && (!sameTerm(?arg1, xsd:string(?
arg1)))) .
}

...and this is how spl:isUntypedLiteral is implemented.  Thanks
Holger!

-- Scott

On Jan 4, 12:16 pm, Scott Henninger <[email protected]>
wrote:
> Paul; Note that using SPARQL it's not possible to distinguish between
> untyped literals and xsd:string literals.  The TBS SPARQL Function
> spl:isUntypedLiteral checks whether a given literal is untyped and can
> be used to test for whether a string is untyped or not.
>
> -- Scott
>
> On Jan 4, 9:40 am, Scott Henninger <[email protected]> wrote:
>
> > Paul; Returning xsd:string for a "simple literal" is part of the
> > SPARQL standard for datatype().  
> > Seehttp://www.w3.org/TR/rdf-sparql-query/#func-datatype
>
> > Also note that your two values for "Hasselt" are seen as equivalent by
> > SPARQL expressions.  I.e.:
> >   FILTER (?city = "Hasselt"^^xsd:string)
> > ...or
> >   FILTER (?city = "Hasselt")
>
> > ...will match both values.  The latter of the two is interesting, as
> > it show that untyped ("simple") literals are always returned as a
> > xsd:string.
>
> > -- Scott
>
> > On Jan 4, 8:19 am, PaulZH <[email protected]> wrote:
>
> > > Having for a lot of subjects for a certain property 2 values
>
> > > <x>  pcce:city "Hasselt"
> > > <x>  pcce:city "Hasselt"^^xsd:string
>
> > > One indicated in the TBC interface as untyped literal, the other as an
> > > xsd:string.
>
> > > I thought I could use a filter
> > >  ?a pcce:city ?city.
> > >  FILTER (datatype(?city) = xsd:string)
> > > But this doesn't seem to make the distinction between the two.
>
> > > And indeed, when I use
> > >   LET (?type := datatype (?city)) all types appear as xsd:string.
>
> > > The range of property pcce:city has not been set.
>
> > > Any input on what I'm missing.

-- 
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
[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

Reply via email to