"fre"^^euvoc:ISO_639_2B is not the same as "fre"^^euvoc:ISO_639_2A
#3 BIND ( euvoc:ISO_639_2B("fre") AS ?n )
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/cbacd974-020d-4720-9585-806c1e320143%40googlegroups.com.
Yes, the key limitation to using custom datatypes is that SPARQL query engines will not understand how to compare values of such types. The specification only defines the precise meaning of a literal when the datatype IRI is one of the standard, pre-defined datatypes. Any operations on custom datatypes are implementation specific.Literals in RDF have datatypes and language tags. In this particular case, for languages, why not use the traditional approach of language tags? In EDG, you would then be able to query for “fre” irrespective of the language. And if you want to limit it to a specific language, you could do it as well.
Coming back to datatypes, any matching is datatype sensitive. So, if you are querying for n = 1, it matters whether 1 is an integer or a string.
Thus two literals (“1”, xsd:int) and (“1”, xsd:decimal) will test as the same but neither will test as the same as (“1”, xsd:string).
Similarly, with custom datatypes.
"fre"^^euvoc:ISO_639_2B is not the same as "fre"^^euvoc:ISO_639_2A
You can read a bit more on Jena’s handling of custom datatypes:https://jena.apache.org/documentation/notes/typed-literals.html.
With respect to the BIND statement #3 (below), it will result in ?n being unbound unless euvoc:ISO_639_2B is a function. As I understand it, it is not a function, but just a plain predicate. How did you expect it to work?
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/01282D53-71C5-406E-B71F-B0A56F1ABDBB%40topquadrant.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/17D27120-E7A5-4F6A-BB40-B6E01E2D69DA%40topquadrant.com.
Thanks, spif:cast and of course STRDT are very useful!
Never used these.
The alternative being the more verbose [1].
Thanks again, -j
[1]
#DATA
:FRA a skos Concept;
skos:notation “fre”^^euvoc:ISO_639_2B
.
#QUERY
SELECT *
WHERE {
BIND ( "fre"^^xsd:string AS ?incoming )
?c a skos:Concept .
?c skos:notation ?n
BIND ( xsd:string(?n) AS ?n_as_string )
FILTER ( ?incoming = ?n_as_string )
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/17D27120-E7A5-4F6A-BB40-B6E01E2D69DA%40topquadrant.com.