Re: Issue on the latest syntax document: setting of [chaining]

Hi Ivan,

Many thanks for all the comments--extremely useful.

I went through your parser in great detail last week, so as to
double-check that I hadn't missed any rules, and to also see if my
rules gave the same output. It was a very useful exercise, and one
thing that I saw which I hadn't even thought of, was that you stop
recursing through the tree when you hit a literal.

This is certainly correct, but I didn't add it to the processing rules
since I wanted to make others aware of it first--as far as I know it's
never come up in a discussion!

The processing rules I saw in your code seem to be exactly what you
are raising here, except you've referred to it in this email as an
issue of 'chaining'. Is that just a typo? The effect should be to stop
recursion, no? The chaining flag simply says that the object of a
parent statement becomes the subject of the contained ones, but (as
you rightly do in your parser), shouldn't we actually stop processing
child elements altogether, not just switch off chaining?

So I think your rules are right, but with the following small change
to use a 'recurse' flag instaed of the 'chaining' flag:

  - [recurse] is set to True by default when entering processing
[current element]
  - [recurse] is set to False, if
    - no @content attribute is present
    - any triples are generated using the [current object literal],
ie, first item in 3rd
      step.

We'll then use the 'recurse' flag in the step at the end where I say
'needs to be explained'.

Very good catch, Ivan...I'd missed that one completely. :)

(In my parser I did already have a recurse flag, but I was only using
it to save a bit of processing time when text nodes were spotted.)

Regards,

Mark

On 09/09/2007, Ivan Herman <ivan@w3.org> wrote:
> To make the versioning clear, this is a comment on
>
> http://www.w3.org/MarkUp/2007/ED-rdfa-syntax-20070906/
>
> on Section 4.3, Processing
>
> At present, the flag [chaining] is bound to @rel, @rev, or @instanceof.
> The processing steps say that _if_ any of those attributes generate
> valid triples, (2nd and 3rd item in the 3rd step), then the [chaining]
> flag is set to True. Otherwise it is False (although this latter is not
> explicitly said in the text). I am not sure that is correct. Inspired by
> Mark's beloved example:-):
>
> <span property="a:bla" rel="p:q" resource="http://a.b.c">Einstein said
> E=mc<sup>2</sup></span>
>
> This will generate the triples
>
> <> p:q <http://a.b.c>;
>    a:bla "Einstein said E=mc<sup>2</sup>"^^rdfs:XMLLiteral.
>
> which is fine, but I do not think that chaining should go beyond the
> <span> element in this case. Put it in an informal way, [current object
> literal] has already provided for a correct interpretation of that
> content...
>
> I think the correct way of saying this is that:
>
> - [chaining] is set to True by default when entering processing [current
> element]
> - [chaining] is set to False, if
>    - no @content attribute is present
>    - any triples are generated using the [current object literal], ie,
>      first item in 3rd step.
>
> Ivan
>
> --
>
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> PGP Key: http://www.ivan-herman.net/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
>
>


-- 
  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 Sunday, 9 September 2007 14:15:06 UTC