Search code examples
rdfturtle-rdf

Can a .ttl Turtle file have two empty prefixes?


It it possible to have a Turtle file with two empty prefixes?

Imagine that we have a .ttl file with this prefixes declaration:

@prefix : <http://www.example.com/example#> .
@prefix ex2: <http://www.ex2.com/ex2#> .
@prefix ex3: <http://www.ex3.com/ex3#> .
@prefix : <http://www.empty.com/empty#> .
...

Where do all the empty prefixes will be resolved: http://www.example.com/example# or http://www.empty.com/empty#?


Solution

  • The specification defines it as a mapping Map[prefix -> IRI] so, no, you cannot have two for the same prefix (including the empty prefix).