W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] Why CURIE prefixes? (was: Re: Micro-data/Microformats/RDFa InteroperabilityRequirement)

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Thu, 07 May 2009 23:03:30 -0400
Message-ID: <4A03A102.7060109@digitalbazaar.com>
Kristof Zelechovski wrote:
> The main problem with prefixes is that the meaning of prefixes is not
> preserved when a code fragment is pasted elsewhere, so that prefixed names
> can end up meaningless or having an entirely different meaning from what the
> author had intended. 

The problem isn't with prefixes, it is with any mechanism that relies on
a remote declaration mechanism. For example:

1. If you cut/paste HTML that uses CSS extensively without copying the
stylesheet information or the necessary outer <div>/<span>s, the markup
will have an entirely different rendering.

2. If you cut/paste half of a table, or half of a list, it will have an
entirely different meaning than the originating markup.

3. If you cut/paste Javascript code without importing the proper base
libraries, it will have an entirely different effect than the original code.

These are problems that we have in HTML4 and will continue to have in
HTML5. However, the fact that these problems exist and will continue to
exist didn't stop us from adopting the technologies anyway. It is the
nature of the solution for the requirement.

The reason that we have prefixes is because the ability to extend
vocabularies in a decentralized manner was a requirement when creating
RDFa (as it is now for micro-data in HTML5). The alternatives are:

1. Using full URIs to express predicates (which is very error prone, but
is something that we're still exploring), or
2. Hard coding predicate values via a centralized mechanism, which is
very restrictive and not scalable.

If anybody has any other ideas on how to approach this requirement, it
would be great to hear them. :)

> A similar problem arises with DTD entities (indeed,
> DTD entities could be used instead of prefixes).

We looked at that - many people seem to hate DTDs these days, and it
would require a new DTD for every new vocabulary defined (which could be
in the thousands).

-- manu

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: A Collaborative Distribution Model for Music
http://blog.digitalbazaar.com/2009/04/04/collaborative-music-model/
Received on Thursday, 7 May 2009 20:03:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:49 UTC