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

Manu Sporny msporny at digitalbazaar.com
Thu May 7 20:03:30 PDT 2009


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/




More information about the whatwg mailing list