Re: Consensus on alternate prefixing mechanism

On 2 May 2009, at 18:16, Manu Sporny wrote:

> prefix="DEFAULT_PREFIX=http://example.org/vocab/foo#"


How about, instead of DEFAULT_PREFIX, an asterisk? Many people will  
be familiar with this as representing a 'wildcard', so it makes sense  
to use it to mean roughly "everything else comes from this vocabulary".

Now, here's an interesting thought... CURIEs have the syntax:

	[ [ prefix ] ':' ] reference

Now, assuming that RDFa allows a default prefix to be defined (the  
current version does not), then CURIEs consisting of just a reference  
are allowed. The reference part is defined as syntactically  
equivalent to irelative-ref as defined by RFC 3987. In particular,  
irelative-refs may contain colons. Therefore if a default prefix is  
defined, something like 'foaf:Person' becomes a valid CURIE even  
without defining the 'foaf' prefix.

e.g.

	<div prefix="*=http://example.com/"
	     about="[me]"
	     typeof="foaf:Person"></div>

will result in the following RDF triple:

	<http://example.com/me> a <http://example.com/foaf:Person>

which is perhaps counter-intuitive. Further, the result of this:

	<div prefix="   *=http://example.com/
	             foaf=http://xmlns.com/foaf/0.1/"
	     about="[me]"
	     typeof="foaf:Person"></div>

actually becomes ambiguous!

For this reason I recommend CURIE Syntax 1.0 be revised to recommend  
that any host languages which provide a default prefix or provide a  
mechanism for setting a default prefix, must also forbid the  
reference part of the CURIE to contain a colon.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Saturday, 2 May 2009 17:47:52 UTC