- From: Ivan Herman <ivan@w3.org>
- Date: Fri, 15 Jan 2010 09:53:15 +0100
- To: Stephane Corlosquet <scorlosquet@gmail.com>
- CC: RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
- Message-ID: <4B502CFB.4000703@w3.org>
Hi Stéphane, - The usage of @rel="" is technically correct in my reading of the spec (and my distiller code:-): step 5 of the processing steps[1] is applied, and that step only refers to the existence of @rel/@rev not whether they provide valid URI-s. - Whether it is good practice or not is of course another question. As far as I am concerned, I think it is cleaner if, eg, an explicit @about is placed there (as Toby proposed). This may be a bit of a pain for a human author but it does not cost a penny, I presume, for an automatic procedure in Drupal... Cheers Ivan [1] http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/#s_model On 2010-1-14 19:21 , Stephane Corlosquet wrote: > Hi, > > I just found a bug in the RDF output generated on Drupal 7 frontpage [1]. > This is the code of interest (cleaned up for clarity): > > <div about="/node/12"> > <ul> > <li> > <a content="4" property="sioc:num_replies" href="/node/12#comments">4 > comments</a> > </li> > </ul> > </div> > > I initially thought it would create the triple > </node/12> sioc:num_replies "4" . > but it turns out the RDFa parser I use generates > </node/12#comments> sioc:num_replies "4" . > > What's happening is that the href URI is set as new subject because there > are no rel/rev (due to the parsing rule 4 at [2]). Adding rel="" does the > trick and the Ubiquity-rdfa parser return the expected triple. Another > option would be to repeat about="/node/12" in the a tag, though I like the > empty rel better: > > <div about="/node/12"> > <ul> > <li> > <a content="4" property="sioc:num_replies" rel="" > href="/node/12#comments">4 comments</a> > </li> > </ul> > </div> > > I just wanted to check and make sure there is not problem in using the empty > rel hack, or whether there is a better way of working around this? > > Steph. > > [1] http://drupalrdf.openspring.net/ > [2] http://www.w3.org/TR/rdfa-syntax/#sec_5.5. > -- Ivan Herman, W3C Semantic Web Activity Lead Home: http://www.w3.org/People/Ivan/ mobile: +31-641044153 PGP Key: http://www.ivan-herman.net/pgpkey.html FOAF : http://www.ivan-herman.net/foaf.rdf vCard : http://www.ivan-herman.net/HermanIvan.vcf
Attachments
- application/pkcs7-signature attachment: S/MIME Cryptographic Signature
Received on Friday, 15 January 2010 08:52:28 UTC