Re: Understanding 'chaining'

Mark,

Okay, let's explore how this chaining approach will work, in detail. For
everyone else, I want to highlight two important points:

1) Mark's proposal is a *significant* change from what we've been
discussing over the last few weeks. A lot of simple cases work the same
way, but a number of more complex cases change fairly radically.

2) If it works, I'm not going to fight it :)

The main issue is that you're reintroducing a form of predicate
inheritance, which is the key thing that made chaining awfully
complicated the first time around. Can we get around the complexity this
time? Let's see.

The difference between having the object of the parent set the subject
of the child (the existing rules) and having the subject of the child
set the object of the parent (the new/old rule you're proposing) is that
elements have a single parent, but they often have many children.

Every example you've given shows chaining where there is only one child.
What happens when there's more than one?

Let's look at some examples:

1) Multiple Children

====
<div about="#me" rel="foaf:knows">

  <span about="#ivan" property="foaf:name" content="Ivan"></span>

  <span about="#ralph" property="foaf:name" content="Ralph"></span>

</div>
====

I suppose this means:

<#me> foaf:knows <#ivan> ;
      foaf:knows <#ralph> .

<#ivan> foaf:name "Ivan" .
<#ralph> foaf:name "Ralph" .

Note the significant change: one @rel now generated two triples, whereas
one @rel used to be exactly one triple. Is this the behavior we want? No
real issue on my end, but note the change.

2) Let's remove the URIs

====
<div about="#me" rel="foaf:knows">

  <span property="foaf:firstname" content="Ivan"></span>

  <span property="foaf:lastname" content="Herman"></span>

</div>
====

Is that the same bnode with the two properties firstname and lastname?
Or are those two separate bnodes? From the way we've been doing chaining
the last few months, it should be *one* bnode, I think:

<#me> foaf:knows [foaf:firstname "Ivan" ; foaf:lastname "Herman"] .

Is that consistent with #1, where we had two resources?


3) Let's add @instanceof to one of the elements

====
<div about="#me" rel="foaf:knows">

  <span property="foaf:firstname" content="Ivan"
instanceof="foaf:Person"></span>

  <span property="foaf:lastname" content="Herman"></span>

</div>
====

I think we're back to two bnodes?

<#me> foaf:knows [foaf:firstname "Ivan" ; rdf:type foaf:Person] ;
      foaf:knows [foaf:lastname "Herman"] .


I'll stop here and see what Mark thinks. Maybe this is consistent and
everyone is happy, or maybe it begins to reveal some issues that need
addressing.

-Ben

Received on Wednesday, 21 November 2007 23:39:25 UTC