This is how the SPARQL specification does basic graph pattern matching.
Only variables act as wildcards, RDF Terms must match exactly.

So "home" only matches the literal "home", it is not considered to be
equal to "home"@en-us or any other language tagged or data typed literal.

If you want to match regardless of language tag then you will need to use
a variable and then a FILTER like so:

SELECT *
WHERE
{
  ?Version cnt:il8nslug ?slug .
  FILTER(SAMETERM(STR(?slug), "home"))
}

Rob

On 29/10/2013 09:27, "Bardo Nelgen"
<[email protected]> wrote:

>Hello,
>
>this time I'm asking for help with a (to meŠ) seemingly strange SPARQL
>matching behavior:
>
>When trying to match a statement using a language tag, something like
>
><cnt:versionedContent
>rdf:about="http://resources.semaworx.eu/timed/version#versioncrediblyuniqu
>eid001">
><cnt:i18nslug xml:lang="en-us">home</cnt:i18nslug>
></cnt:versionedContent>
>
>this works quite well with
>
>?Version cnt:i18nslug "home"@en-us .
>
>Though, now, when I target a broader match with
>
>?Version cnt:i18nslug "home" .
>
>(intending to match *any* ?Version having a cnt:i18nslug named "home",
>regardless of the language/locale used) it unfortunately does *not*
>match *any* of the respective statements.
>
>So: Why does leaving away the language tag in the query obviously imply,
>the result *must not* have one, rather than just ignoring the existing
>one(s)?
>
>And: How can this effect be avoided?
>
>As always, every hint is highly appreciated.
>
>Greets,
>
>Bardo
>
>




Reply via email to