W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > September 2007

what does @instanceof refer to

From: Ben Adida <ben@adida.net>
Date: Wed, 19 Sep 2007 16:06:42 -0700
Message-ID: <46F1AB82.3030607@adida.net>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>

Hi all,

So we haven't yet resolved the issue of what @instanceof refers to when
there is both @about and @resource/@href on an element. We should take
it to a vote, but before we do, I was asked to clarify my point that
@resource overriding @about is actually based on logic, not just preference.

Mark's point is that @instanceof applies to "the node that corresponds
to the element" on which @instance of is written. I actually agree with
that. At the same time, we agree that

  <div resource="#ben" instanceof="foaf:Person>


  <#ben> rdf:type foaf:Person .

So, in this case, as per Mark's point, the node that corresponds to the
div is <#ben>, the value of @resource. It seems clear that @resource is
thus a valid candidate for the subject of @instanceof. Otherwise, we're
making a weird exception to Mark's rule about "the node that corresponds
to the element" for the above triple.

Now, here's how one can logically think of @resource overriding @about.
Consider the following markup:

  <div about="photo.jpg" rel="foaf:depicts" resource="#ben">
      <span property="foaf:name">Ben Adida</span>

The triples are:

  <photo.jpg> foaf:depicts <#ben> .
  <#ben> foaf:name "Ben Adida" .

Now if we take @resource away:

  <div about="photo.jpg" rel="foaf:depicts">
      <span property="foaf:name">Ben Adida</span>

the chaining node becomes a blank node:

  <photo.jpg> foaf:depicts _:bnode0 .
  _:bnode0 foaf:name "Ben Adida" .

And if we take @rel away, chaining collapses, and foaf:name's subject
now goes "further up" the tree and finds the @about:

  <photo.jpg> foaf:name "Ben Adida" .

Logically speaking, for contained elements, @rel creates a bnode that
overrides @about, and @resource overrides that bnode and, thus,
transitively, @about.

Now, we already established that @resource *is* a valid subject for
@instanceof when no other attributes are present. And we even mentioned
that @instanceof is actually syntactic sugar for a child element. This
must mean that @instanceof should be considered "deeper down the tree"
than @resource.

How, then, can we logically justify that @about overtakes @resource in
the case of @instanceof, when precisely the opposite happens for child

In my mind, adding @rel and @resource squeezes the new chaining subject
between @about and child elements, and @instanceof is, in fact,
equivalent to a child element.

There may well be a different reasoning that justifies the other point
of view, but the above is meant to show that there is very much a
logical approach to assuming that @resource overrides @about as the
subject of @instanceof, not the other way around.

Now we can take an informed vote :)

Received on Wednesday, 19 September 2007 23:06:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:01:52 UTC