Re: HTML+RDFa 1.1 Typo?

OK.  I didn't add the type predicate in my implementation and so that
seemed odd.  I now understand the copy pattern would generally apply to the
type from the pattern.

Reading this section again, I am concerned that the tests do not properly
cover this feature.  Specifically, I think that pattern chaining isn't
quite covered.

Also, the clean pattern seems to imply that subjects with rdfa:copy
predicates involving targets that do not exist would have their rdfa:copy
predicate remain in the graph.  I don't see a test that covers that
situation.

Test 0327 covers chaining when there is a blank node within the pattern.
 That blank node will have its own subject and so any single-pass algorithm
will catch it.

If you remove the blank node in 0327, an single pass won't be sufficient
depending on the order of processing.

For example:

<!DOCTYPE html>
<html>
<head>
  <base href="http://example.com/"/>
</head>
<body>
  <div typeof="schema:Person">
    <link property="rdfa:copy" resource="_:a"/>
    <link property="rdfa:copy" resource="_:b"/>
  </div>
  <p resource="_:a" typeof="rdfa:Pattern">Name: <span
property="schema:name">Amanda</span></p>
  <div resource="_:b" typeof="rdfa:Pattern">
      <link property="rdfa:copy" resource="_:c"/>
  </div>
  <div resource="_:c" typeof="rdfa:Pattern">
   <p><span property="schema:e-mail">amanda@example.com</span></p>
  </div>
</body>
</html>


On Thu, May 23, 2013 at 1:50 AM, Niklas Lindström <lindstream@gmail.com>wrote:

> Hi Alex,
>
> That's actually intentional. The last rule on the right side, "?target
> ?predicate ?object", takes care also of removing "?target rdf:type
> rdfa:Pattern" (since it removes all statements about ?target).
>
> The rule to remove "?subject rdf:type rdfa:Pattern" is needed since after
> the pattern has been copied entirely, the rdfa:Pattern type statement has
> been copied too, which is not the intent.
>
> A more effective implementation would not add that triple in the first
> place only to remove it, but I believe this was the simplest way to express
> these rules in a familiar notation for inference. (Hence the notes in the
> spec to make it clear that you're allowed to apply any algorithm you need
> as long as the outcome is the same.)
>
> Cheers,
> Niklas
>
>
>
> On Thu, May 23, 2013 at 6:22 AM, Alex Milowski <alex@milowski.com> wrote:
>
>> In section 3.5.1, I believe the pattern-clean rule is meant to have on
>> the right side:
>>
>> ?target rdf:type rdfa:Pattern
>>
>> instead of:
>>
>> ?subject rdf:type rdfa:Pattern
>>
>> --
>> --Alex Milowski
>> "The excellence of grammar as a guide is proportional to the paucity of
>> the
>> inflexions, i.e. to the degree of analysis effected by the language
>> considered."
>>
>> Bertrand Russell in a footnote of Principles of Mathematics
>>
>
>


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Thursday, 23 May 2013 16:00:05 UTC