rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Support `PREFIX` directives in turtle parsers.

Open damooo opened this issue 1 year ago • 1 comments

Currently turtle parsers seems doesn't take PREFIX case-insensitive sparql-like directives, which are supported by turtle syntax since 2014. It would be highly valuble for their support to handle turtle from wild.

damooo avatar Nov 12 '23 10:11 damooo

Important for implementation —

  • @prefix (with @) declarations ARE case sensitive.
  • PREFIX (without @) declarations ARE NOT case sensitive.

From the Turtle 1.1 spec

The Turtle language originally permitted only the syntax including the '@' character for writing prefix and base directives. The case-insensitive 'PREFIX' and 'BASE' forms were added to align Turtle's syntax with that of SPARQL.

TallTed avatar Nov 13 '23 15:11 TallTed