Re: Issue on the latest syntax document: placement of @instanceof

Ivan, Mark, and everyone,

I had an action to explain my point of view on this thorny @instanceof
issue. I was late in doing this, so of course the discussion began
without me, which is healthy :)

That said, I want to return to basic principles and explain why my point
of view differs from Mark's on the complicated use case. I don't want to
talk about parsing rules yet. I want to talk about what *should* happen
in the simple cases, and then argue about what makes sense in the more
complicated case.

I think we agree that

  <div about="#mark" instanceof="foaf:Person">
  </div>

and

  <div href="#mark" instanceof="foaf:Person">
  </div>

both correspond to

  <#mark> rdf:type foaf:Person .


We also agree that:

  <div instanceof="foaf:Person">
  </div>

corresponds to

  _:div0 rdf:type foaf:Person .

We also agree that:

  <div about="#mark" rel="foaf:knows" href="#steven">
  </div>

corresponds to:

  <#mark> foaf:knows <#steven>


So the question is, what happens when you add @instanceof to the above
example? Does it apply to @about or @instanceof?

By construction, you can go down two paths and come up with two
different results. So I don't think the construction approach helps.
Instead, I prefer to think about the meaning of @instanceof:

  The "@instanceof is a child element" argument:

  @instanceof is sugar for a child LINK element, back when we
  supported LINK (here I agree with Mark). Introducing @href
  (or @resource) overrides the subject for all child elements.
  Thus, @instanceof applies to @href.

Mark is worried about how one would apply a type to the @about. I don't
think that's too difficult:

  <div about="#mark" instanceof="foaf:Person">
     <div rel="foaf:knows" href="#steven">
     </div>
  </div>

In fact, I don't think we should *ever* recommend the use of @about,
@rel, @href, and @instanceof on the same element. We just need to
*handle* it when authors write it. And by the "@instanceof is a child
element" argument above, I think it has to apply to @src/@href/@resource.

So the parsing rule for @instanceof is:

    The subject of @instanceof on an element is
    whatever the subject of a child element would be
    by normal inheritance.

One last thing: how do we handle @instanceof by itself? We add an
additional processing rule, which is that @instanceof triggers chaining
as if there had been a @rel on the element, only there is no @rel so
there is no "parent triple".

-Ben

Received on Friday, 14 September 2007 00:23:39 UTC