- From: Toby Inkster <tai@g5n.co.uk>
- Date: Tue, 16 Mar 2010 19:17:56 +0000
- To: martin@weborganics.co.uk
- Cc: RDFa WG <public-rdfa-wg@w3.org>
On Tue, 2010-03-16 at 14:38 +0000, Martin McEvoy wrote:
> With all the above in mind, RDFa could I think re-use an attribute
> name that already exists in htm5, microdata to be more precise
> "itemtype"[1]. RDFa could be used pretty much like microdata eg:
>
> <div itemtype="http://www.w3.org/2006/vcard/ns#" about="#BusinessEntity"
> typeof="VCard">
> <div property="fn">L'Amourita Pizza</div>
> <div rel="adr">
> <div typeof="Address">
> <span property="street-address">2040 Any Street</span>,
> <span property="locality">Springfield</span>,
> <span property="postal-code">98102</span>.
> Tel: <span property="tel">206-555-7242</span>.
> <span rel="url" resource="http://pizza.example.com/"></span>
> </div>
> </div>
> </div>
I like the general idea, but how about reusing typeof instead:
<div typeof="http://www.w3.org/2006/vcard/ns#VCard" about="#BusinessEntity">
<div property="fn">L'Amourita Pizza</div>
<div rel="adr">
<div typeof="Address">
<span property="street-address">2040 Any Street</span>,
<span property="locality">Springfield</span>,
<span property="postal-code">98102</span>.
</div>
</div>
Tel: <span property="tel">206-555-7242</span>.
<span rel="url" resource="http://pizza.example.com/"></span>
</div>
This should be pretty easy to make workable: whenever typeof contains a
full URI (CURIE versus URI can be determined by checking whether
xmlns:http has been declared yet), then it sets the default prefix (by
trimming back to the last non-QName character - in the example above
'#') for unprefixed tokens. In the case where typeof contains multiple
tokens (space-separated), then the first one wins.
This may well be more author-friendly than external profiles; plus it's
going to make parsing a bit faster, not needing to dereference external
files.
--
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
Received on Tuesday, 16 March 2010 19:18:37 UTC