* for testing reasons copied over dcat-ucr into new data-cube-ucr folder. Will be adapted to data-cube, now.
authorbkaempge
Wed, 22 Feb 2012 14:09:23 +0100
changeset 96 6dd45ddb265b
parent 77 ad7d406ee455
child 97 880f64e1564a
* for testing reasons copied over dcat-ucr into new data-cube-ucr folder. Will be adapted to data-cube, now.
data-cube-ucr/index.html
data-cube-ucr/local-style.css
data-cube-ucr/respec-config.js
data-cube-ucr/respec-ref.js
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data-cube-ucr/index.html	Wed Feb 22 14:09:23 2012 +0100
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
+                      "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<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" />
+</head>
+<body>
+
+<section id="abstract">
+<p>
+@@ Abstract
+</p>
+</section>
+
+<section id="sotd">
+  <p>This is a working document of the <a href="http://www.w3.org/2011/gld/wiki/Data_Cube_Vocabulary">Data Catalog Vocabulary project</a> within the <a href="http://www.w3.org/2011/gld/">W3C Government Linked Data Working Group</a>. Feedback is welcome and should be sent to the <a href="mailto:public-gld-wg@w3.org">public-gld-wg@w3.org mailing list</a>.</p>
+</section>
+
+<section>
+<h2>Introduction</h2>
+
+<p>@@@ a few paragraphs about the context here.</p>
+</section>
+
+
+<section>
+<h2>Terminology</h2>
+<p>A <dfn>dataset</dfn> is a collection of information in a <a>machine-readable</a> format. It is published by an agency, usually some sort of official government organisation, and thought to be useful to the public.</p>
+
+<p>A <dfn>catalog record</dfn> consists of <a>metadata</a> for a <a>dataset</a>. It thus describes the dataset. The actual dataset is not considered part of the catalog record, but the catalog record usually contains a download link or web page link from where the actual dataset can be obtained.</p>
+
+<p>A <dfn>catalog</dfn> is a collection of <a id="catalog record">catalog records</a>, and thus contains <a>metadata</a> for a collection of <a id="dataset">datasets</a>. It is operated by a <a>catalog operator</a>, which could be a government agency, citizen initiative, …</p>
+
+<p><dfn>Metadata</dfn> are …</p>
+
+<p>A format is <dfn>machine-readable</dfn> if …</p>
+
+<p>A <dfn>catalog operator</dfn> is …</p>
+</section>
+
+
+<section>
+<h2>Use cases</h2>
+<p>@@@ One introductory sentence here</p>
+
+<section>
+<h3>Creating a combined catalog from multiple data catalogs (UC1)</h3>
+
+<p>An increasing number of government agencies make their data available on-line in the form of data catalogs such as <a href="http://data.gov/">data.gov</a> (see <a href="http://datacatalogs.org/">datacatalogs.org</a>for a list). Catalogs exist at national, regional and local level; some are operated by official government bodies and others by citizen initiatives; some have general coverage, while others have a specific focus (e.g., <a href="http://www.statcentral.ie/">statistical data</a>, <a href="http://www.ndad.nationalarchives.gov.uk/">historical datasets</a>).</p>
+
+<p>Citizens, journalists, researchers and businesses thus may have to spend considerable amounts of time searching a number of catalogs for relevant datasets. <dfn id="federated catalog">Federated catalogs</dfn> such as the Guardian's <a href="http://www.guardian.co.uk/world-government-data">World Government Data site</a>, Sunlight Labs' <a href="http://nationaldatacatalog.com/">National Data Catalog</a>, and OKFN's <a href="http://publicdata.eu/">publicdata.eu</a> are emerging as a response to this problem. They present a unified catalog and unified user interface. They may also provide additional advanced features that individual catalog operators will not or can not supply, such as convenient APIs for mashup developers.</p>
+
+<p>The federated catalog replicates individual catalogs' contents into its local database. A website interface similar to those of current individual catalogs is offered for interacting with the federated catalog. Updates to the individual catalogs (new datasets, modified metadata, deleted datasets) also have to be reflected in the federated catalog.</p>
+
+<p>Creating federated catalogs is challenging for various reasons:</p>
+
+<ol>
+<li>Not all catalogs make their records available in a <a>machine-readable</a> form, forcing the developers of federated catalogs to employ screen scraping.</li>
+<li>Where the catalog is available in machine-processable form, it is usually in a <em>custom one-off format</em>, requiring the development of custom importers for each catalog that is to be federated.
+<li>The developer of the federated catalog has to undertake the task of mapping and <em>harmonising the metadata fields</em> provided by different catalogs.</li>
+</ol>
+
+<p>A standard format for data catalogs helps with all three problems: First, the existence of a well-documented standard creates an additional <em>incentive towards publishing machine-readable metadata</em> for the catalog operators. Second, a <em>single importer</em> can be used to import all catalogs that support the format. Third, <em>harmonising metadata fields becomes the job of individual catalog operators</em>, who know the contents of their own catalog best.</p>
+</section>
+
+
+<section>
+<h3>Including metadata published directly on agency web sites into catalogs (UC2)</h3>
+
+<p>The model of most current data catalogs assumes that <em>agencies publish datasets on their own website</em>, and then <em>register the dataset with the central catalog</em> by providing the download location and other metadata to the catalog operator. This model is not always efficient. Individual agencies sometimes have existing dataset publishing workflows and metadata management capabilities (e.g., statistics offices). Also, the amount and nature of metadata that agencies can provide differs widely, and a central catalog with a single, non-extensible metadata schema cannot capture the requirements of a wide range of government institutions.</p>
+
+<p>In a <em>distributed publishing model</em>, on the other hand, <em>agencies manage their own metadata</em> on their own websites, using their own publishing workflows and information systems. Central catalogs such as data.gov play the role of <em>aggregator</em> that collects dataset descriptions from different agency websites and presents them in a unified user interface. The central catalog must somehow be able to <em>discover newly published datasets</em> on an agency's web site, e.g., by crawling or by receiving an automated notification from the agency. There also has to be a way of <em>notifying about changes to the metadata</em>.</p>
+
+<p>Note that individual agencies in this scenario may not want to run a full-blown “agency-level data catalog”, but may just want to make metadata available in a more structured form alongside the datasets that are already scattered throughout its web site. This distinguishes this use case from the catalog federation scenario (UC1), which assumes that the sites to be federated are dedicated data catalog websites.</p>
+</section>
+
+
+<section>
+<h3>Advanced queries against catalogs (UC3)</h3>
+
+<p>All catalogs websites provide some sort of <em>parametric search facility</em> (e.g., search by publishing agency, by data format, or by theme). Available search parameters differ among catalogs and they <em>are not sufficient for all users needs</em>. For example, data.gov provides search by department, format and category, but not by keyword, update date, or temporal/geographic coverage.</p>
+
+<p>If catalogs are exposed in a <em>standard machine-readable format</em>, then third parties are able to <em>replicate the contents of a catalog into their own database</em>, and run advanced queries over the catalog, or provide interfaces for performing such queries to the general public.</p>
+
+<p>Queries may rely on information that is not present in the catalog but in <em>external sources</em>. For example, by using the <a href="http://www.oegov.us/democracy/us/core/owl/us1gov.n3">US Government Structure Ontology</a> one can query for datasets published by an agency that directly reports to the Executive Office of the President.</p>
+</section>
+
+
+<section>
+<h3>Bulk download of datasets (UC4)</h3>
+
+<p>Data catalogs support the creation of innovative mashups of government data by making it easier for developers to find data sources of interest. Developers may browse or search the catalog until they have found a dataset of interest, and then download the linked file.</p>
+
+<p>However some mashups and applications <em>may access not just one but a very large number of datasets</em> from a catalog. For example, an application could make <em>all</em> geographic datasets (in ESRI shapefile, GML, KML formats) available for display on a map.</p>
+
+<p>The creation of such applications would become much easier if it was possible to <em>automate the downloading of all datasets</em> that meet certain criteria. Furthermore, the ability to <em>automatically discover new datasets</em> that meet those criteria, and to <em>discover updated datasets</em>, would be useful.</p>
+</section>
+
+</section>
+
+
+<section>
+<h2>Requirements</h2>
+
+<p>@@@ Intro sentence</p>
+
+<section>
+<h3>Machine-readable representations of catalog entries</h3>
+
+<p>Must allow retrieval of a machine-readable representation of catalog entries.</p>
+
+<p>Required by: UC1, UC2, UC3, UC4</p>
+</section>
+
+
+<section>
+<h3>Retrieval of all catalog entries</h3>
+
+<p>Must allow retrieval of all entries in a catalog.</p>
+
+<p>Required by: UC1, UC3, UC4</p>
+</section>
+
+
+<section>
+<h3>Persistent URIs for catalog entries</h3>
+
+<p>Must provide stable, persistent identifiers for individual entries.</p>
+
+<p>Required by: UC1, UC2</p>
+</section>
+
+
+<section>
+<h3>Update checks for individual datasets</h3>
+
+<p>Must allow checking wether an individual dataset has changed or was updated.</p>
+
+<p>Required by: UC2</p>
+</section>
+
+
+<section>
+<h3>Discovery of new and updated catalog entries</h3>
+
+<p>Must allow the discovery of new entries in a catalog, and the discovery of entries that have been recently updated.</p>
+
+<p>Required by: UC1, UC4</p>
+</section>
+
+
+<section>
+<h3>Tracking of data provenance</h3>
+
+<p>Must include pointers/links to original catalog record when an entry is federated into another catalog.</p>
+
+<p>Required by: UC1, UC2</p>
+</section>
+
+
+<section>
+<h3>Coverage of typical catalog metadata</h3>
+
+<p>Must cover the metadata that is found in typical government data catalogs.</p>
+
+<p>Required by: all use cases</p>
+</section>
+
+
+<section>
+<h3>Simple transformation from existing catalog data</h3>
+
+<p>Must allow population from existing data catalogs without requiring the production of new metadata, or an expensive (that is, manual) modification of existing metadata. In other words, implementing the standard format for an existing data catalog must not require cleaning up or otherwise modifying the metadata that your catalog collects beyond simple mechanical transformations.</p>
+
+<p>Required by: all use cases</p>
+</section>
+
+
+<section>
+<h3>Extensible metadata model</h3>
+
+<p>Must be extensible with additional, catalog-specific metadata fields.</p>
+
+<p>Required by: UC2</p>
+</section>
+
+
+<section>
+<h3>Bandwidth conserving</h3>
+
+<p>Must scale to catalogs that contain thousands of datasets without putting unreasonable strain on the bandwidth resources of catalog operator and catalog consumer.</p>
+
+<p>Required by: all use cases</p>
+</section>
+
+
+<section>
+<h3>Standard Queries on Entries and Catalog Metadata</h3>
+
+<p>Must allow to query the entries and catalog metadata using a standard mechanism (e.g., SPARQL, XQuery, OpenSearch, etc.).</p>
+
+<p>Required by: UC3</p>
+</section>
+
+
+</section>
+
+
+<section class="appendix">
+<h2>Acknowledgments</h2>
+<p>The editors are very thankful for comments and suggestions ...</p>
+</section>
+
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data-cube-ucr/local-style.css	Wed Feb 22 14:09:23 2012 +0100
@@ -0,0 +1,151 @@
+
+.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; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data-cube-ucr/respec-config.js	Wed Feb 22 14:09:23 2012 +0100
@@ -0,0 +1,96 @@
+var respecConfig = {
+    // specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
+    specStatus:           "ED",
+    //copyrightStart:       "2010",
+
+    // the specification's short name, as in http://www.w3.org/TR/short-name/
+    shortName:            "dcat-ucr",
+    //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-ucr/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: "Richard Cyganiak", url: "http://richard.cyganiak.de/", company: "DERI, NUI Galway", companyURL: "http://www.deri.ie/" },
+        { name: "Fadi Maali", company: "DERI, NUI Galway", companyURL: "http://www.deri.ie/" },
+    ],
+
+    // 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: 3,
+    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;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data-cube-ucr/respec-ref.js	Wed Feb 22 14:09:23 2012 +0100
@@ -0,0 +1,127 @@
+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