W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > January 2013

Re: HTML+RDFa 1.1 Last Call Draft is Ready

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Sun, 27 Jan 2013 18:00:22 -0500
To: Niklas Lindström <lindstream@gmail.com>
CC: Manu Sporny <msporny@digitalbazaar.com>, Ivan Herman <ivan@w3.org>, RDFa WG <public-rdfa-wg@w3.org>, Thomas Roessler <tlr@w3.org>
Message-ID: <9A2CB860-DDA4-447F-B505-0458C6F34C5B@greggkellogg.net>
On Jan 27, 2013, at 7:42 AM, Niklas Lindström <lindstream@gmail.com> wrote:

> Hi Manu,
> Thanks for the editing! There seem to be some things left.
> ## Two possibly tricky things (please comment, everyone who can)
> 1. In "3.5 Property Copying": Should a rdfa:Pattern really only be
> removed if it has been used (i.e. linked to with rdfa:copy)?
> Otherwise, the final removal step should remove rdfa:copy links in one
> step and every statement about an rdfa:Pattern in another. (Did
> Gregg's original text specify it like this?)

Yes, if a Pattern is used, it should be removed, IMO, otherwise, it leads to useless clutter. The rules I used, and originally specified, are the following:

To copy, repeat the following until no new triples are generated:

antecedent ?x rdfa:copy ?pr
antecedent ?pr rdf:type rdfa:Pattern
antecedent ?pr ?p ?y
consequent ?x ?p ?y

In SPARQL, this would be the following

INSERT {?x ?p ?y}
  ?x rdfa:copy ?pr .
  ?pr a rdfa:Pattern; ?p ?y

To clean up, run the following:

antecedent ?x rdfa:copy ?pr
antecedent ?pr rdf:type: rdfa:Pattern
antecedent ?pr ?p ?y
consequent ?x rdfa:copy ?pr
consequent ?x rdf:type rdfa:Pattern
consequent ?pr ?p ?y


  ?x a rdfa:Pattern; rdfa:copy ?pr .
  ?pr ?p ?y
  ?x rdfa:copy ?pr .
  ?pr a rdfa:Pattern; ?p ?y
This is similar to Manu's but not quite the same. For instance, Manu has an additional "unless" statement to avoid adding the rdfa:Pattern to ?subject, mine doesn't do this, but causes it to be removed in the cleanup. Also, manu removes everything in ?target at the end. The difference in Manu's is that in pattern-clean, it might remove triples that were the target of rdfa:copy, which were't of type rdfa:Pattern.

Note some subtle differences in  the following examples:

:a rdfa:copy :b .
:b dc:title "foo"; rdfa:copy :c .
:c a rdfa:Pattern; dc:title "bar"

What triples does :a have after running this? With mine, it has the following:

:a dc:title "foo", "bar" .

With Manu's it doesn't get anything (not that this is a useful example, but it's different.)


:a rdfa:copy :b .
:b dc:title "baz" .

Manu's ends up deleting that second triple, which would be incorrect.

> 2. There was a comment elsewhere recently [1] by Lev Khomich
> (implementor of RDFa 1.1 extraction in Java): "Also step 1 of
> paragraph 3.5.1 may need some explanation for cases of circular
> dependencies inrdfa:copy - rdfa:Pattern chains."
> Given the set nature of triples and the text "until no new triples are
> added", I suppose that, technically, circular rdf:copy chains aren't a
> problem with these rules? Still, it would be wise to spell this out
> explicitly. (Did Gregg's text do that?)

I didn't spell anything out, but it does not loop forever because of the "until no new triples are added" bit you mention.

> ## Some mainly editorial issues
> 3. There are several Turtle examples in the document (which I think is
> good), but no mention of Turtle nor any link to its definition. We
> should add something akin to (or reference) the Turtle section in RDFa
> Core [2] (but possibly with a reference to the spec in development
> [3]).

We should normatively reference <http://www.w3.org/TR/turtle/> (the new version), as we should go to REC at about the same time.

> 4. Should the results of the first RDFa markup example in "2.1
> Document Conformance" really be presented in a table? I'd prefer it in
> Turtle notation as well (like the rest of the output examples):
>    @prefix : <http://schema.org/> .
>    [] a :Blog;
>        :url <http://example.org/> .
> (By doing this, we don't need the named bnode "_:item1", which could
> otherwise confuse those who wonder where that comes from.)

I think using Turtle output is better than using a table. (Note, we use tables in JSON-LD, but that's a different case, I think).

> 5. It may be wise to add an explicit output example from "EXAMPLE 6:
> Events with duplicate properties" and "EXAMPLE 7: Copying common
> properties" in 3.5 as Turtle. Since it is the same for both, only one
> block is needed:
>    @prefix : <http://schema.org/> .
>    [] a :MusicEvent ;
>        :image <Muse1.jpg>, <Muse2.jpg>, <Muse3.jpg>;
>        :name "Muse";
>        :startDate "March 7th 2013";
>        :location <#target> .
>    [] a :MusicEvent ;
>        :image <Muse1.jpg>, <Muse2.jpg>, <Muse3.jpg>;
>        :name "Muse";
>        :startDate "March 3rd 2013";
>        :location <#united> .

Yes, I think adding Turtle output for Example 7 would help.

> 6. As previously pointed out, the word "item" or "items" is used to
> describe Pattern copying. Since there are no "RDFa items", only
> descriptions of resources (which are post-processed by this mechanism
> and not "in" the document) I suggest to also change:
> * "many items on a page that share a common set of properties" to
> "many resources described by a page that share a common set of
> properties".
> * "This pattern can then be copied into other RDFa items within the
> document" to "This pattern can then be copied into other descriptions
> expressed by the document".
> * "The common properties are copied into each event item via the
> rdfa:copy predicate" to "The common properties are copied into each
> event description via the rdfa:copy predicate".

My fault about including "item" in here; "resource" would be better.

> 7. The text "The inclusion process is iterative, so that resources may
> include other resources that include other resources." seems
> confusing, as we speak about pattern *copying*. It could be changed to
> "The copy process is iterative, so that patterns may copy other
> patterns (that may copy other patterns).". If so, "EXAMPLE 8:
> Resources may include other resources that include other resources"
> should be renamed accordingly to "EXAMPLE 8: Patterns may copy other
> patterns".


> 8. While I'm being pedantic, "EXAMPLE 9: Iterative copying example
> output in TURTLE" could be improved by using a default prefix (easier
> to read and more like @vocab), and a non-wrapping top bnode:
>    @prefix : <http://schema.org/> .
>    [] a :Person ;
>        :name "John Lennon";
>        :band [ a :MusicGroup;
>                :name "The Beatles";
>                :size "4" ] .
> ## Some syntax issues in the examples
> 9. The Turtle in "EXAMPLE 3: Namespace preservation triple" needs
> triple quotes for the multiline literals, and to have the datatype IRI
> put in angle brackets. It should be:
>    <>
>       <http://example.org/vocab#markup>
>          """<rect xmlns=\"http://www.w3.org/2000/svg\" width=\"300\"
>    →height=\"100\" style=\"fill:rgb(0,0,255);stroke-width:1;
> stroke:rgb(0,0,0)\"/>
>    →<rect xmlns=\"http://www.w3.org/2000/svg\" width=\"50\"
>    →height=\"50\" style=\"fill:rgb(255,0,0);stroke-width:2;
>    →stroke:rgb(0,0,0)\"/>"""^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>
> .
> 10. The same goes for "EXAMPLE 5: Namespace element preservation
> triple". It should be:
>    <>
>       <http://example.org/vocab#markup>
>          """<p xmlns:fb="http://www.facebook.com/2008/fbml">
>    →<fb:user uid="12345"></fb:user>
>    →</p>"""^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .

I think this is better than using the arrow notation, and is really more correct showing appropriate preservation of spaces (and doesn't require escaping embedded quotes.


> 11. In "EXAMPLE 8", the first <p>-element isn't properly closed, just
> followed by another <p>. (Granted, HTML5 parsing would fix that; but
> still.)
> That's all I can find.
> Cheers,
> Niklas
> [1]: https://github.com/levkhomich/semargl/issues/12#issuecomment-12730492

> [2]: http://www.w3.org/TR/rdfa-core/#turtle

> [3]: http://www.w3.org/TR/turtle/

> On Sat, Jan 26, 2013 at 8:19 PM, Manu Sporny <msporny@digitalbazaar.com> wrote:
>> On 01/21/2013 01:13 AM, Gregg Kellogg wrote:
>>>>> I believe the 'if' clause should also include
>>>>> ?target rdf:type rdfa:Pattern
>>>> Also, when copying, I don't think the rdf:type of rdfa:Pattern
>>>> should be copied; right? So I believe the "then add: ?subject
>>>> ?predicate ?object" needs a condition, like "unless: ?predicate =
>>>> rdf:type and ?object = rdfa:Pattern" (possibly put in a new
>>>> rightmost column).
>>> The remove triples also has an explicit pattern for deleting the
>>> rdfa:Pattern from the target, which is unnecessary.
>> Ivan, Niklas, Gregg, I believe I've made the changes each of you
>> requested. Please double-check to make sure it's correct:
>> http://www.w3.org/2010/02/rdfa/sources/rdfa-in-html/Overview-src.html#implementing-property-copying

>> -- manu
>> --
>> Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
>> President/CEO - Digital Bazaar, Inc.
>> blog: Aaron Swartz, PaySwarm, and Academic Journals
>> http://manu.sporny.org/2013/payswarm-journals/

Received on Sunday, 27 January 2013 23:01:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:58 UTC