W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > March 2009

Prefixes fail-safe registry thoughts

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Tue, 03 Mar 2009 10:22:44 -0500
Message-ID: <49AD4B44.6030207@digitalbazaar.com>
To: RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
CC: Henri Sivonen <hsivonen@iki.fi>, Ian Hickson <ian@hixie.ch>
What follows are some thoughts about addressing some of the criticisms
that have been raised about prefix. Specifically, those criticisms have
been:

- Web authors don't understand indirection and will inevitably fail to
  include prefixes in their markup.
- Prefixes are fragile under cut-paste scenarios.

Henri has proposed that we get rid of CURIEs entirely and use URIs
instead. This has a number of down-sides, authoring difficulty being the
biggest issue. The thoughts about CURIEs are summarized on the RDFa
wiki[1]. I believe that the RDFa TF currently does not think that this
is an acceptable solution because of the reasons listed in [1]. Henri
has also noted a technical issue with xmlns: in XOM.

A number of people have proposed that instead of declaring prefixes
using @prefix or via @profile, that a global registry is created for
prefix declarations. The registry document must be fetched in order to
understand the prefix mapping. The issues associated with this approach
are listed on the rdfa wiki[2].

The biggest issue that the RDFa TF is interested in not creating is a
backward-compatibility nightmare. If RDFa is parsed differently in HTML5
vs. XHTML1.1, the parser code will require a number of really nasty
if(xhtml_flag), if(!html5) branches. Henri has noted this as an issue as
well.

The biggest issue that Ian and Henri seem to have is that prefixes are
fragile, and that they would like to not use indirection if it is at all
possible.

So, here's something that may make both the RDFa TF and the HTML5 folks
happy:

- The current RDFa parsing rules don't change for XHTML. In addition,
  only @prefix should be used in HTML5/XHTML5. This should make the RDFa
  TF happy.
- If a parser detects an undefined prefix, it MAY load a prefix mapping
  document located at this URL:
     http://purl.org/rdf-prefixes/well-known-prefixes
  The document could be generated from the list defined at
  http://prefix.cc/ - perhaps, prefix.cc could be used as the definitive
  list? This will hopefully make the anti-prefix/anti-indirection people
  happy.

The prefix mapping document would only be required when prefix errors
are detected, basically, any time that you try to resolve a prefix and
can't do so in the RDFa parser.

RDFa-lint-like tools should complain very loudly when this happens and
suggest that the prefix should be defined in the (X)HTML document,
showing exactly which markup should be used such that it can be cut and
pasted into the (X)HTML document.

The benefits of this proposal include:

- The RDFa language only needs one change, the addition of @prefix,
  which is one that we've been talking about making for some time.
- Even if indirection is an issue for web authors, triples will still be
  generated.

This would hopefully create an active barrier against RDFa/CURIE prefix
mis-use/mis-understanding while keeping the RDFa syntax the same. Thoughts?

-- manu

[1]http://rdfa.info/wiki/Developer-faq#Why_does_RDFa_use_CURIEs.3F
[2]http://rdfa.info/wiki/Developer-faq#Why_doesn.27t_RDFa_use_keywords_with_a_central_registry_instead_of_URIs_for_prefixes.3F

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
Scaling Web Services past 100,000 Simultaneous Connections
http://blog.digitalbazaar.com/2008/09/30/scaling-webservices-part-1
Received on Tuesday, 3 March 2009 15:23:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:31 UTC