Re: Updated the core spec (ISSUE-106 ISSUE-107)

Sorry for the delay in response, just back from a trip.

On Sep 21, 2011, at 8:07 AM, Toby Inkster wrote:

> On Wed, 21 Sep 2011 06:28:00 -0700
> Ivan Herman <ivan@w3.org> wrote:
> 
>> my implementation is slightly different, but Gregg's is following the
>> algorithm by the letter. Gregg?
> 
> OK, got it working.
> 
> My mistake it seems is that while the prefix mapping needs to be passed
> from a parent to child evaluation context by value (to avoid a prefix
> declaration on the child element affecting its ancestors), the list
> mapping needs to be passed by reference.
> 
> I have one further comment: in stage 14, it does not state how to
> handle when a list exists but is empty. Initially I thought that
> perhaps the previous processing steps ensure that this state is never
> reached. But I was incorrect - sometimes, there will be an empty list.
> 
> For example, processing the following:
> 
> 	<html>
> 	<head><title>Test</title></head>
> 	<body><br rel="rdfa:testing" inlist="" /></body>
> 	</html>
> 
> In this case I'm generating:
> 
> 	<> rdfa:testing () .
> 
> Though another option would be to simply generate no triple from it.

I had taken out the bit about generating an empty list, but I hadn't considered this particular pattern. That is, indeed, the correct output for your example, and I'll be sure that a test case is added to handle this.

My implementation does this, and has the extra bits to make it happen:

[[[
For each IRI in the local list mapping, if the equivalent list does not exist in the evaluation context, indicating that the list was originally defined on the current element, use the list as follows:

* If the list is empty, the following triple is generated:

  subject
    current subject
  predicate
    full IRI of the local list mapping associated with this list
  object
    http://www.w3.org/1999/02/22-rdf-syntax-ns#nil

* Otherwise, Create a new 'bnode' ...
]]]

> -- 
> Toby A Inkster
> <mailto:mail@tobyinkster.co.uk>
> <http://tobyinkster.co.uk>
> 

Received on Sunday, 25 September 2011 20:11:20 UTC