[whatwg] RDFa Features

Kristof Zelechovski wrote:
> Has anyone considered having an URI in an entity in order to avoid typing it
> over and over?
> e.g.
> <!DOCTYPE html
> <!ENTITY myVocab "http://www.example.com/vocab/" >
> And later
> Property="&myVocab;myPred"?

Yes, we did discuss this at great length in the RDFa community and to a
lesser extent in the Microformats community. The Microformats community
decided to not use namespaces at all, and the RDFa community ended up
using CURIEs for URI expression. RDFa specifically did not choose QNames
for the following reasons:

1. We believe QNames should not be used in attribute values.
2. QNames are really restrictive in what can be used as a "reference".
3. Qnames do not expand to URIs, they map to a tuple and RDFa (and many
   other approaches that use URIs as resources) need things to map to
   URIs.

The CURIE spec, which is a really cool solution to the problem of
compact URI expression in all HTML family languages, explains these
points in more detail:

http://www.w3.org/MarkUp/2008/ED-curie-20080617/

To answer your question more directly, there were several issues with
the ENTITY approach for defining prefixes:

1. The markup is ugly and would be difficult for most regular web folks
   to grasp. Not many people that modify web pages have to deal with
   entity declarations, or using entities outside of the &lt; &gt:
   realm. This would harm adoption.
2. It is becoming more and more common, when using online blogging,
   CMSes, and publishing software that you don't have access to the
   entire HTML document as you edit it. The @xmlns:NAMESPACE and @prefix
   approach takes this limitation into account. It allows one to do the
   following:

   ...JANE'S BLOG POST...
   ...BOB'S BLOG POST...
   ...MY BLOG POST

   <div xmlns:foaf="http://xmlns.com/foaf/0.1/" about="#me">
      This is my blog entry. My name is
      <span property="foaf:name">K?i?tof ?elechovski</span>.
   </div>

   ...END MY BLOG POST...
   Keep in mind that we still must modify the systems described above to
   not strip out RDFa attributes from elements, but that work is merely
   a small code change to the HTML processing code in most publishing
   platforms.
3. We needed a solution that would map cleanly to non-XML family
   languages. In hindsight, we should have picked @prefix instead of
   @xmlns to define prefixes, but that ended up going through. We're
   looking at alternative mechanisms, such as having a @prefix
   attribute, to declare prefixes in RDFa 1.1.

-- manu

-- 
Manu Sporny
President/CEO - Digital Bazaar, Inc.
blog: Bitmunk 3.0 Website Launches
http://blog.digitalbazaar.com/2008/07/03/bitmunk-3-website-launches

Received on Wednesday, 27 August 2008 10:18:20 UTC