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

Re: Understanding 'chaining'

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Thu, 29 Nov 2007 16:30:13 +0000
Message-ID: <a707f8300711290830j3d6f23f6p5264701700922a69@mail.gmail.com>
To: "Ivan Herman" <ivan@w3.org>
Cc: "Ben Adida" <ben@adida.net>, RDFa <public-rdf-in-xhtml-tf@w3.org>

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.


> 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.

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 16:30:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:15:18 GMT