Re: More direct conversion from microdata to RDFa?

Hi Toby,


On Thu, Oct 13, 2011 at 6:56 AM, Toby Inkster <tai@g5n.co.uk> wrote:

> On Wed, 12 Oct 2011 10:56:49 -0400
> Stéphane Corlosquet <scorlosquet@gmail.com> wrote:
>
> > RDFa could use a similar mechanism, and use the first token of
> > @typeof to construct the namespace that we currently put in @vocab.
>
> I did suggest that some time ago [1], but people objected at the time
> saying that it was perhaps a bit too magical. I have since come around
> to that way of thinking. Magical side-effects like this can be
> surprising to newbies. And in programming (and markup) surprises are
> generally considered to be a bad thing.
>

I agree on this principle, but I don't agree there are magical effects
happening. Let's look at your use cases below.


>
> @typeof is already pretty overloaded, not only setting an rdf:type, but
> also creating a new blank node in the absence of @about.


Same behavior as in microdata: @itemscope with @itemtype create a new data
item (blank node by default in RDF speak).


> (And it's
> badly named too. In earlier RDFa drafts it was @instanceof, which is
> much closer to its real meaning. @oftype would have been clearer
> than @typeof.)
>
> It would raise all kinds of odd questions like:
>
> <div typeof="http://xmlns.com/foaf/0.1/Person">
>  <span property="name">Bob</span> wrote
>  <span rel="made" rev="maker">
>    <!-- Chaining in operation. Now we're describing a different
>         resource, which is not a foaf:Person. Is foaf still the
>         vocab? -->
>    <cite property="title">RDFa for Dummies</cite>
>  </span>
> </div>
>

Like I said in the call today, people who would use this @vocab-bypass
mechanism are not likely to know/use chaining. If you want to use chaining,
you might also want to use @vocab and the whole RDFa toolchain.


>
> <div typeof="http://xmlns.com/foaf/0.1/Person">
>  <span property="name">Bob</span> wrote
>  <span rel="made" rev="maker">
>    <span about="#dummies" typeof="">
>      <!-- What about now? -->
>      <cite property="title">RDFa for Dummies</cite>
>    </span>
>  </span>
> </div>
>

what's the purpose of the empty @typeof here? do you not want to type
#dummies as a book. What do you think of this rewrite?:

<div typeof="http://xmlns.com/foaf/0.1/Person">
 <span property="name">Bob</span> wrote
 <span rel="made" rev="maker">
   <span about="#dummies" typeof="http://schema.org/Book">
     <!-- What about now? -->
     <cite property="name">RDFa for Dummies</cite>
   </span>
 </span>
</div>

In this case, the property _name_ of the book is from the schema.org vocab.




> <div typeof="http://xmlns.com/foaf/0.1/Person">
>  <span property="name">Bob</span> wrote
>  <span rel="made" rev="maker">
>    <span about="#dummies">
>      <!-- What about now? -->
>      <cite property="title">RDFa for Dummies</cite>
>    </span>
>  </span>
> </div>
>

this proposal requires you to type your item, thanks for pointing it out.
Same as in microdata, if you want to use shortnames properties, you need to
type your item. In RDFa, you don't have to assert a type, you can use
@vocab. But if you type it, you can skip @vocab. I'm not proposing to remove
@vocab, just to make it optional when @typeof is used.


>
> <body>
>  <!-- How can I assign a vocab URI to the following properties
>       without creating an rdf:type triple, or a bnode? -->
>  <span property="bar">Bar</span>
>  <span property="baz">Baz</span>
> </body>
>

then you use @vocab. again, not trying to remove @vocab from RDFa, it does
have advantages and afaik there is no equivalent in microdata, just arguing
for making it optional in certain conditions.

Thanks for your feedback Toby. I agree I haven't thought all the corner
cases, but given that I'm not arguing to replace @vocab with this mechanism,
I expect users with an RDF background to use @vocab, and users with a
microdata background to have the chance to bypass it (because type and vocab
are the same thing in microdata).

Steph.



>
> ____
> 1. http://lists.w3.org/Archives/Public/public-rdfa-wg/2010Mar/0127.html
>
> --
> Toby A Inkster
> <mailto:mail@tobyinkster.co.uk>
> <http://tobyinkster.co.uk>
>
>

Received on Thursday, 13 October 2011 15:50:45 UTC