Re: Updating RDFa Core

(Bringing this discussion to the list, as it's of general interest)

As you know, I implemented these changes in the ReSpec2 version using jQuery. I did need to make some minor changes to the templates to give hooks to find authors, etc, but the changes are modular, and don't affect ReSpec code generation otherwise.

I did come across one odd thing in implementing this in jQuery, I couldn't get attr('prefix', '...') to set the @prefix. I think that 'prefix' might mean something special in jQuery (the prefix of the element?), but don't have time to look more deeply into this. Try this in Firebug:

d = $("<div><p/></div>")
d.children("p").attr("prefix", "dc: http://purl.org/dc/terms/")
d.html()

=> "<p></p>"


If you replace "prefix" with most anything else, it works okay.

Reading also poses problems:

d = $("<div><p prefix='dc: http://purl.org/dc/terms/'/></div>")
d.children("p").attr("prefix")

=> null

Gregg

On Jul 10, 2010, at 7:57 AM, Shane McCarron wrote:



On 7/9/2010 6:50 PM, Gregg Kellogg wrote:
A couple of other comments on RDFa form:

It was my understanding that http://purl.org/dc/elements/1.1/ is deprecated and http://purl.org/dc/terms/ is upwards compatible, that the "official" prefix to use would be "dc: http://purl.org/dc/terms/ " rather than "dcterms:". I certainly am not an expert, but in Section 2, you use dc: as the prefix. It would be odd to use dc: in the body of the document and dcterms: in the RDFa prefix mappings.

I have asked Manu for clarification on this, as I see both in use around the net.  I agree we should be consistent.

I will try to implement your markup suggestions below - note that this is machine generated so I need to ensure the changes are generic and don't break ReSpec when RDFa is NOT being generated.

Thanks!


The editor markup can be simplified by removing all BNode definitions (using typeof to create a BNode) as shown in the following:

<dl>
  <dd rel="bibo:editor">
    <span typeof="foaf:Person">
      <span property="foaf:name">Ben Adida</span>,
      <a rel="foaf:workplaceHomepage" href="http://creativecommons.org<http://creativecommons.org/>">Creative Commons</a>
      <a rel="foaf:mbox" href="mailto:ben@adida.net">ben@adida.net<mailto:ben@adida.net></a>
    </span>
  </dd>
  <dd rel="bibo:editor">
    <span typeof="foaf:Person">
      <span property="foaf:name">Mark Birbeck</span>,
      <a rel="foaf:workplaceHomepage" href="http://webBackplane.com<http://webBackplane.com/>">webBackplane</a>
      <a rel="foaf:mbox" href="mailto:mark.birbeck@webBackplane.com">mark.birbeck@webBackplane.com<mailto:mark.birbeck@webBackplane.com></a></span>
  </dd>
  <dd rel="bibo:editor">
    <span typeof="foaf:Person">
      <a rel="foaf:homepage" property="foaf:name" content="Shane McCarron" href="http://blog.halindrome.com<http://blog.halindrome.com/>">
        Shane McCarron
      </a>,
      <a rel="foaf:workplaceHomepage" href="http://www.aptest.com<http://www.aptest.com/>">
        Applied Testing and Technology, Inc.
      </a>
      <a rel="foaf:mbox" href="mailto:shane@aptest.com">shane@aptest.com<mailto:shane@aptest.com></a>
    </span>
  </dd>
  <dd rel="bibo:editor">
    <span typeof="foaf:Person">
      <span property="foaf:name">Ivan Herman</span>,
      <a rel="foaf:workplaceHomepage" href="http://www.w3.org/">W3C</a>
      <a rel="foaf:mbox" href="mailto:ivan@w3.org">ivan@w3.org<mailto:ivan@w3.org></a>
    </span>
  </dd>
</dl>

Copyright/License can also be simplified, as follows:

<p class="copyright">
  <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" rel="license">Copyright</a>
  © 2007-2010
  <span rel="dcterms:publisher">
    <span typeof="foaf:Organization">
      <a href="http://www.w3.org/" rel="foaf:homepage" content="World Wide Web Consortium" property="foaf:name">
        <acronym title="World Wide Web Consortium">
          W3C
        </acronym>
      </a>
      <sup>®</sup>
    </span>
  </span>
  (<a href="http://www.csail.mit.edu/">
    <acronym title="Massachusetts Institute of Technology">MIT</acronym>
  </a>,
  <a href="http://www.ercim.eu/">
    <acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym>
  </a>,
  <a href="http://www.keio.ac.jp/">Keio</a>),
  All Rights Reserved. W3C
  <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
  <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
  and
  <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
  rules apply.
</p>

Also, there should be foaf:Organization for MIT, Keio and ERCIM, unless they're not considered publishers.

Gregg

On Jul 5, 2010, at 12:39 PM, Shane McCarron wrote:

I have gone through the current source for RDFa Core and ensured that
all of the resolutions are reflected in it.  Manu wrote the section on
Error processing and that is included as well.  I decided to 'publish'
an updated Editor's draft just for fun.

There is an editor's draft at
http://www.w3.org/2010/02/rdfa/drafts/2010/ED-rdfa-core-20100705

This version reflects our first attempt at getting RDFa embedded in the
document.  This is done automatically via the ReSpec.js tool, so if I
made major errors in the triples that I picked, it is easy to fix.  I
couldn't have done this without a ton of advice from Manu over many
hours this holiday weekend.  Thanks!

There are also a handful of triples embeded manually.  These use the
bibo:affirmedBy predicate to connect changes in this version back to the
resolutions in our minutes.

Please let me know if you have any questions or concerns.

--
Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com<mailto:shane@aptest.com>






--
Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com<mailto:shane@aptest.com>

Received on Saturday, 10 July 2010 19:16:36 UTC