You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are just differences between the parsers for Jena. (currently, RDF4J is on hold because of a dotty issue scala/scala3#16408, but it is unlikely that it gives us more uniformity )
There may be ways the behaviour could be tuned, but the best way to tune it is unclear.
The problem is that our tests try to deserialise the resulting relative graph strings with a different base. Given the above, this results in very different graphs. The idea was to test what happens if one moves a graph with relative URLs to a different base. But the publisher URL remains the same in the RDF/XML case, whereas that changes in the other two serialisations. Furthermore, in the json-ld case, the new base would have to ensure it is at least three levels deep to allow the reference ../../../ to refer to something. The Turtle root / would not need that.
The text was updated successfully, but these errors were encountered:
bblfish
changed the title
parsers/serialisers behave differently when given a base
serious divergence in output between serialisers given a base
Feb 27, 2023
bblfish
changed the title
serious divergence in output between serialisers given a base
serialisers output diverge given a base
Feb 27, 2023
The simplest way to fix these failing tests is to use the same base for deserialising the serialised content as was used for serialising it.
The above shows that doing anything else is way more complicated than initially thought. If someone needs such advanced behaviour they could write a function to change each URL in a graph to a relative URL according to their needs, and then serialising the resulting relative graph.
Different serialisers give very different results when given a base.
This shows up in inconsistent results returned by SerialisationTestSuite "graphs with relative URIs" tests.
The reference graph consists of the three triples
Call the graph consisting of those triples
referenceGraph
.Writing it out to a string with the following base
gives very different results depending on the serialisers.
The Jena Turtle Serialiser refers to the publisher using the relative URL
/
The Jena Json-LD serialized (Titanium) refers to the publisher using the
path relative URL
../../../
and using the Jena RDF/XML serialisation, the publisher is referred to by its absolute URL.
These are just differences between the parsers for Jena. (currently, RDF4J is on hold because of a dotty issue scala/scala3#16408, but it is unlikely that it gives us more uniformity )
There may be ways the behaviour could be tuned, but the best way to tune it is unclear.
The problem is that our tests try to deserialise the resulting relative graph strings with a different base. Given the above, this results in very different graphs. The idea was to test what happens if one moves a graph with relative URLs to a different base. But the publisher URL remains the same in the RDF/XML case, whereas that changes in the other two serialisations. Furthermore, in the json-ld case, the new base would have to ensure it is at least three levels deep to allow the reference
../../../
to refer to something. The Turtle root/
would not need that.The text was updated successfully, but these errors were encountered: