make dcat-ucr use the global ReSpec instance
authorRichard Cyganiak <richard@cyganiak.de>
Sat, 11 Feb 2012 14:15:54 +0000
changeset 87 26012778fea6
parent 86 18f4fd7d778a
child 88 5a181159ccf6
make dcat-ucr use the global ReSpec instance
data-cube/respec-ref.js
dcat-ucr/index.html
dcat-ucr/local-style.css
dcat-ucr/respec-config.js
dcat-ucr/respec-ref.js
--- a/data-cube/respec-ref.js	Fri Feb 10 20:10:04 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-var preProc = {
-      apply:  function(c) {
-                // extend the bibliography entries
-                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
--- a/dcat-ucr/index.html	Fri Feb 10 20:10:04 2012 +0000
+++ b/dcat-ucr/index.html	Sat Feb 11 14:15:54 2012 +0000
@@ -5,10 +5,9 @@
 <head>
 	<title>Use Cases and Requirements for the Data Catalog Vocabulary</title>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<script type="text/javascript"src="http://dev.w3.org/2009/dap/ReSpec.js/js/respec.js" class="remove"></script>
-	<script src="respec-ref.js"></script>
-	<script src="respec-config.js"></script>
-	<link rel="stylesheet" type="text/css" href="local-style.css" />
+	<script type="text/javascript" src="../respec/ReSpec.js/js/respec.js" class="remove"></script>
+	<script src="../respec/gld-bib.js" class="remove"></script>
+	<script src="respec-config.js" class="remove"></script>
 </head>
 <body>
 
--- a/dcat-ucr/local-style.css	Fri Feb 10 20:10:04 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-
-.ldhcode {
-margin: 0px;
-padding: 10px;
-background: #ffffee;
-border: 1px solid #ffff88;
-}
-.turtlecode {
-margin: 0px;
-padding: 10px;
-background: #eeffee;
-border: 1px solid #88dd88;
-}
-.fig {
-text-align: center;
-}
-.fig img {
-border-bottom: 1px solid #bebebe;
-padding: 20px;
-margin-top: 20px;
-}
-.fig div {
-padding: 5px;
-}
-.fig div span {
-font-weight: bold;
-}
-.xsec h3 {
-font-size: 16px;
-text-align: left;
-margin-bottom: 5px;
-font-weight: bold;
-color: black;
-}
-.bc {
-text-align: left;
-border: 1px solid #e0e0e0;
-background: #ffffff url("http://upload.wikimedia.org/wikipedia/commons/d/db/Crystal_Clear_mimetype_vcard.png") no-repeat right -16px;
-padding: 20px 50px 20px 10px;
-margin: 0px;
-margin-top: 0px;
-}
-
-.todo {
-border: 3px solid #ff0;
-margin: 0 0 0 20px;
-padding: 10px;
-}
-
-.issue {
-border: 3px solid #f30;
-margin: 0 0 0 20px;
-padding: 10px;
-}
-
-.responsible {
-border: 3px solid #6a6;
-margin: 0 0 0 20px;
-padding: 10px;
-}
-
-
-ol.prereq li {
-padding-bottom: 10px;
-}
-ul.checklist-toc {
-margin-left: 20px;
-width: 650px;
-}
-ul.checklist-toc li {
-margin: 5px;
-padding: 10px;
-border: 1px solid #8f8f8f;
-list-style: none;
-}
-ul.inline-opt {
-margin-left: 20px;
-}
-ul.inline-opt li {
-margin: 5px;
-padding: 10px;
-}
-dl.decl dd {
-padding-bottom: 1em;	
-}
-dl.refs {
-margin: 10px;
-padding: 10px;
-}
-dl.refs dt {
-padding-bottom: 5px;
-}
-dl.refs dd {
-padding-bottom: 10px;
-margin-left: 15px;
-}
-dl.decl {
-border: 1px dashed black;
-padding: 10px;
-margin-left: 100px;
-margin-right: 100px;
-}
-dl.decl dt {
-padding-bottom: 5px;
-}
-dl.decl dd {
-padding-bottom: 10px;
-}
-dl tt {
-font-size: 110%;
-}
-table.example {
-border: 0px solid #9e9e9e;
-border-bottom: 0px;
-width: 100%;
-padding: 0px;
-margin-top: 20px;
-}
-table.example th {
-border-bottom: 1px solid #bebebe;
-border-top: 0px solid #bebebe;
-}
-table.example td {
-vertical-align: top;
-padding: 10px;
-padding-top: 10px;
-}
-table.example caption {
-border-top: 1px solid #bebebe;
-padding: 5px;
-caption-side: bottom;
-margin-bottom: 30px;
-}
-table.example caption span {
-font-weight: bold;
-}
-table.xtab {
-width: 100%;
-padding: 2px;
-background: #d0d0d0;
-}
-table.xtab th {
-border: 0px;
-border-bottom: 1px solid #fefefe;
-text-align: left;
-padding: 2px;
-padding-bottom: 1px;
-}
-
-.diff { font-weight:bold; color:#0a3; }
-
--- a/dcat-ucr/respec-config.js	Fri Feb 10 20:10:04 2012 +0000
+++ b/dcat-ucr/respec-config.js	Sat Feb 11 14:15:54 2012 +0000
@@ -57,40 +57,6 @@
     // Team Contact.
     wgPatentURI:  "",
     maxTocLevel: 3,
-    preProcess: [ preProc ]
+    preProcess: [ addGLDBiblio ]
     //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;
-}
--- a/dcat-ucr/respec-ref.js	Fri Feb 10 20:10:04 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-var preProc = {
-      apply:  function(c) {
-                // extend the bibliography entries
-                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