Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Information Provided
-
None
-
None
-
None
Description
TDB1 converts small xsd:long literals, e.g. "1"^<xsd:long> to xsd:integer. This behavior is specific to TDB1. Even though that might be acceptable in most cases, it breaks validation of SHACL {{ sh:dataType xsd:long ;}} constraints. The following test demonstrates the issue:
@Test public void longLiterals() { DatasetGraph dsg = TDBFactory.createDatasetGraph(); Quad quad1 = SSE.parseQuad("(quad <g> <s> <p> \"1\"^^<http://www.w3.org/2001/XMLSchema#long>)"); assertEquals(XSDDatatype.XSDlong, quad1.getObject().getLiteralDatatype()); dsg.add(quad1); Quad quad2 = dsg.find().next(); assertEquals(XSDDatatype.XSDlong, quad2.getObject().getLiteralDatatype()); }