linkable table captions
authorLuc Moreau <l.moreau@ecs.soton.ac.uk>
Wed, 11 Jul 2012 14:36:29 +0100
changeset 3947 f5c544e20231
parent 3946 61ebd83b4338
child 3948 a5a890cbd636
child 3998 2f6d049e6de6
linkable table captions
model/prov-dm.html
--- a/model/prov-dm.html	Wed Jul 11 09:28:59 2012 -0400
+++ b/model/prov-dm.html	Wed Jul 11 14:36:29 2012 +0100
@@ -76,11 +76,26 @@
           var mycount=figureCount++;
 
           $(this).replaceWith(function(){return $('<span>').addClass('figcaption').attr('data-count', mycount).attr('id',myid).append("Figure " + mycount)
-.append($('<sup>').append($('<a>').addClass('internalDFN').attr('href','#'+myid).append($('<span>').addClass('diamond').append(" &#9674;:"))))
+.append($('<sup>').append($('<a>').addClass('internalDFN').attr('href','#'+myid).append($('<span>').addClass('diamond').append(" &#9674;:")))).append(" ")
 .append($(this).contents())});
         });
       }
 
+        // function to update caption with linkable diamond
+      function updateCaptions() {
+	var tableCount=1;
+
+        $('caption').each(function(index) {
+
+          var myid=$(this).attr('id');
+          var mycount=tableCount++;
+
+          $(this).attr('data-count', mycount)
+.prepend($('<span>').append("Table " + mycount)
+		  .append($('<sup>').append($('<a>').addClass('internalDFN').attr('href','#'+myid).append($('<span>').addClass('diamond').append(" &#9674;:")))).append(" "))
+        });
+      }
+
         // function to replace figure since not allowed by prov rules, and not transformed by respec.js
       function updateFigures() {
         $('figure').each(function(index) {
@@ -204,6 +219,7 @@
         $('#glossary_div').html(glossary_string)
         updateGlossaryRefs();
         updateFigCaptions();
+        updateCaptions();
         updateExamples();
         updateExamplesRefs();
 
@@ -618,7 +634,7 @@
 
 <div style="text-align: left;">
 <table  class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="namespace-table">Table 1: Prefix and Namespaces used in this specification</caption>
+<caption id="namespace-table">Prefix and Namespaces used in this specification</caption> <!-- Table 1-->
 <tr><td><a><b>prefix</b></a></td><td><b>namespace uri</b></td> <td><b>definition</b></td></tr>
 <tr><td><a>prov</a></td><td>http://www.w3.org/ns/prov#</td><td>The PROV namespace (see <a class="section-ref" href="#term-NamespaceDeclaration"><span>TBD</span></a>)</td></tr>
 <tr><td><a>xsd</a></td><td>http://www.w3.org/2000/10/XMLSchema#</td><td>XML Schema Namespace [[!XMLSCHEMA11-2]]</td></tr>
@@ -675,7 +691,7 @@
 
 <div style="text-align: left;">
 <table  class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="overview-types-and-relations">Table 2: Mapping of PROV core concepts to  types and relations</caption>
+<caption id="overview-types-and-relations">Mapping of PROV core concepts to  types and relations</caption> <!-- Table 2 -->
 <tr><td><a><b>PROV Concepts</b></a></td><td><b>PROV-DM types or relations</b></td><td><b>Name</b></td><td><b>Overview</b></td></tr>
 <tr>
 <td><a>Entity</a></td><td rowspan="3" style="text-align: center;">PROV-DM Types</td><td><a title="dfn-Entity">Entity</a></td><td style="text-align: center;"><a class="section-ref" href="#section-entity-activity"><span>TBD</span></a></td></tr>
@@ -1132,7 +1148,7 @@
 
 <div id="components-overview-div" style="text-align: center;">
 <table  class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="components-overview">Table 3: Components Overview</caption>
+<caption id="components-overview">Components Overview</caption> <!-- Table 3:  -->
 <tr><td style="border-width: 0px; "></td><td>Component</td><td>Core <br>Structures</td><td>Overview</td><td>Specification</td><td>Description</td></tr> 
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 <tr><td style="	padding: 8px;">1</td><td style="text-align: left;">Entities and Activities</td><td>&#10004;</td><td><a href="#section-entity-activity">2.1.1</a></td><td><a href="#component1">5.1</a></td><td  style="text-align: left;">about entities and activities, and their interrelations</td></tr> 
@@ -1480,7 +1496,7 @@
 
 <div id="relations-at-a-glance-div" style="text-align: center;">
 <table   class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="relations-at-a-glance">Table 4: PROV-DM Relations At a Glance</caption>
+<caption id="relations-at-a-glance">PROV-DM Relations At a Glance</caption> <!-- Table 4 -->
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td colspan="6">Object</td></tr> 
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td colspan="2">Entity</td><td colspan="2">Activity</td><td colspan="2">Agent</td></tr> 
 <tr><td rowspan="3">Subject</td><td>Entity</td><td colspan="2"><div class="component2-color"><a class="essential">WasDerivedFrom</a><br><a>Revision</a><br><a>Quotation</a><br><a>PrimarySource</a></div><div class="component5-color"><a>AlternateOf</a><br><a>SpecializationOf</a><br><a>MentionOf</a></div></td><td class="component1-color"><a class="essential"
@@ -1504,7 +1520,7 @@
 
 <div id="prov-dm-types-and-relations-fig" style="text-align: left;">
 <table  class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="prov-dm-types-and-relations">Table 5: PROV-DM Types and Relations</caption>
+<caption id="prov-dm-types-and-relations">PROV-DM Types and Relations</caption> <!-- Table 5-->
 <tr><td><a><b>Type or Relation Name</b></a></td><td><b>Representation in the PROV-N notation</b></td><td><b>Component</b></td></tr>
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 
@@ -3253,7 +3269,7 @@
 
 <div id="attributes-at-a-glance-divz" style="text-align: left;">
 <table   class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="attributes-at-a-glance">Table 6: PROV-DM Attributes At a Glance</caption>
+<caption id="attributes-at-a-glance">PROV-DM Attributes At a Glance</caption> <!-- Table 6 -->
 <tr><td><b>Attribute</b></td><td><b>Allowed In</b></td><td><b>value</b></td><td><b>Section</b></td></tr> 
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "><td style="border-width: 0px; "></td></tr>
 <tr><td><a title="label">prov:label</a></td><td><em>any construct</em></td><td>A <a>Value</a> of type <a class="section-ref" href="http://www.w3.org/TR/xmlschema11-2/#string">xsd:string</a></td><td><a class="section-ref" href="#term-attribute-label"><span>TBD</span></a> </td></tr>
@@ -3359,7 +3375,7 @@
 
 
 <table class="thinborder" style="margin-left: auto; margin-right: auto;">
-<caption id="prov-dm-predefined-types">Table 7: PROV-DM Predefined Types</caption>
+<caption id="prov-dm-predefined-types">PROV-DM Predefined Types</caption> <!-- Table 7 -->
 <tr><td><b>Type</b></td><td><b>Specification</b></td><td><b>Core concept</b></td></tr>
 <tr><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td><td style="border-width: 0px; "></td></tr>
 <tr><td><a title="bundle"><span class="name">prov:Bundle</span></a></td><td><a class="section-ref" href="#term-bundle"><span>TBD</span></a></td><td><a>Entity</a></td></tr>