RE: ISSUE-76: If we fixed namespaces, does RDFa still have problems?

[snip]

> >> RDFa 1.1 will allow for the use of RDFa without declaring any
> >> namespaces
> >> and using vocabularies and keywords instead. For example:
> >>
> >> <p vocab="http://example.org/foaf.html" about="#robert"
> >> typeof="Person">
> >>    My name is <span property="name">Robert Ennals</span>.
> >> </p>
> >
> > What is the scope of a vocab?
> 
> The scope of vocab is the same as @itemscope - in other words, it's
> scoped to the element that it is declared on. So, if it is declared on
> <HEAD> then it's scoped to the entire contents of <HEAD>, if it's
> scoped
> on <BODY> then it's scoped to the entire contents of <BODY>.

That seems potentially problematic. One of the big problems with namespaces is that if you copy and paste code from one page to another (which people frequently do) then it can change meaning. If the meaning of a property name depends on a vocab declared an unknown enclosing scope then I would expect that to lead to frequent confusion.

> > If it is document scope, then won't you get the same problem as
> > before, where names don't have consistent meanings.
> 
> Microdata has the problem, RDFa does not. To demonstrate:
> 
> Author A writes:
> 
> <span itemprop="title">Going Rogue</span>
> 
> Author B writes:
> 
> <span itemprop="title">Research Scientist</span>
> 
> Author A Microdata model:
> 
> ("title", "Going Rogue")
> 
> Author B Microdata model:
> 
> ("title", "Research Scientist")

IMO Microdata is doing the right thing here.

If you want to determine what a property means then you can tell by looking *only* at the name of the property, and the @itemtype URL.

By "inconsistent meanings" I meant that if I copy a metadata annotated node from one document to another, it may change meaning in RDFa (because the vocab context changed) but not in Microdata (since the @itemtype is required to be part of the node).

[snip]

> > Personally, I'd like to have all the common types and properties
> > be part of the default namespace, and just write:
> >
> > <p type="Person">
> >    My name is <span property="name">Rob Ennals</span>
> > </p>
> 
> The problem with this approach is who or what constitutes "common types
> and properties". The W3C? The biotech industry? The photochemical
> processing industry? The physics research institutes? Which ones?
> What's
> the process, etc...

That's a good question.

One way might be to do the same as what has been done to choose new semantic tags for HTML5. Start off with only the types and properties that we know are in very common use now (e.g. vcard, foaf etc) and then watch to see what other types and properties get widely adopted. If a particular vocabulary really takes off, then give it a short name in the next version of the spec.

That said, this approach is easier in the Microdata model than the RDFa model, since in Microdata @itemprop is interpreted relative to @itemtype, and so the only set of global names that we would manage would be the most popular @itemtype urls.

Of course, moving a type name into the global namespace has its own problems, since tools that know about the URL version but don't know about the short-form would no longer work.

[snip]

-Rob

Received on Monday, 14 December 2009 19:06:07 UTC