2009/dap/ReSpec.js/js respec.js,1.127,1.128

Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv6150

Modified Files:
	respec.js 
Log Message:
Changed RDFa structures for foaf:issued and foaf:publisher
Added _ISODate method to emit a UTC date in xsd:dateTime format.

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- respec.js	5 Jul 2010 19:02:24 -0000	1.127
+++ respec.js	6 Jul 2010 18:48:26 -0000	1.128
@@ -303,7 +303,7 @@
         }
         if (this.doRDFa) {
             if (prefixAtr != '') prefixAtr += ' ';
-            prefixAtr += "dcterms: http://purl.org/dc/terms/ bibo: http://purl.org/ontology/bibo/ foaf: http://xmlns.com/foaf/0.1/";
+            prefixAtr += "dcterms: http://purl.org/dc/terms/ bibo: http://purl.org/ontology/bibo/ foaf: http://xmlns.com/foaf/0.1/ xsd: http://www.w3.org/2001/XMLSchema#";
             str += " prefix=\"" + this._esc(prefixAtr) + "\"";
         }
 
@@ -619,7 +619,7 @@
                 header += "<h2 rel='bibo:subtitle' id='subtitle'>" + this.subtitle + "</h2>" ;
             }
             header +=
-                "<h2 property='dcterms:issued' content='" + this.publishDate + "'>" + (this.specStatus == "unofficial" ? "" : "W3C ") + 
+                "<h2 property='dcterms:issued' datatype='xsd:dateTime' content='" + this._ISODate(this.publishDate) + "'>" + (this.specStatus == "unofficial" ? "" : "W3C ") + 
                 this.status2text[this.specStatus] + " " + this._humanDate(this.publishDate) + "</h2><dl>";
         } else {
             header +=
@@ -711,7 +711,7 @@
             header += this.publishDate.getFullYear();
             if (this.additionalCopyrightHolders) header += " " + this.additionalCopyrightHolders + " &amp;";
             if (this.doRDFa) {
-                header += " <a rel='dcterms:publisher' href='http://www.w3.org/'><acronym title='World Wide Web Consortium'>W3C</acronym></a><sup>&reg;</sup> ";
+                header += " <span rel='dcterms:publisher'><span resource='[_:publisher]' rel='foaf:Organization'><a rel='foaf:homepage' href='http://www.w3.org/'><acronym about='[_:publisher]' property='foaf:name' content='World Wide Web Consortium' title='World Wide Web Consortium'>W3C</acronym></a><sup>&reg;</sup></span></span> ";
             } else {
                 header += " <a href='http://www.w3.org/'><acronym title='World Wide Web Consortium'>W3C</acronym></a><sup>&reg;</sup> " ;
             }
@@ -1243,6 +1243,10 @@
     _concatDate:    function (date) {
         return "" + date.getFullYear() + this._lead0(date.getMonth() + 1) + this._lead0(date.getDate());
     },
+
+    _ISODate:       function (date) {
+        return "" + date.getUTCFullYear() +'-'+ this._lead0(date.getUTCMonth() + 1)+'-' + this._lead0(date.getUTCDate()) +'T'+this._lead0(date.getUTCHours())+':'+this._lead0(date.getUTCMinutes()) +":"+this._lead0(date.getUTCSeconds())+'+0000';
+    },
     
     _parseDate:    function (str) {
         return new Date(str.substr(0, 4), (str.substr(5, 2) - 1), str.substr(8, 2));

Received on Tuesday, 6 July 2010 18:48:29 UTC