RDFa generalization - expressing Microformats

Hey guys,

Shane and I talked a bit about a general mechanism of extending the
default prefix mapping in RDFa:

http://www.rdfa.info/wiki/RDFa_Profiles

Here's the conversation we just had:

[21:17:09] Shane McCarron: did you look at my stuff about profile support?
[21:17:44] Manu Sporny: yeah, I like it.
[21:18:00] … We can list multiple URIs in the attribute, right?
[21:18:06] Shane McCarron: yes
[21:18:27] Manu Sporny: So that would allow you to include Microformats
and MicrofooXYZ support in the same document, which is nice.
[21:18:46] Shane McCarron: exactly.
[21:19:36] Manu Sporny: also like the "<link rel="profile" ..." stuff
[21:20:04] Shane McCarron: I thoguht my use of RDFa to express the
triples was clever.  I might start to grok this stuff
[21:20:31] Manu Sporny: yes, it is definitely neat.
[21:20:48] … I think that it would also be a deal-killer for the
Microformats community.
[21:20:59] Shane McCarron: deal killer?
[21:20:59] Manu Sporny: They'd want to use XMDP, probably.
[21:21:17] Shane McCarron: what the hell is XMDP?
[21:21:20] Manu Sporny: Meaning that they don't want to use RDFa at all.
[21:21:37] … XMDP is a "standard" that Microformats use to define
vocabularies.
[21:21:43] … one sec, I'll find a link.
[21:21:53] Shane McCarron: oh... well... hGRDDL to transform their stuff
into RDF
[21:22:08] … oh - and I am not trying to define the vocab.  Just the
prefix mappings.
[21:22:22] Manu Sporny: http://gmpg.org/xmdp/description
[21:22:44] … oh right - I forgot.
[21:22:45] … nevermind.
[21:24:02] … how do you specify the default prefix mapping?
[21:24:09] … That's the most important thing...
[21:24:27] Shane McCarron: lol... you cannot.  we dont permit it to be
changed in RDFa
[21:24:38] Manu Sporny: yeah, see... that's the issue.
[21:24:50] … and that's what's going to be the major push-back from the
Microformats community.
[21:25:03] … so, forget about changing the default prefix mapping.
[21:25:44] … could we provide functionality to have an "additional
prefix mapping space" - meaning that there are additional, non-prefixed
terms that you can specify in a separate file, other than rel="next",
rel="license", etc.?
[21:26:31] … That's really what we need, 'cause the second we start
waving anything that looks like a namespace in that community's general
direction, they're going to freak.
[21:26:39] Shane McCarron: hmm...
[21:27:05] Manu Sporny: The goal is to support mark-up like this:

<div typeof="haudio">
   <span property="title">Start Wearing Purple</span> by
   <span property="contributor">Gogol Bordello</span>
   <span property="published" content="20020514">May 14th, 2002</span>
</div>

[21:27:36] … Yes - they're allergic to namespaces and so is HTML5, and
unfortunately, so are a number of web developers.
[21:27:53] Shane McCarron: but these aren't namespaces
[21:27:55] Manu Sporny: These are people with design backgrounds - they
just want to "tag" their documents... anything that looks like a
namespace scares them.
[21:29:03] … Microformats (and people in their mindset) refer to
anything that has a seperator in it, that's not a '-' character, as a
namespace: .*SEPARATOR.* == namespace
[21:29:21] … so: foaf:name <--- OMG NAMESPACE!
[21:29:49] … My point was that, we could hide the namespaces from the uF
community, but still use it behind the scenes.
[21:30:35] … So, you'd specify something in @profile, that extends the
default prefix mapping with a new set of unprefixed values.
[21:30:53] … but you'd do it in such a way as to generate fully-prefixed
values in the RDFa parser.
[21:31:02] … So, something like this:
[21:32:25] … <head
profile="http://microformats.org/vocab/unprefixed-terms-xmdp.html">...</head>

<div typeof="haudio">
   <span property="title">Start Wearing Purple</span> by
   <span property="contributor">Gogol Bordello</span>
   <span property="published" content="20020514">May 14th, 2002</span>
</div>

[21:32:55] … would be equivalent to this:

<div typeof="uf:haudio">
   <span property="uf:title">Start Wearing Purple</span> by
   <span property="uf:contributor">Gogol Bordello</span>
   <span property="uf:published" content="20020514">May 14th, 2002</span>
</div>

[21:33:41] … which would generate the following triples, where
prefix="EXTEND_DEFAULT_PREFIX_MAPPINGS=http://microformats.org/vocab#"
is defined in the
"http://microformats.org/vocab/unprefixed-terms-xmdp.html" document,
somehow. Hmm, maybe we could just do something like
prefix="EXTEND=http://microformats.org/vocab/unprefixed-terms-xmdp.html"
and not use @profile?

[21:34:12] Manu Sporny:
_:bnode0
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
      <http://microformats.org/vocab#haudio> .
_:bnode0
   <http://microformats.org/vocab#title>
      "Start Wearing Purple" .
etc.

[21:35:44] Shane McCarron: so your proposal is that we define a
mechanism, accessible via @profile and perhaps other ways, that could
extend the collection of reserved values
[21:36:30] … Yes, I think that's what would make Microformats and HTML5
happy (to some degree - if they adopt the RDFa attributes - lots of "IF"s).
[21:36:50] … and it would mean that RDFa could be used to express any
2-tuple based semantics expression mechanism (where you don't specify
the subject).
[21:37:10] … and, of course, it maps cleanly into RDFa - which is what
we want.
[21:37:40] … Does that make sense?
[21:38:47] Shane McCarron: yes...  I am trying to get my mind around a
portable, extensible way to have it automatically handled
[21:39:40] Manu Sporny: I think that last conversation was helpful, mind
if I re-post to the RDFa mailing list?
[21:40:06] Shane McCarron: of course not.  go for it.
[21:40:48] … note that if we extend the model I proposed that @profile
has scope with within body.... it means you could do it more than once
[21:52:21] Manu Sporny: That might be getting more complicated than we want.
[21:52:38] … I don't know - but I think we should limit the number of
documents that need to be pulled in to generate triples.
[21:52:43] Shane McCarron: Hmm
[21:53:12] … Whatever mechanism we put in place here has to be
generalized.  And if it is, then it will work no matter how it gets
shoved into whatever documents.
[21:53:18] Manu Sporny: Doing this would complicate the RDFa parser
quite a bit... if we start saying that @profile can go on any element
and people might start freaking out. (because we've changed how @profile
works, now).
[21:53:51] … right, but extending the prefix mappings as you traverse
the DOM seems a bit like overkill to me.
[21:54:01] Shane McCarron: we do it all the time
[21:54:05] … xmlns, @prefix
[21:54:23] Manu Sporny: yeah, but keep in mind that you have to fetch
the documents that we're talking about for the parser to be able to do
it's job.
[21:54:37] Shane McCarron: yeah... I know.  and that's icky.  of course
you can cache it
[21:54:40] Manu Sporny: That's a first and not necessarily something to
be proud of...
[21:54:55] … even if you cache it, it's fairly gross.
[21:54:56] Shane McCarron: actually I disagree.  there are lots of
istances where that comes
[21:55:08] Manu Sporny: like?
[21:55:16] Shane McCarron: @src...  xinclude?
[21:55:28] … iframe
[21:55:32] … object
[21:55:54] Manu Sporny: right, but what I mean is that RDFa has never
needed to pull in resources from outside before now.
[21:56:09] … Triple generation could happen using only the XHTML file.
[21:56:26] Shane McCarron: oh.... sure.  yeah, i know that.  and I am
not suggesting that everyone should do it all the time.  but if you are
using @profile anyway
[21:56:32] Manu Sporny: Now it needs an external document to function
correctly (I'm not saying that is horrible, but it's definitely a
steeper parser requirement).
[21:57:33] … You have a good point. I also think that we should try to
keep things simple and not re-define what @profile does to any large
degree. I'll have to think on it.

-- 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 Monday, 1 September 2008 02:18:47 UTC