W3C home > Mailing lists > Public > public-rdf-comments@w3.org > September 2012

Unsetting @base and @prefix

From: Stephen Allen <sallen@apache.org>
Date: Mon, 17 Sep 2012 11:04:11 -0700
Message-ID: <CAPTxtVOvdssTMQyyHOGUi42Kw1_eM5VShTmz=52Nut82PMbjWA@mail.gmail.com>
To: public-rdf-comments@w3.org
RDF Working Group,

I apologize for not getting this comment out before the 15th.
Hopefully it is not too late for consideration.

I have a concern about the @base and @prefix features of IRI
construction.  I like that you can set these and re-map them at any
point.  However, there doesn't appear to be a way to unset them.  This
seems like it could lead to silent creation of incorrect data when you
would actually want a parsing error.

An example would be if you were using text tools to concatenate turtle
files together [1].  If the files were unrelated, you would want to
ensure they are not inadvertently sharing prefixes or base IRIs if one
of the files is internally invalid (referring to an undefined prefix
that just happens to be defined in an earlier file).

A proposed syntax for unsetting base IRI and prefix state:

    @base .      # Unsets base URI
    @prefix .     # Unsets all prefixes
    @prefix ex:  # Unsets the ex: prefix

Thanks for your time!


[1] Sample bash script to concatenate Turtle files:

#!/usr/bin/env bash
for file in *.ttl; do
  cat $file >> out.ttl
  echo -e "\n @base . @prefix . \n" >> out.ttl
Received on Monday, 17 September 2012 18:05:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:54 UTC