Re: Understanding 'chaining'

Writing this mail on my way home from my phone, sorry for th formatting...

------- Original message -------
From: Mark Birbeck <mark.birbeck@x-port.net>
Cc: ben@adida.net, public-rdf-in-xhtml-tf@w3.org
Sent: 29.11.'07,  16:30

> Hi Ivan,
> 
> > O.k, let me try to characterize the old/new model, just for my own
> > understanding (and to make the differences clear for myself):
> >
> > - a bnode created by a @rel/@rev is 'used' as the object of a triple if
> > an only if it becomes 'used' somewhere down the tree as a subject.
> > Otherwise it is ignored (I mean, the corresponding triple with the
> > @rel/@rev is ignored). (This answers to the inconsistency or, say,
> > ugliness that you referred to in your mail.)
> 
> That is right.
> 
> 
> > - an @about appearing on an element always creates a new start (both in
> > the current and the old/new model) going down in the tree but, in the
> > new model it also, sort of, replaces a bnode that might have been
> > generated by a @rel/@rev somewhere 'up' (ie, toward the ancestors) in
> > the tree (and generates the hanging triples accordingly).
> 
> That's also true.
> 
> 
> > And these two statements effectively characterize the differences. Mark,
> > is that correct?
> 
> Yes, I think you have captured the differences very succinctly.
> 
> 
> > What about the implementation concerns? I can clearly see how this can
> > be implemented in python or similar languages. It is a tiny bit more
> > complex than now (essentially, hanging triples have to be sent 'down' by
> > recursion and put into the triple stores only if the bnode is used), but
> > nothing really major.
> 
> That's right; since we're already passing a 'context' full of
> properties via a stack, then as you say, this is nothing major.
> 
> So essentially we'd just add a flag to the context to indicate that we
> have a 'partially completed' triple, and then of course we'd also add
> to the context the subject and predicate of that incomplete triple.
> When something completes the triple, it would clear the flag before
> any further recursion happens.
>

It is a little bit more I believe. If you have a chain of elements with only @rel, then you will have to accumulate hanging triples, ie, passing them 'on' to 
children before putting them (possibly) into the triple store. 

> 
> > I am not sure it is very easy in XSLT but, I must
> > admit, I am a very bad XSLT programmer. It would be a good idea to check
> > that (as Danny proposed).
> 
> As it happens, the first ever RDFa parser, written back at the time
> when chaining did follow this pattern, was written with XSLT. I have
> no idea where it is, but my recollection is that the only thing that
> was awkward at the time was the processing of QNames (which is an
> XPath 1 issue, I think).
> 
> None of that is to say that it's not worth looking into the
> implementation consequences, only that I feel positive about the
> outcome, because I did it once.
>

Ah! That is good to know. 

Ivan
 
> Regards,
> 
> Mark
> 
> -- 
>   Mark Birbeck, formsPlayer
> 
>   mark.birbeck@formsPlayer.com | +44 (0) 20 7689 9232
>   http://www.formsPlayer.com | http://internet-apps.blogspot.com
> 
>   standards. innovation.

Received on Thursday, 29 November 2007 17:15:46 UTC