- From: Ivan Herman <ivan@w3.org>
- Date: Thu, 29 May 2008 09:12:00 +0200
- To: Mark Birbeck <mark.birbeck@webbackplane.com>
- Cc: Manu Sporny <msporny@digitalbazaar.com>, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
- Message-ID: <483E5740.3070906@w3.org>
To be honest, I do not remember the exact example before either... but yes, this is entirely possible to have duplicates. Manu, I wonder what RDF environment you use. In the case of RDFLib, for example, this issue does not even arise, in the sense that the underlying triple store automatically behaves as a _set_ (which is the way RDF triples are defined), ie, it would filter out these duplicates. In other words, it does not appear on the output side of pyRdfa at all. (To avoid any kind of misunderstandings: it is _not_ a bug if you have those triples duplicated on the output, it is just an aesthetic issue...) Ivan Mark Birbeck wrote: > Hi Manu, > > Your implementation is correct. > > I mentioned this a while back--that you will get the same triple, once > per predicate, when using hanging rel's--and the general feeling was > to just leave it; it would require yet another flag and another test, > and although not that complicated, it's still another rule. > > I believe at the time this was raised that Ivan provided an example of > other situations in RDF where you can end up with the same triple > repeated in a graph, so it was felt that having duplicates was not an > enormous problem. (I don't recall his example, though.) > > Regards, > > Mark > > On Wed, May 28, 2008 at 9:01 PM, Manu Sporny <msporny@digitalbazaar.com> wrote: >> Just a quick question to those that are implementing - for TC#78, I just >> want to make sure that other implementations are doing the same things >> as mine... I'm getting the same triple generated twice per the Syntax >> processing rules: >> >> -------------------------------------------------------------------------- >> >> @prefix foaf: <http://xmlns.com/foaf/0.1/> . >> _:bnode0 >> <http://xmlns.com/foaf/0.1/name> >> "Ivan Herman" . >> <http://www.example.org/#somebody> <------------------------ ONCE >> <http://xmlns.com/foaf/0.1/knows> >> _:bnode0 . >> _:bnode0 >> <http://xmlns.com/foaf/0.1/mailbox> >> <mailto:ivan@w3.org> . >> <http://www.example.org/#somebody> <------------------------ TWICE >> <http://xmlns.com/foaf/0.1/knows> >> _:bnode0 . >> _:bnode1 >> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> >> <http://xmlns.com/foaf/0.1/Person> . >> _:bnode1 >> <http://xmlns.com/foaf/0.1/name> >> "Mark Birbeck" . >> <http://www.example.org/#somebody> >> <http://xmlns.com/foaf/0.1/knows> >> _:bnode1 . >> >> --------------------------------------------------------------------------- >> >> I'm unsure if this is a bug, or an issue with the Syntax document... Is >> anybody else seeing this double-generation of the same triple? >> >> The first time it's generated is from step #11: >> >> // 11. If the [skip element] flag is 'false', and either: the >> // previous step resulted in a 'true' flag, or [new subject] was >> // set to a non-null value, then any [incomplete triple]s within >> // the current context should be completed: >> >> after processing: >> >> <p property="foaf:name">Ivan Herman</p> >> >> The second time it's generated is from step #11, after processing: >> >> <p rel="foaf:mailbox" >> resource="mailto:ivan@w3.org">mailto:ivan@w3.org</p> >> >> This happens because [new subject] is set to a non-null value in both >> cases... so, are we supposed to generate two identical triples and let >> the RDF graph merge the two identical nodes or is there something wrong >> with my code? >> >> -- manu >> >> -- >> Manu Sporny >> President/CEO - Digital Bazaar, Inc. >> blog: DB Launches Medical Record Sales Service with Shepherd Medical >> http://blog.digitalbazaar.com/2008/02/24/health2trade/ >> >> >> > > > -- 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
Received on Thursday, 29 May 2008 07:12:28 UTC