Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Simple string literal is not equal to typed literal with type xsd:string #168

@rpuch

Description

@rpuch

First, I insert 2 triples to Blazegraph 2.1.5:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

insert data {
  <http://s> <http://untyped> 'abc' .
  <http://s> <http://typed> 'abc'^^xsd:string .
}

Their object has the same value, but in the first triple it's simple (untyped) and in the second it is explicitly typed as xsd:string.

Then, the following query only finds the first triple:

select * where { ?s ?p 'abc' }

And the following query only finds the second triple:

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

select * where { ?s ?p 'abc'^^xsd:string }

So Blazegraph distinguishes between 'abc' and 'abc'^^xsd:string. But the SPARQL Specification 1.1 (Section 3.3 Literals) https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal says the following:

Simple literals are syntactic sugar for abstract syntax literals with the datatype IRI http://www.w3.org/2001/XMLSchema#string

So either Blazegraph violates SPARQL 1.1, or it does not support SPARQL 1.1, or I misinterpret the specification.

Could you please help me figure out what is the correct answer? :)

Some context https://stackoverflow.com/questions/62771044/jena-fuseki-and-blazegraph-behave-differently-with-respect-to-type-strictness

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions