Fix tref definition to add externalDFN and internalDFN.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Tue, 19 Feb 2013 09:13:26 -0800
changeset 1310 5714b52704b4
parent 1309 53baef163d83
child 1311 baa92bbfbcbc
Fix tref definition to add externalDFN and internalDFN.
spec/latest/respec-w3c-extensions.js
--- a/spec/latest/respec-w3c-extensions.js	Tue Feb 19 17:49:35 2013 +0100
+++ b/spec/latest/respec-w3c-extensions.js	Tue Feb 19 09:13:26 2013 -0800
@@ -104,7 +104,7 @@
             var sp = document.createElement( 'dfn' ) ;
             sp.title = ref ;
             sp.innerHTML = con ;
-            sp.id = 'T-'+ref;
+            sp.id = 'dfn-'+ref;
             tdefs[ref] = '#' + sp.id ;
             p.replaceChild(sp, item) ;
         }
@@ -123,15 +123,17 @@
                 ref = ref.replace(/\s+/g, '-').toLowerCase() ;
             }
             var href = item.getAttribute('href');
+            var className = 'tref internalDFN';
             if (href) {
               tdefs[ref] = href;
+              className = 'tref externalDFN';
             }
             if ( !tdefs[ref]) {
               throw "Reference to undefined term '" + ref + "'" ;
             }
             var sp = document.createElement( 'a' ) ;
             var id = item.textContent ;
-            sp.className = 'tref' ;
+            sp.className = className ;
             sp.title = ref ;
             sp.innerHTML = con ;
             sp.href= tdefs[ref] ;