linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
564 stars 143 forks source link

Turtle serializer : no whitespace between colon and dot when a prefixed symbol has no local name #542

Closed pduchesne closed 2 years ago

pduchesne commented 2 years ago

If a prefixed symbol is a statement's object and has no local name, it results in a colon immediately followed by a dot, e.g. example:subject example:pred example:. In particular, the automatic prefix production of the turtle serializer produces such outputs if a symbol has a trailing slash.

While this is syntactically valid as per the turtle grammar, some other tools do not handle this well (e.g. RDFLib/rdflib , cf RDFLib/rdflib#1664) and require a whitespace between the colon and the dot. In the sake of cross-ecosystems interoperability, fixing this would be an easy win.