Needed for respec
authorPhil@Phil-Desktop
Thu, 09 Feb 2012 11:47:38 +0000
changeset 69 d688e2a8d9de
parent 68 c1cf1e9777b6
child 70 7f27d6bcc38a
Needed for respec
dcat/respec-config.js
dcat/respec-ref.js
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dcat/respec-config.js	Thu Feb 09 11:47:38 2012 +0000
@@ -0,0 +1,99 @@
+var respecConfig = {
+    // specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
+    specStatus:           "ED",
+    // publishDate:          "2012-02-09",
+    //copyrightStart:       "2010",
+
+    // the specification's short name, as in http://www.w3.org/TR/short-name/
+    shortName:            "dcat",
+    //subtitle:             "",
+    // if you wish the publication date to be other than today, set this
+    // publishDate:  "2009-08-06",
+
+    // if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
+    // and its maturity status
+    //previousPublishDate:  "2011-06-26",
+    //previousMaturity:     "ED",
+    //previousDiffURI:      "http://dvcs.w3.org/hg/gld/bp/",
+    diffTool:             "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
+
+    // if there a publicly available Editor's Draft, this is the link
+    edDraftURI:           "http://dvcs.w3.org/hg/gld/raw-file/default/dcat/index.html",
+
+    // if this is a LCWD, uncomment and set the end of its review period
+    // lcEnd: "2009-08-05",
+
+    // if you want to have extra CSS, append them to this list
+    // it is recommended that the respec.css stylesheet be kept
+    extraCSS:             [
+        "http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css"
+    ],
+
+    // editors, add as many as you like
+    // only "name" is required
+    editors:  [
+        { name: "Fadi Maali", url: "mailto:fadi.maali@deri.org", company: "DERI, NUIG", companyURL: "http://www.deri.ie"},
+        { name: "John Erickson", url: "mailto:olyerickson@gmail.com", company: "Tetherless World Constellation (RPI)", companyURL: "http://tw.rpi.edu/" },
+        { name: "Phil Archer", url: "mailto:phila@w3.org", company: "W3C/ERCIM", companyURL: "http://www.w3.org/"},
+
+    ],
+
+    // authors, add as many as you like. 
+    // This is optional, uncomment if you have authors as well as editors.
+    // only "name" is required. Same format as editors.
+
+    //authors:  [],
+
+    // name of the WG
+    wg:           "Government Linked Data Working Group",
+
+    // URI of the public WG page
+    wgURI:        "http://www.w3.org/2011/gld/",
+
+    // name of the public mailing to which comments are due
+    wgPublicList: "public-gld-wg",
+
+    // URI of the patent status for this WG, for Rec-track documents
+    // !!!! IMPORTANT !!!!
+    // This is important for Rec-track documents, do not copy a patent URI from a random
+    // document unless you know what you're doing. If in doubt ask your friendly neighbourhood
+    // Team Contact.
+    wgPatentURI:  "",
+    maxTocLevel: 2,
+    preProcess: [ preProc ]
+    //alternateFormats: [ {uri: "diff-20110507.html", label: "diff to previous version"} ],
+};
+
+function updateExample(doc, content) {
+  // perform transformations to make it render and prettier
+  content = content.replace(/<!--/, '');
+  content = content.replace(/-->/, '');
+  content = doc._esc(content);
+  content = content.replace(/\*\*\*\*([^*]*)\*\*\*\*/g, '<span class="diff">$1</span>') ;
+  return content ;
+}
+
+function updateDTD(doc, content) {
+  // perform transformations to
+  // make it render and prettier
+  content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
+  content = content.replace(/!ENTITY % ([^ \t\r\n]*)/g, '!ENTITY <span class="entity">% $1</span>');
+  content = content.replace(/!ELEMENT ([^ \t$]*)/mg, '!ELEMENT <span class="element">$1</span>');
+  return content;
+}
+
+function updateSchema(doc, content) {
+  // perform transformations to
+  // make it render and prettier
+  content = '<pre class="dtd">' + doc._esc(content) + '</pre>';
+  content = content.replace(/&lt;xs:element\s+name=&quot;([^&]*)&quot;/g, '&lt;xs:element name="<span class="element" id="schema_element_$1">$1</span>"') ;
+  return content;
+}
+
+function updateTTL(doc, content) {
+  // perform transformations to
+  // make it render and prettier
+  content = '<pre class="sh_sourceCode">' + doc._esc(content) + '</pre>';
+  content = content.replace(/@prefix/g, '<span class="sh_keyword">@prefix</span>');
+  return content;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dcat/respec-ref.js	Thu Feb 09 11:47:38 2012 +0000
@@ -0,0 +1,130 @@
+var preProc = {
+      apply:  function(c) {
+                // extend the bibliography entries
+
+                berjon.biblio["TURTLE"] = "<cite><a href=\"http://www.w3.org/TeamSubmission/2011/SUBM-turtle-20110328/\">Turtle - Terse RDF Triple Language</a></cite> D. Beckett and T. Berners-Lee.  W3C Team Submission 28 March 2011. URL: http://www.w3.org/TeamSubmission/turtle/ ";
+                berjon.biblio["XMLSCHEMA2"] = "<cite><a href=\"http://www.w3.org/TR/2011/CR-xmlschema11-2-20110721/\">W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes</a></cite> David Peterson; et al. W3C Proposed Recommendation 19 January 2012. URL: http://www.w3.org/TR/xmlschema11-2/ ";
+                berjon.biblio["MICRODATA"] = "<cite><a href=\"http://www.w3.org/TR/microdata/\">Microdata</a></cite> Ian Hickson; et al. 04 March 2010. W3C Working Draft. URL: http://www.w3.org/TR/microdata/ ";
+                berjon.biblio["XHTML-RDFA"] = "<cite><a href=\"http://www.w3.org/TR/xhtml-rdfa/\">XHTML+RDFa</a></cite> Manu Sporny; et al. 31 March 2011. W3C Working Draft. URL: http://www.w3.org/TR/xhtml-rdfa/ ";
+                berjon.biblio["HTML-RDFA"] = "<cite><a href=\"http://dev.w3.org/html5/rdfa/\">HTML+RDFa</a></cite> Manu Sporny; et al. 24 May 2011. W3C Working Draft. URL: http://dev.w3.org/html5/rdfa/ ";
+                berjon.biblio["HOWTO-LODP"] = "<cite><a href=\"http://linkeddata.org/docs/how-to-publish\">How to Publish Linked Data on the Web</a></cite>, C. Bizer, R. Cyganiak, and Tom Heath, Community Tutorial 17 July 2008. URL: http://linkeddata.org/docs/how-to-publish";
+                berjon.biblio["COOL-SWURIS"] = "<cite><a href=\"http://www.w3.org/TR/cooluris/\">Cool URIs for the Semantic Web</a></cite>, L. Sauermann and R. Cyganiak, W3C Interest Group Note 03 December 2008. URL: http://www.w3.org/TR/cooluris/";
+                berjon.biblio["VOID-GUIDE"] = "<cite><a href=\"http://www.w3.org/TR/void/\">Describing Linked Datasets with the VoID Vocabulary</a></cite>, K. Alexander, R. Cyganiak, M. Hausenblas, and J. Zhao, W3C Interest Group Note 03 March 2011. URL: http://www.w3.org/TR/void/";
+                berjon.biblio["RDFA-CORE-PROFILE"] = "<cite><a href=\"http://www.w3.org/profile/rdfa-1.1\">RDFa Core Default Profile</a></cite>, I. Herman, W3C RDF Web Applications Working Group 02 June 2011. URL: http://www.w3.org/profile/rdfa-1.1";
+                berjon.biblio["XHTML-RDFA-PROFILE"] = "<cite><a href=\"http://www.w3.org/profile/html-rdfa-1.1\">HTML+RDFa Core Default Profile</a></cite>, I. Herman, W3C RDF Web Applications Working Group 24 May 2011. URL: http://www.w3.org/profile/html-rdfa-1.1";
+                berjon.biblio["RFC2616"] = "<cite><a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616.html\">Hypertext Transfer Protocol -- HTTP/1.1</a></cite>, R. Fielding; et al. June 1999. Internet RFC 2616. URL: http://www.w3.org/Protocols/rfc2616/rfc2616.html."
+
+                // process the document before anything else is done
+                var refs = document.querySelectorAll('adef') ;
+                for (var i = 0; i < refs.length; i++) {
+                    var item = refs[i];
+                    var p = item.parentNode ;
+                    var con = item.innerHTML ;
+                    var sp = document.createElement( 'dfn' ) ;
+                    var tit = item.getAttribute('title') ;
+                    if (!tit) {
+                        tit = con;
+                    }
+                    sp.className = 'adef' ;
+                    sp.title=tit ;
+                    sp.innerHTML = con ;
+                    p.replaceChild(sp, item) ;
+                }
+                refs = document.querySelectorAll('aref') ;
+                for (var i = 0; i < refs.length; i++) {
+                    var item = refs[i];
+                    var p = item.parentNode ;
+                    var con = item.innerHTML ;
+                    var sp = document.createElement( 'a' ) ;
+                    sp.className = 'aref' ;
+                    sp.setAttribute('title', con);
+                    sp.innerHTML = '@'+con ;
+                    p.replaceChild(sp, item) ;
+                }
+                // local datatype references
+                refs = document.querySelectorAll('ldtref') ;
+                for (var i = 0; i < refs.length; i++) {
+                    var item = refs[i];
+                    if (!item) continue ;
+                    var p = item.parentNode ;
+                    var con = item.innerHTML ;
+                    var ref = item.getAttribute('title') ;
+                    if (!ref) {
+                        ref = item.textContent ;
+                    }
+                    if (ref) {
+                        ref = ref.replace(/\n/g, '_') ;
+                        ref = ref.replace(/\s+/g, '_') ;
+                    }
+                    var sp = document.createElement( 'a' ) ;
+                    sp.className = 'datatype';
+                    sp.title = ref ;
+                    sp.innerHTML = con ;
+                    p.replaceChild(sp, item) ;
+                }
+                // external datatype references
+                refs = document.querySelectorAll('dtref') ;
+                for (var i = 0; i < refs.length; i++) {
+                    var item = refs[i];
+                    if (!item) continue ;
+                    var p = item.parentNode ;
+                    var con = item.innerHTML ;
+                    var ref = item.getAttribute('title') ;
+                    if (!ref) {
+                        ref = item.textContent ;
+                    }
+                    if (ref) {
+                        ref = ref.replace(/\n/g, '_') ;
+                        ref = ref.replace(/\s+/g, '_') ;
+                    }
+                    var sp = document.createElement( 'a' ) ;
+                    sp.className = 'externalDFN';
+                    sp.title = ref ;
+                    sp.innerHTML = con ;
+                    p.replaceChild(sp, item) ;
+                }
+                // now do terms
+                refs = document.querySelectorAll('tdef') ;
+                for (var i = 0; i < refs.length; i++) {
+                    var item = refs[i];
+                    if (!item) continue ;
+                    var p = item.parentNode ;
+                    var con = item.innerHTML ;
+                    var ref = item.getAttribute('title') ;
+                    if (!ref) {
+                        ref = item.textContent ;
+                    }
+                    if (ref) {
+                        ref = ref.replace(/\n/g, '_') ;
+                        ref = ref.replace(/\s+/g, '_') ;
+                    }
+                    var sp = document.createElement( 'dfn' ) ;
+                    sp.title = ref ;
+                    sp.innerHTML = con ;
+                    p.replaceChild(sp, item) ;
+                }
+                // now term references
+                refs = document.querySelectorAll('tref') ;
+                for (var i = 0; i < refs.length; i++) {
+                    var item = refs[i];
+                    if (!item) continue ;
+                    var p = item.parentNode ;
+                    var con = item.innerHTML ;
+                    var ref = item.getAttribute('title') ;
+                    if (!ref) {
+                        ref = item.textContent ;
+                    }
+                    if (ref) {
+                        ref = ref.replace(/\n/g, '_') ;
+                        ref = ref.replace(/\s+/g, '_') ;
+                    }
+
+                    var sp = document.createElement( 'a' ) ;
+                    var id = item.textContent ;
+                    sp.className = 'tref' ;
+                    sp.title = ref ;
+                    sp.innerHTML = con ;
+                    p.replaceChild(sp, item) ;
+                }
+            }
+    } ;
\ No newline at end of file