Re: RDFa in HTML 4

On 17 Jul 2008, at 23:00, Manu Sporny wrote:

> The issue with the RFC-2731 approach, unless I'm missing something, is
> that it doesn't allow multiple scoped prefix definitions. Take the
> following example:
>
>     <div xmlns:dcterms="http://purl.org/dc/terms/"
>          xmlns:audio="http://purl.org/media/audio#"
>          about="#welcome-to-the-jungle" typeof="audio:Recording">
>        <span property="dcterms:title">Welcome to the Jungle</span>
>     </div>
>
> How would we accomplish doing that with the RFC-2731 approach?

My suggestion, and bear in mind that I haven't implemented this yet,  
is that we allow something like:

     <link about="#node-wttj" rel="schema.dct"
         href="http://purl.org/dc/terms/">
     <link about="#node-wttj" rel="schema.audio"
         href="http://purl.org/media/audio#">
     [...]
     <div id="node-wttj"
          about="#welcome-to-the-jungle" typeof="audio:Recording">
        <span property="dcterms:title">Welcome to the Jungle</span>
     </div>

One advantage of xmlns attributes over RFC 2731 is that they allow  
the CURIE prefixes to be defined near to the node where they're used.  
Extending RFC 2731 slightly further we get:

     <span about="#node-wttj" rel="schema.dct"
         resource="http://purl.org/dc/terms/"></span>
     <span about="#node-wttj" rel="schema.audio"
         resource="http://purl.org/media/audio#"></span>
     <div id="node-wttj"
          about="#welcome-to-the-jungle" typeof="audio:Recording">
        <span property="dcterms:title">Welcome to the Jungle</span>
     </div>

The limitation here to fit (largely) into the existing RDFa parsing  
pattern is that the element which defines a CURIE prefix must be  
encountered prior to the element which uses the CURIE prefix.

Another method could be to repurpose @profile, using a SafeCURIE-like  
syntax:

<head profile="http://www.w3.org/1999/xhtml/vocab
     [dcterms:http://purl.org/dc/terms/]
     [audio:http://purl.org/media/audio#]">

which could be extended to be valid on all elements (much like @rel/ 
@rev were).

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

Received on Thursday, 17 July 2008 22:39:46 UTC