changeset 48:9b6e0e444322

lots of cleanup of proprietary/jscript hooks, adjusted for local use
author ht
date Wed, 23 Dec 2009 17:01:35 +0000
parents 7c35b6c6a447
children 1684b7ec0b10
files summa/english/thml.html.xsl
diffstat 1 files changed, 147 insertions(+), 225 deletions(-) [+]
line wrap: on
line diff
--- a/summa/english/thml.html.xsl	Sun Dec 20 22:51:58 2009 +0000
+++ b/summa/english/thml.html.xsl	Wed Dec 23 17:01:35 2009 +0000
@@ -1,10 +1,5 @@
-<xsl:stylesheet version="1.0"
-  xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xi  ="http://www.w3.org/2001/XInclude"
-  xmlns:lang="http://www.ccel.org/info/languageCodes.xml"
-  xmlns:letter="http://www.ccel.org/alphabetLetters"
-  xmlns:str="http://exslt.org/strings"
-  >
+<?xml version='1.0'?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:lang="http://www.ccel.org/info/languageCodes.xml" xmlns:letter="http://www.ccel.org/alphabetLetters" xmlns:str="http://exslt.org/strings">
 <xsl:output method="html" indent="yes" encoding="UTF-8"/>
 
 <!--
@@ -30,8 +25,10 @@
   term:	   for dictionary term lookup
   start:   for dictionary, show terms starting with this
   desktop  1 for running from CCEL-Desktop  
+  bibpath   relative path to bible html
   bver		single bible preference for the server
   ot_bib, nt_bib, ap_bib: bible preferences
+  bcb      1 to enable bcb
 -->
 
 <!-- set up parameter defaults -->
@@ -40,6 +37,7 @@
 <xsl:param name="notes">foot</xsl:param>
 <xsl:param name="words"></xsl:param>
 <xsl:param name="bver">asv</xsl:param>
+ <xsl:param name="bibpath">.</xsl:param>
 <xsl:param name="osisRef"></xsl:param>
 <xsl:param name="term"></xsl:param>
 <xsl:param name="start"></xsl:param>
@@ -59,6 +57,7 @@
 <xsl:when test="$bver"><xsl:value-of select="$bver"/></xsl:when>
 <xsl:otherwise>kjv</xsl:otherwise>
 </xsl:choose></xsl:param>
+ <xsl:param name="bcb">0</xsl:param>
 
 <!-- myNotes is what we should do with notes, whether passed in by the
      notes param or default (footnotes) -->
@@ -114,32 +113,21 @@
   </xsl:choose>
 </xsl:variable>
 
-<xsl:variable name="authLet"
-    select="substring($authorID,1,1)"/>
-<xsl:variable name="baseURI">/ccel/<xsl:value-of
-    select="$authorID"/>/<xsl:value-of
-    select="$bookID"/></xsl:variable>
-<xsl:variable name="homeURI">http://www.ccel.org<xsl:value-of
-    select="$baseURI"/></xsl:variable>
-<xsl:variable name="xmlfile">http://www.ccel.org/<xsl:value-of
-    select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of
-    select="$bookID"/>.xml</xsl:variable>
-<xsl:variable name="homedir">http://www.ccel.org/<xsl:value-of
-    select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of
-    select="$bookID"/></xsl:variable>
+<xsl:variable name="authLet" select="substring($authorID,1,1)"/>
+<xsl:variable name="baseURI">/ccel/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/></xsl:variable>
+<xsl:variable name="homeURI">http://www.ccel.org<xsl:value-of select="$baseURI"/></xsl:variable>
+<xsl:variable name="xmlfile">http://www.ccel.org/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/>.xml</xsl:variable>
+<xsl:variable name="homedir">http://www.ccel.org/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/></xsl:variable>
 
-<xsl:param name="rootPath">/ccel/<xsl:value-of select="$authLet"/>/<xsl:value-of
-	select="$authorID"/>/<xsl:value-of select="$bookID"/>/cache/xml/</xsl:param>
+<xsl:param name="rootPath">/ccel/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/>/cache/xml/</xsl:param>
 
-<xsl:variable name="bookInfo" select="concat('/ccel/',$authLet,'/',
-    $authorID, '/', $bookID, '/bookInfo.xml')"/>
+<xsl:variable name="bookInfo">bookInfo.xml</xsl:variable><!--concat('/ccel/',$authLet,'/',
+    $authorID, '/', $bookID, '/bookInfo.xml')-->
 
-<xsl:variable name="ccsubj"
-    select="/ThML/ThML.head/electronicEdInfo/DC/DC.Subject[@scheme='ccel']"/>
+<xsl:variable name="ccsubj" select="/ThML/ThML.head/electronicEdInfo/DC/DC.Subject[@scheme='ccel']"/>
 
 <!-- headtitle is used on left side of navbar -->
-<xsl:variable name="shorttitle"
-    select="/ThML/ThML.head/electronicEdInfo/DC/DC.Title[@sub='short']"/>
+<xsl:variable name="shorttitle" select="/ThML/ThML.head/electronicEdInfo/DC/DC.Title[@sub='short']"/>
 <xsl:variable name="headtitle"><xsl:choose><xsl:when test="$shorttitle"><xsl:value-of select="$shorttitle"/></xsl:when><xsl:otherwise><xsl:value-of select="$title"/></xsl:otherwise></xsl:choose></xsl:variable>
 <xsl:variable name="titlepage" select="/ThML/ThML.body/div1[1]"/>
 <xsl:variable name="titlepageID" select="$titlepage/@id"/>
@@ -193,15 +181,13 @@
 
 <xsl:variable name="osisRefOne">
   <xsl:choose>
-    <xsl:when test="contains($osisRef,'+')"><xsl:value-of
-	select="substring-before($osisRef,'+')"/></xsl:when>
+    <xsl:when test="contains($osisRef,'+')"><xsl:value-of select="substring-before($osisRef,'+')"/></xsl:when>
     <xsl:otherwise><xsl:value-of select="$osisRef"/></xsl:otherwise>
   </xsl:choose>
 </xsl:variable>
 <xsl:variable name="osisRefStart">
   <xsl:choose>
-    <xsl:when test="contains($osisRef,'-')"><xsl:value-of
-	select="substring-before($osisRef,'-')"/></xsl:when>
+    <xsl:when test="contains($osisRef,'-')"><xsl:value-of select="substring-before($osisRef,'-')"/></xsl:when>
     <xsl:otherwise><xsl:value-of select="$osisRef"/></xsl:otherwise>
   </xsl:choose>
 </xsl:variable>
@@ -210,8 +196,7 @@
   <xsl:choose>
     <xsl:when test="$osisRefStart=''"></xsl:when>
     <xsl:otherwise>
-      <xsl:value-of
-      select="//scripture[@osisID=$osisRefStart]/@id|//scripCom[contains(@osisRef,$osisRefStart)]/@id"/>
+      <xsl:value-of select="//scripture[@osisID=$osisRefStart]/@id|//scripCom[contains(@osisRef,$osisRefStart)]/@id"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:variable>
@@ -273,7 +258,7 @@
 	  <xsl:with-param name="encoded" select="$term"/>
 	  </xsl:call-template>
   </xsl:variable>
-  <xsl:value-of select = "translate($temp,$termTrans,'abcdefghijklmnopqrstuvwxyz ')"/>
+  <xsl:value-of select="translate($temp,$termTrans,'abcdefghijklmnopqrstuvwxyz ')"/>
 </xsl:variable>
 
 
@@ -404,8 +389,7 @@
       	/ThML/ThML.body/div1/div2[@id=$osisSect] |
       	/ThML/ThML.body/div1/div2/div3[@id=$osisSect] |
       	/ThML/ThML.body/div1/div2/div3/div4[@id=$osisSect] |
-      	/ThML/ThML.body/div1/div2/div3/div4/div5[@id=$osisSect]"
-	mode="includeParsing"/>
+      	/ThML/ThML.body/div1/div2/div3/div4/div5[@id=$osisSect]" mode="includeParsing"/>
     </xsl:when>
 
     <!-- for a term request on server, which says section is about -->
@@ -424,14 +408,8 @@
       <xsl:variable name="filename">
         <xsl:if test="$desktop='1'"><xsl:text>../books/</xsl:text></xsl:if>
 	<xsl:if test="$desktop='0'"><xsl:text>/ccel/</xsl:text></xsl:if>
-	<xsl:value-of
-        select="$authLet"/>/<xsl:value-of
-        select="$authorID"/>/<xsl:value-of 
-        select="$bookID"/>/xml/<xsl:value-of
-        select="$bookID"/>.<xsl:value-of
-	select="substring($myTerm,1,1)"/>.xml</xsl:variable>
-      <xsl:apply-templates select="document($filename,$rootPath)//glossary"
-      	mode="dict"/>
+	<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/>/<xsl:value-of select="$bookID"/>/xml/<xsl:value-of select="$bookID"/>.<xsl:value-of select="substring($myTerm,1,1)"/>.xml</xsl:variable>
+      <xsl:apply-templates select="document($filename,$rootPath)//glossary" mode="dict"/>
     </xsl:when>
 
     <xsl:when test="$mySectID='toc'">
@@ -447,8 +425,7 @@
       	/ThML/ThML.body/div1/div2[@id=$theDivID] |
       	/ThML/ThML.body/div1/div2/div3[@id=$theDivID] |
       	/ThML/ThML.body/div1/div2/div3/div4[@id=$theDivID] |
-      	/ThML/ThML.body/div1/div2/div3/div4/div5[@id=$theDivID]"
-	mode="includeParsing"/>
+      	/ThML/ThML.body/div1/div2/div3/div4/div5[@id=$theDivID]" mode="includeParsing"/>
     </xsl:when>
 
     <xsl:when test="$sect='today' and $isDaily=1">
@@ -461,7 +438,7 @@
 	  <xsl:when test="//glossary/term[translate(.,
   		$termTrans, 
 		'abcdefghijklmnopqrstuvwxyz ')=$myTerm]">
-            <xsl:call-template name="dictTerm" />
+            <xsl:call-template name="dictTerm"/>
 	  </xsl:when>
 	  <xsl:otherwise>
 	      <xsl:call-template name="dictTermNotFound"/>
@@ -469,7 +446,7 @@
 	</xsl:choose>
       </xsl:if>
       <xsl:if test="$start!=''">
-        <xsl:call-template name="dictStart" />
+        <xsl:call-template name="dictStart"/>
       </xsl:if>
     </xsl:when>
 
@@ -498,15 +475,15 @@
     <xsl:call-template name="navbar">
       <xsl:with-param name="progress" select="@progress"/>
     </xsl:call-template>
-    <a name="navtop" id="navtop"/>
-    <xsl:apply-templates mode="includeParsing" />
+    <!--<a name="navtop" id="navtop"/>-->
+    <xsl:apply-templates mode="includeParsing"/>
     <xsl:if test="./p//note and $myNotes='foot'">
       <hr class="Note" id="noteBottom"/>
     </xsl:if>
     <xsl:if test=".//note and $myNotes='foot'">
       <xsl:apply-templates select="./*" mode="createNotes"/>
     </xsl:if>
-    <a name="navbottom" id="navbottom"/>
+    <!--<a name="navbottom" id="navbottom"/>-->
     <xsl:call-template name="navbar">
       <xsl:with-param name="progress" select="@progress"/>
     </xsl:call-template>
@@ -518,10 +495,9 @@
 <!-- Generate a spiffy Table of Contents with expandable outline. -->
 <!-- ============================================================ -->
 <xsl:template match="ThML.body" name="toc" mode="includeParsing">
-<table id="bcbHide" bgcolor="#660000" style="margin-top:24pt; width:100%">
-  <tr><td><p class="whitehead" style="text-align:center"><xsl:value-of
-	select="$title"/> - Table of Contents</p></td></tr>
-</table>
+<xsl:if test="$bcb=1"><table id="bcbHide" bgcolor="#660000" style="margin-top:24pt; width:100%">
+  <tr><td><p class="whitehead" style="text-align:center"><xsl:value-of select="$title"/> - Table of Contents</p></td></tr>
+</table></xsl:if>
   <h1 class="title"><xsl:value-of select="$title"/></h1>
   <h3 class="subhead">by</h3>
   <h2 class="subhead"><xsl:value-of select="$author"/></h2>
@@ -589,16 +565,17 @@
 		</p>
 	  </xsl:if>
       <p class="TOC1" style="text-align:center">
-        <a bcbTarg="true" class="TOC" href="{$aboutURL}">
+        <a class="TOC" href="{$aboutURL}">
+         <xsl:if test="$bcb=1"><xsl:attribute name="bcbTarg">true</xsl:attribute></xsl:if>
           <i>About This Book</i> 
         </a>
       </p>
       <xsl:apply-templates select="div1[1]" mode="tocRequestDom1"/>
-    <p id="bcbHide" style="text-indent:0in;margin-top:12pt">
+    <xsl:if test="$bcb=1"><p id="bcbHide" style="text-indent:0in;margin-top:12pt">
 	      <a href="/files/nav.htm">Navigation and searching hints</a>
-    </p>
+    </p></xsl:if>
 	<xsl:if test="$isDict=1">
-	<p id="bcbHide" style="text-indent:0in;margin-top:12pt">
+	<xsl:if test="$bcb=1"><p id="bcbHide" style="text-indent:0in;margin-top:12pt">
 	  <form action="/termSearch">
 
 	    Look up an entry:
@@ -607,15 +584,15 @@
 		<input type="hidden" name="bookID" value="{$bookID}"/>
 		<input type="submit" value="Search"/>
 	  </form>
-	</p>
+	</p></xsl:if>
 	<p class="nav">
 	<xsl:for-each select="document('')/*/letter:alphabet/letter:letter">
-	  <a class="TOC" href="/termSearch?authorID={$authorID}&amp;bookID={$bookID}&amp;q={.}"><xsl:value-of select="translate(., 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /></a><xsl:text> </xsl:text>
+	  <a class="TOC" href="/termSearch?authorID={$authorID}&amp;bookID={$bookID}&amp;q={.}"><xsl:value-of select="translate(., 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></a><xsl:text> </xsl:text>
 	</xsl:for-each>
 	</p></xsl:if>
     </td></tr></table>
   </div>
-  <hr id="bcbHide"/>
+  <xsl:if test="$bcb=1"><hr id="bcbHide"/></xsl:if>
 </xsl:template>
 
 <xsl:template match="div1|div2|div3|div4|div5" mode="tocRequestDom1">
@@ -643,17 +620,17 @@
     <xsl:variable name="nextUnique" select="div2/@id|div3/@id|div4/@id|div5/@id"/>
     <a>
       <xsl:attribute name="href">javascript:t(&apos;d<xsl:value-of select="$nextUnique"/>&apos;,&apos;p<xsl:value-of select="$nextUnique"/>&apos;)</xsl:attribute>
-      <img alt="Click to expand or collapse this item" title="Click to expand or collapse this item" name="imEx" border="0" src="/pix/shut.gif" onmouseover="javascript:highlight(this)" onmouseout="javascript:unhighlight(this)">
+      <img alt="Click to expand or collapse this item" title="Click to expand or collapse this item" border="0" src="/pix/shut.gif" onmouseover="javascript:highlight(this)" onmouseout="javascript:unhighlight(this)">
         <xsl:attribute name="id">p<xsl:value-of select="$nextUnique"/></xsl:attribute>
       </img>
     </a>&#160;
   </xsl:if>
-  <a bcbParam="true" class="TOC" href="{$urlPrefix}{@id}{$urlSuffix}">
+  <a class="TOC" href="{$urlPrefix}{@id}{$urlSuffix}">
+   <xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>
     <xsl:value-of select="@title"/>
   </a>
   </p>
-  <xsl:apply-templates
-    select="div2[1]|div3[1]|div4[1]|div5[1]" mode="tocRequestDom1"/>
+  <xsl:apply-templates select="div2[1]|div3[1]|div4[1]|div5[1]" mode="tocRequestDom1"/>
 </xsl:template>
 
 
@@ -661,11 +638,11 @@
 <!-- Create a list of dictionary terms starting with $start -->
 <!-- ====================================================== -->
 <xsl:template name="dictStart">
-  <xsl:variable name="firstletter" select="substring($start,1,1)" />
+  <xsl:variable name="firstletter" select="substring($start,1,1)"/>
   <xsl:variable name="prev1">
     <xsl:choose>
       <xsl:when test="string-length($start) != 1">
-	<xsl:value-of select="substring($start,1,1)" />
+	<xsl:value-of select="substring($start,1,1)"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:value-of select="translate($start, 
@@ -676,7 +653,7 @@
   <xsl:variable name="next1">
     <xsl:choose>
       <xsl:when test="string-length($start) != 1">
-        <xsl:value-of select="substring($start,1,1)" />
+        <xsl:value-of select="substring($start,1,1)"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:value-of select="translate($start, 
@@ -686,16 +663,14 @@
   </xsl:variable>
 
   <xsl:call-template name="navbar">
-     <xsl:with-param name="prev" select="$prev1" />
-     <xsl:with-param name="prevParam">?start=<xsl:value-of
-       select="$prev1" /></xsl:with-param>
-     <xsl:with-param name="next" select="$next1" />
-     <xsl:with-param name="nextParam">?start=<xsl:value-of
-       select="$next1" /></xsl:with-param>
+     <xsl:with-param name="prev" select="$prev1"/>
+     <xsl:with-param name="prevParam">?start=<xsl:value-of select="$prev1"/></xsl:with-param>
+     <xsl:with-param name="next" select="$next1"/>
+     <xsl:with-param name="nextParam">?start=<xsl:value-of select="$next1"/></xsl:with-param>
   </xsl:call-template>
 
   <h3>Terms starting with <xsl:value-of select="translate($start, 
-  	'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /></h3>
+  	'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></h3>
   <ul>
     <xsl:for-each select="//glossary/term[translate(substring(.,1,
     	string-length($start)), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
@@ -716,7 +691,7 @@
   <xsl:choose>
     <xsl:when test="//glossary/term[translate(.,$termTrans, 
 	'abcdefghijklmnopqrstuvwxyz ')=$myTerm]">
-      <xsl:call-template name="dictTerm" />
+      <xsl:call-template name="dictTerm"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="dictTermNotFound"/>
@@ -729,27 +704,24 @@
 	'abcdefghijklmnopqrstuvwxyz ')=$myTerm]"/>
 
   <xsl:call-template name="navbar">
-    <xsl:with-param name="prev"
-            select="translate(substring($termNode/preceding::term[1],1,1),
-            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />
+    <xsl:with-param name="prev" select="translate(substring($termNode/preceding::term[1],1,1),
+            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
     <xsl:with-param name="prevParam">
     	<xsl:if test="$termNode/preceding::term[1]">?term=<xsl:call-template name="url-encode">
-            <xsl:with-param name="str" select="$termNode/preceding::term[1]" /></xsl:call-template></xsl:if>
+            <xsl:with-param name="str" select="$termNode/preceding::term[1]"/></xsl:call-template></xsl:if>
     </xsl:with-param>
-    <xsl:with-param name="next"
-            select="translate(substring($termNode/following::term[1],1,1),
-            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />
+    <xsl:with-param name="next" select="translate(substring($termNode/following::term[1],1,1),
+            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
     <xsl:with-param name="nextParam">
     	<xsl:if test="$termNode/following::term[1]">?term=<xsl:call-template name="url-encode">
-            <xsl:with-param name="str" select="$termNode/following::term[1]" /></xsl:call-template></xsl:if>
+            <xsl:with-param name="str" select="$termNode/following::term[1]"/></xsl:call-template></xsl:if>
     </xsl:with-param>
   </xsl:call-template>
   <a name="navtop" id="navtop"/>
 
   <dl>
     <b><xsl:apply-templates select="$termNode" mode="includeParsing"/></b>
-    <xsl:apply-templates select="$termNode/following-sibling::def[1]" 
-      mode="includeParsing"/>
+    <xsl:apply-templates select="$termNode/following-sibling::def[1]" mode="includeParsing"/>
   </dl>
 
   <xsl:if test="string-length($myTerm) &gt; 2">
@@ -767,8 +739,7 @@
 			<xsl:with-param name="str" select="."/>
 			</xsl:call-template>
 		</xsl:variable>
-          <li><a href="{$bookID}.{substring($myTerm,1,1)}.html?term={$tempTerm}"><xsl:value-of 
-            select="."/></a></li>          
+          <li><a href="{$bookID}.{substring($myTerm,1,1)}.html?term={$tempTerm}"><xsl:value-of select="."/></a></li>          
         </xsl:for-each>
       </ul>
     </xsl:if>
@@ -777,19 +748,17 @@
   <h5><a href="/termSearch?q={substring($myTerm,1,2)}&amp;authorID={$authorID}&amp;bookID={$bookID}">More terms</a></h5>
 <a name="navbottom" id="navbottom"/>
 <xsl:call-template name="navbar">
-    <xsl:with-param name="prev"
-            select="translate(substring($termNode/preceding::term[1],1,1),
-            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />
+    <xsl:with-param name="prev" select="translate(substring($termNode/preceding::term[1],1,1),
+            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
     <xsl:with-param name="prevParam">
     	<xsl:if test="$termNode/preceding::term[1]">?term=<xsl:call-template name="url-encode">
-            <xsl:with-param name="str" select="$termNode/preceding::term[1]" /></xsl:call-template></xsl:if>
+            <xsl:with-param name="str" select="$termNode/preceding::term[1]"/></xsl:call-template></xsl:if>
     </xsl:with-param>
-    <xsl:with-param name="next"
-            select="translate(substring($termNode/following::term[1],1,1),
-            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />
+    <xsl:with-param name="next" select="translate(substring($termNode/following::term[1],1,1),
+            'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
     <xsl:with-param name="nextParam">
     	<xsl:if test="$termNode/following::term[1]">?term=<xsl:call-template name="url-encode">
-            <xsl:with-param name="str" select="$termNode/following::term[1]" /></xsl:call-template></xsl:if>
+            <xsl:with-param name="str" select="$termNode/following::term[1]"/></xsl:call-template></xsl:if>
     </xsl:with-param>
   </xsl:call-template>
 </xsl:template>
@@ -801,14 +770,11 @@
 <xsl:template name="dictTermNotFound">
   <xsl:call-template name="navbar">
     <xsl:with-param name="prev" select="substring($myTerm,1,1)"/>
-    <xsl:with-param name="prevParam">?start=<xsl:value-of 
-    	select="substring($myTerm,1,1)"/>
+    <xsl:with-param name="prevParam">?start=<xsl:value-of select="substring($myTerm,1,1)"/>
     </xsl:with-param>
-    <xsl:with-param name="next"
-      select="translate(substring($myTerm,1,1), 
+    <xsl:with-param name="next" select="translate(substring($myTerm,1,1), 
       'abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza')"/>
-    <xsl:with-param name="nextParam">?start=<xsl:value-of 
-      select="translate(substring($myTerm,1,1), 
+    <xsl:with-param name="nextParam">?start=<xsl:value-of select="translate(substring($myTerm,1,1), 
       'abcdefghijklmnopqrstuvwxyz','bcdefghijklmnopqrstuvwxyza')"/>
     </xsl:with-param>
   </xsl:call-template>
@@ -856,8 +822,7 @@
 		</xsl:variable>
           <li><a bcbParam="true" href="{$bookID}.{translate(substring(.,1,1),
 	    'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
-	    'abcdefghijklmnopqrstuvwxyz')}{$urlSuffix}?term={$tempTerm}"><xsl:value-of 
-	  select="."/></a></li>
+	    'abcdefghijklmnopqrstuvwxyz')}{$urlSuffix}?term={$tempTerm}"><xsl:value-of select="."/></a></li>
         </xsl:for-each>
         </ul>
 	</xsl:if>
@@ -873,7 +838,7 @@
   
   <p><a name="about">&#160;</a></p>
   <center>
-  <table border="2" bordercolor="#660000" style="margin-top:12pt; width: 440pt" >
+  <table border="2" bordercolor="#660000" style="margin-top:12pt; width: 440pt">
     <tr>
       <td bgcolor="#660000" width="100%" colspan="3"><p class="whitehead" style="text-align:center; font-size:14pt">About  
         <i><xsl:value-of select="$title"/></i> by <xsl:value-of select="$author"/></p>
@@ -883,34 +848,33 @@
       <center>
       <p style="text-align:center; margin-top:12pt">
       <form method="get" action="http://www.ccel.org/search">
-	<span style="font-weight:bold; font-size:14pt"><a bcbParam="true" class="TOC" href="{$titlepageURL}">Title Page</a></span>
+	<span style="font-weight:bold; font-size:14pt"><a class="TOC" href="{$titlepageURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>Title Page</a></span>
 	&#160; &#160; &#160;
-	<span style="font-weight:bold; font-size:14pt"><a bcbParam="true" class="TOC" href="{$tocURL}">Table of Contents</a></span>
+	<span style="font-weight:bold; font-size:14pt"><a class="TOC" href="{$tocURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>Table of Contents</a></span>
 	&#160; &#160; &#160;
 	<xsl:if test="$isDaily=1">
-	  <span style="font-weight:bold; font-size:14pt"><a class="TOC" 
-		href="javascript:goToday()">Today's Reading</a></span>
+	  <span style="font-weight:bold; font-size:14pt"><a class="TOC" href="javascript:goToday()">Today's Reading</a></span>
 	</xsl:if>
 	&#160; &#160; &#160;
 
-	<input type="hidden" name="a" value="advanced_search" />
-	<input type="hidden" name="authorID" value="{$authorID}" />
-	<input type="hidden" name="bookID" value="{$bookID}" />
+	<input type="hidden" name="a" value="advanced_search"/>
+	<input type="hidden" name="authorID" value="{$authorID}"/>
+	<input type="hidden" name="bookID" value="{$bookID}"/>
 	<span style="font-weight:bold; font-size:16pt">Search:</span>&#160;
-	<input type="text" size="12" name="q" value="" />
- 	<input type="Submit" value="Go" />
+	<input type="text" size="12" name="q" value=""/>
+ 	<input type="Submit" value="Go"/>
       </form>
       </p>
       </center>
     </td></tr>
-    <tr><td ><table>
+    <tr><td><table>
       <tr>	
         <td style="width:110pt; text-align:right;">
 	  <p style="margin-top:12pt"><b>Title:</b></p></td>
         <td style="width:5pt"></td>
-        <td width="*">
+        <td>
 	  <p style="margin-top:12pt">
-          <a class="TOC" bcbParam="true" href="{$titlepageURL}">
+          <a class="TOC" href="{$titlepageURL}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if>
           <xsl:value-of select="$title"/></a></p></td>
       </tr>
 
@@ -920,10 +884,8 @@
         <td><a class="TOC">
           <xsl:attribute name="href">
             <xsl:choose>
-              <xsl:when test="$desktop=1">/ccel/<xsl:value-of
-	        select="$authorID"/>.html</xsl:when> 
-	      <xsl:otherwise>/<xsl:value-of select="$authLet"/>/<xsl:value-of 
-	        select="$authorID"/></xsl:otherwise>
+              <xsl:when test="$desktop=1">/ccel/<xsl:value-of select="$authorID"/>.html</xsl:when> 
+	      <xsl:otherwise>/<xsl:value-of select="$authLet"/>/<xsl:value-of select="$authorID"/></xsl:otherwise>
 	    </xsl:choose>
           </xsl:attribute>
           <xsl:value-of select="electronicEdInfo/DC/DC.Creator[@sub='Author' and @scheme='file-as']"/></a>
@@ -934,36 +896,30 @@
       </tr>
 
     <xsl:if test="electronicEdInfo/DC/DC.Publisher!=''">
-      <tr><td align="right" valign="top"><b>Publisher:</b></td><td></td><td><xsl:value-of 
-      	select="electronicEdInfo/DC/DC.Publisher"/></td></tr>
+      <tr><td align="right" valign="top"><b>Publisher:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Publisher"/></td></tr>
     </xsl:if>
 
     <xsl:if test="generalInfo/description != ''">
-      <tr><td align="right" valign="top"><b>Description:</b></td><td></td><td><xsl:apply-templates 
-      	select="generalInfo/description" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>Description:</b></td><td></td><td><xsl:apply-templates select="generalInfo/description" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="generalInfo/firstPublished != ''">
-      <tr><td align="right" valign="top"><b>First Published:</b></td><td></td><td><xsl:apply-templates 
-      	select="generalInfo/firstPublished" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>First Published:</b></td><td></td><td><xsl:apply-templates select="generalInfo/firstPublished" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="generalInfo/pubHistory != ''">
-      <tr><td align="right" valign="top"><b>Publication History:</b></td><td></td><td><xsl:apply-templates 
-      	select="generalInfo/pubHistory" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>Publication History:</b></td><td></td><td><xsl:apply-templates select="generalInfo/pubHistory" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="printSourceInfo/published != ''">
-      <tr><td align="right" valign="top"><b>Print Basis:</b></td><td></td><td><xsl:apply-templates 
-      	select="printSourceInfo/published" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>Print Basis:</b></td><td></td><td><xsl:apply-templates select="printSourceInfo/published" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/DC/DC.Source[not(@scheme)] != ''">
       <tr><td align="right" valign="top"><b>Source:</b></td><td></td><td>
         <xsl:choose>
 	  <xsl:when test="electronicEdInfo/DC/DC.Source[@scheme = 'URL'] != ''">
-	    <a class="TOC" href="{electronicEdInfo/DC/DC.Source[@scheme = 'URL']}"><xsl:value-of 
-	    	select="electronicEdInfo/DC/DC.Source[not(@scheme)]"/></a>
+	    <a class="TOC" href="{electronicEdInfo/DC/DC.Source[@scheme = 'URL']}"><xsl:value-of select="electronicEdInfo/DC/DC.Source[not(@scheme)]"/></a>
 	  </xsl:when>
 	  <xsl:otherwise>
 	    <xsl:value-of select="electronicEdInfo/DC/DC.Source[not(@scheme)]"/>
@@ -986,28 +942,23 @@
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/DC/DC.Rights != ''">
-      <tr><td align="right" valign="top"><b>Rights:</b></td><td></td><td><xsl:value-of 
-      	select="electronicEdInfo/DC/DC.Rights"/></td></tr>
+      <tr><td align="right" valign="top"><b>Rights:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Rights"/></td></tr>
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/DC/DC.Date[@sub = 'Created'] != ''">
-      <tr><td align="right" valign="top"><b>Date Created:</b></td><td></td><td><xsl:value-of 
-      	select="electronicEdInfo/DC/DC.Date[@sub = 'Created']"/></td></tr>
+      <tr><td align="right" valign="top"><b>Date Created:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Date[@sub = 'Created']"/></td></tr>
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/status != ''">
-      <tr><td align="right" valign="top"><b>Status:</b></td><td></td><td><xsl:apply-templates 
-      	select="electronicEdInfo/status" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>Status:</b></td><td></td><td><xsl:apply-templates select="electronicEdInfo/status" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="generalInfo/comments != ''">
-      <tr><td align="right" valign="top"><b>Comments:</b></td><td></td><td><xsl:apply-templates 
-      	select="generalInfo/comments" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>Comments:</b></td><td></td><td><xsl:apply-templates select="generalInfo/comments" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/editorialComments != ''">
-      <tr><td align="right" valign="top"><b>Editorial Comments:</b></td><td></td><td><xsl:apply-templates 
-      	select="electronicEdInfo/editorialComments" mode="includeParsing"/></td></tr>
+      <tr><td align="right" valign="top"><b>Editorial Comments:</b></td><td></td><td><xsl:apply-templates select="electronicEdInfo/editorialComments" mode="includeParsing"/></td></tr>
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/DC/DC.Contributor != ''">
@@ -1021,15 +972,12 @@
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/DC/DC.Subject[@scheme = 'ccel'] != ''">
-      <tr><td align="right" valign="top"><b>CCEL Subjects:</b></td><td></td><td><xsl:value-of 
-      	select="electronicEdInfo/DC/DC.Subject[@scheme = 'ccel']"/></td>
+      <tr><td align="right" valign="top"><b>CCEL Subjects:</b></td><td></td><td><xsl:value-of select="electronicEdInfo/DC/DC.Subject[@scheme = 'ccel']"/></td>
       </tr>
     </xsl:if>
 
     <xsl:if test="electronicEdInfo/DC/DC.Subject[@scheme = 'LCCN'] != ''">
-      <tr><td align="right" valign="top"><b>LC Call no:</b></td><td></td><td><xsl:variable name="lccn" 
-      	select="electronicEdInfo/DC/DC.Subject[@scheme = 'LCCN']"/><xsl:value-of 
-	select="electronicEdInfo/DC/DC.Subject[@scheme='LCCN']"/></td>
+      <tr><td align="right" valign="top"><b>LC Call no:</b></td><td></td><td><xsl:variable name="lccn" select="electronicEdInfo/DC/DC.Subject[@scheme = 'LCCN']"/><xsl:value-of select="electronicEdInfo/DC/DC.Subject[@scheme='LCCN']"/></td>
       </tr>
     </xsl:if>
 
@@ -1044,8 +992,7 @@
 
     <xsl:if test="contains($ccsubj,'Shell')=false">
     <tr><td align="right" valign="top">
-        <p style="margin-bottom:12pt"><b><a class="TOC"
-    	href="http://www.ccel.org/help/formats.html">Other Formats:</a></b></p></td>
+        <p style="margin-bottom:12pt"><b><a class="TOC" href="http://www.ccel.org/help/formats.html">Other Formats:</a></b></p></td>
       <td></td><td>
       <p style="margin-bottom:12pt">
       <a class="TOC" href="/{$authLet}/{$authorID}/{$bookID}.xml">ThML</a>
@@ -1057,8 +1004,7 @@
       <xsl:if test="not($desktop=1)">
 
         <xsl:for-each select="document($bookInfo)/bookInfo/format">
-          <xsl:text> - </xsl:text><a class="TOC" href="{.}"><xsl:value-of 
-		  select="@type"/></a>
+          <xsl:text> - </xsl:text><a class="TOC" href="{.}"><xsl:value-of select="@type"/></a>
         </xsl:for-each>
       </xsl:if>
       </p>
@@ -1126,7 +1072,7 @@
   <xsl:message>myNext:  <xsl:value-of select="$myNext"/></xsl:message>
 </xsl:if>
 
-  <p id="bcbHide"><a><xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>&#160;</a></p>
+  <xsl:if test="$bcb=1"><p id="bcbHide"><a><xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>&#160;</a></p>
   <table id="bcbHide" width="100%" bgcolor="#660000">
     <tr>
       <td valign="top" class="whitehead" style="text-align:left;
@@ -1153,15 +1099,15 @@
       </div></td>
     </tr>
     <tr><td colspan="3">
-      <img src="/pix/yellowdot.gif" height="1" >
+      <img src="/pix/yellowdot.gif" height="1">
         <xsl:attribute name="width"><xsl:value-of select="@progress"/></xsl:attribute>
       </img>
     </td></tr>
   </table>
-  <p id="bcbHide">&#160;</p>
+  <p id="bcbHide">&#160;</p></xsl:if>
 
-<a bcbParam="true" name="prevNav" href="{$myPrev}"/>
-<a bcbParam="true" name="nextNav" href="{$myNext}"/>
+<a href="{$myPrev}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if></a>
+<a href="{$myNext}"><xsl:if test="$bcb=1"><xsl:attribute name="bcbParam">true</xsl:attribute></xsl:if></a>
 </xsl:template>
 
 
@@ -1169,7 +1115,7 @@
 <!-- add the standard CCEL footer (for dynamic docs) -->
 <!-- =============================================== -->
 <xsl:template name="add-footer">
-<table id="bcbHide" align="center" style="clear:right; margin-top:0in">
+<xsl:if test="$bcb=1"><table id="bcbHide" align="center" style="clear:right; margin-top:0in">
   <tr>
     <td>
       <a href="http://www.ccel.org">
@@ -1184,19 +1130,16 @@
           This <a class="TOC" href="http://www.ccel.org/ThML">ThML</a> 
 	  document is from the 
 	  <a class="TOC" href="http://www.ccel.org">Christian 
-	  Classics Ethereal Library</a> at <a class="TOC"
-	  href="http://www.calvin.edu">Calvin College</a>.<br/>
+	  Classics Ethereal Library</a> at <a class="TOC" href="http://www.calvin.edu">Calvin College</a>.<br/>
 
           <a class="TOC" href="/index.jsp">Home</a> | 
           <a class="TOC" href="/jsp/prefs.jsp">Preferences</a>
 	 <!--<xsl:if test="$cd!=1">-->
-           | Search this book: <form style="margin-top:0in"
-	    action="/search" method="get">
-	    <input type="hidden" name="authorID" value="{$authorID}" />
-	    <input type="hidden" name="bookID" value="{$bookID}" />
-	    <input type="hidden" name="a" value="search" />
-            <input type="text" name="q" size="12"
-	    style="font-size:8pt"/> 
+           | Search this book: <form style="margin-top:0in" action="/search" method="get">
+	    <input type="hidden" name="authorID" value="{$authorID}"/>
+	    <input type="hidden" name="bookID" value="{$bookID}"/>
+	    <input type="hidden" name="a" value="search"/>
+            <input type="text" name="q" size="12" style="font-size:8pt"/> 
 	    <input type="submit" value="Go" size="7"/>
 	    </form>
 	    <!--</xsl:if>-->
@@ -1204,14 +1147,11 @@
 
 	<!-- create HTML files on server -->
         <xsl:otherwise>
-          This document is from the <a class="TOC"
-	  href="http://www.ccel.org">Christian Classics
-          Ethereal Library</a> at <a class="TOC"
-	  href="http://www.calvin.edu">Calvin College</a>,<br/>
+          This document is from the <a class="TOC" href="http://www.ccel.org">Christian Classics
+          Ethereal Library</a> at <a class="TOC" href="http://www.calvin.edu">Calvin College</a>,<br/>
           generated on demand from
           <a class="TOC" href="http://www.ccel.org/ThML">ThML </a>
-          <a class="TOC"
-	  href="http://www.ccel.org/ccel/{$authorID}/{$bookID}.xml">source</a>
+          <a class="TOC" href="http://www.ccel.org/ccel/{$authorID}/{$bookID}.xml">source</a>
 	  at <script type="text/javascript">document.write(
 	  document.lastModified);</script>. <br/>
  	    <xsl:variable name="hitfile" select="concat('/ccel/',$authLet,'/',
@@ -1230,7 +1170,7 @@
       </a>
     </td>
   </tr>
-  </table>
+  </table></xsl:if>
 </xsl:template>
 
 
@@ -1248,18 +1188,17 @@
   </xsl:template>
 
   <xsl:template match="scripCom" mode="includeParsing">
-    <a name="{@id}" />
+    <a name="{@id}"/>
   </xsl:template>
 
 <!-- just drop the tags -->
   <xsl:template match="scripContext|insertIndex|added" mode="includeParsing">
-    <a id="{@id}" />
+    <a id="{@id}"/>
     <xsl:apply-templates mode="includeParsing"/>
   </xsl:template>
 
 <!-- convert <elt class="xxx"> to <span class="elt"><span class="xxx"> -->
-  <xsl:template match="date|foreign|index|name|unclear"
-	mode="includeParsing">
+  <xsl:template match="date|foreign|index|name|unclear" mode="includeParsing">
     <span class="{local-name()}">
       <xsl:copy-of select="@*[name() != 'class']"/>
       <xsl:choose>
@@ -1275,12 +1214,15 @@
     </span>
   </xsl:template>
 
-  <xsl:template match="scripture"
-	mode="includeParsing">
+  <xsl:template match="scripture" mode="includeParsing">
     <span class="{local-name()}">
 	<xsl:choose>
 		<xsl:when test="@*[name() = 'id']">
-			<xsl:copy-of select="@*[name() != 'class']"/>
+   <xsl:choose>
+    <xsl:when test="$bcb=1"><xsl:copy-of select="@*[name() != 'class']"/></xsl:when>
+    <xsl:otherwise><xsl:copy-of select="@id"/></xsl:otherwise>
+   </xsl:choose>
+			
 		</xsl:when>
 		<xsl:when test="@*[name() = 'osisRef']">
 			<xsl:attribute name="id">
@@ -1292,7 +1234,7 @@
 					<xsl:otherwise><xsl:value-of select="$bk1"/></xsl:otherwise>
 				</xsl:choose>
 			</xsl:attribute>
-			<xsl:copy-of select="@*[name() != 'class']"/>
+			<xsl:if test="$bcb=1"><xsl:copy-of select="@*[name() != 'class']"/></xsl:if>
 		</xsl:when>
 		<xsl:otherwise>
 			<xsl:message>Warning: no scripture id found (nor equivalent osisRef) - verse won't be highlighted</xsl:message>
@@ -1428,11 +1370,9 @@
   <xsl:template match="scripRef" mode="includeParsing">
 
     <!-- parse osisRef to get bk, ch -->
-    <xsl:variable name="psg"><xsl:value-of
-      select="substring-before(concat(
+    <xsl:variable name="psg"><xsl:value-of select="substring-before(concat(
         substring-after(@osisRef,':'),'-'),'-')"/></xsl:variable>
-    <xsl:variable name="bk1"><xsl:value-of
-      select="substring-before($psg,'.')"/></xsl:variable>
+    <xsl:variable name="bk1"><xsl:value-of select="substring-before($psg,'.')"/></xsl:variable>
     <xsl:variable name="bk">
       <xsl:choose>
         <xsl:when test="starts-with($bk1,'1')"><xsl:value-of select="concat('i',substring-after($bk1,'1'))"/></xsl:when>
@@ -1441,16 +1381,10 @@
         <xsl:otherwise><xsl:value-of select="$bk1"/></xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-    <xsl:variable name="ch"><xsl:if 
-      test="substring-before(substring-after($psg,'.'),'.') != ''"><xsl:value-of
-        select="substring-before(substring-after($psg,'.'),'.')"/></xsl:if><xsl:if
-      test="substring-before(substring-after($psg,'.'),'.') = ''"><xsl:value-of
-        select="substring-after($psg,'.')"/></xsl:if></xsl:variable>
-    <xsl:variable name="v"><xsl:value-of
-      select="substring-after($psg,concat($bk1,'.',$ch,'.'))"/></xsl:variable>
-    <xsl:variable name="vdot"><xsl:if test="$v != ''">.<xsl:value-of
-      select="$v"/></xsl:if></xsl:variable>
-
+    <xsl:variable name="ch"><xsl:if test="substring-before(substring-after($psg,'.'),'.') != ''"><xsl:value-of select="substring-before(substring-after($psg,'.'),'.')"/></xsl:if><xsl:if test="substring-before(substring-after($psg,'.'),'.') = ''"><xsl:value-of select="substring-after($psg,'.')"/></xsl:if></xsl:variable>
+    <xsl:variable name="v"><xsl:value-of select="substring-after($psg,concat($bk1,'.',$ch,'.'))"/></xsl:variable>
+    <xsl:variable name="vdot"><xsl:if test="$v != ''">.<xsl:value-of select="$v"/></xsl:if></xsl:variable>
+   <!-- The following doesn't align with asv.xml 2009/12/20 -->
 	<xsl:variable name="pref">
 		<xsl:value-of select="document('bible.xml')/books/grouping[book[osisID[text()=$bk1]]]/@pref"/>
 	</xsl:variable>
@@ -1461,15 +1395,13 @@
 			<xsl:otherwise><xsl:value-of select="$ap_bib"/></xsl:otherwise>
     </xsl:choose>
 	</xsl:variable>
-    <a><xsl:attribute name="class">scripRef</xsl:attribute>
-	<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+   
+    <a class="scripRef" id="{@id}" href="{$bibpath}/{$bibleID}.html#{$bk}.{$ch}{$vdot}" target="{$bibleID}">
      <!-- if bcb, link to new window -->
-     <xsl:attribute name="bcbTarg">true</xsl:attribute>
-    <xsl:attribute name="href">/ccel/bible/<xsl:value-of 
-       select="$bibleID"/>.<xsl:value-of select="$bk"/>.<xsl:value-of 
-       select="$ch"/>.html#<xsl:value-of select="$bk"/>.<xsl:value-of
-       select="$ch"/><xsl:value-of select="$vdot"/></xsl:attribute>
-    <xsl:attribute name="name"><xsl:value-of select="translate(@parsed,'|','_')"/></xsl:attribute>
+     <xsl:if test="$bcb=1"><xsl:attribute name="bcbTarg">true</xsl:attribute><xsl:attribute name="name"><xsl:value-of select="translate(@parsed,'|','_')"/></xsl:attribute></xsl:if>
+     
+    <!--<xsl:attribute name="href">/ccel/bible/<xsl:value-of select="$bibleID"/>.<xsl:value-of select="$bk"/>.<xsl:value-of select="$ch"/>.html#<xsl:value-of select="$bk"/>.<xsl:value-of select="$ch"/><xsl:value-of select="$vdot"/></xsl:attribute>-->
+    
 
 <xsl:value-of select="."/>
 </a>
@@ -1485,8 +1417,7 @@
 	<!-- href with http://domain_name/ part stripped off -->
         <xsl:variable name="temphref">
 	  <xsl:choose>
-	    <xsl:when test="starts-with(@href,'http:')">/<xsl:value-of 
-	    	select="substring-after(substring-after(@href,'.'),'/')"/>
+	    <xsl:when test="starts-with(@href,'http:')">/<xsl:value-of select="substring-after(substring-after(@href,'.'),'/')"/>
 	    </xsl:when>
 	    <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise>
 	  </xsl:choose>
@@ -1495,12 +1426,10 @@
 	<!-- authorID of /ccel hrefs -->
 	<xsl:variable name="linkauthorID">
 	  <xsl:choose>
-	    <xsl:when test="starts-with($temphref,'/ccel/')"><xsl:value-of 
-	    	select="substring-before(substring-after($temphref,
+	    <xsl:when test="starts-with($temphref,'/ccel/')"><xsl:value-of select="substring-before(substring-after($temphref,
 			'/ccel/'),'/')"/>
 	    </xsl:when>
-	    <xsl:when test="starts-with($temphref,'/')"><xsl:value-of 
-	    	select="substring-before(substring($temphref,4),'/')"/>
+	    <xsl:when test="starts-with($temphref,'/')"><xsl:value-of select="substring-before(substring($temphref,4),'/')"/>
 	    </xsl:when>
 	  </xsl:choose>
 	</xsl:variable>
@@ -1511,11 +1440,9 @@
         <!-- bookID of /ccel href -->
         <xsl:variable name="linkbookID">
           <xsl:choose>
-            <xsl:when test="starts-with($temphref,'/ccel/')"><xsl:value-of 
-	      	select="substring-before(substring-after(substring-after(
+            <xsl:when test="starts-with($temphref,'/ccel/')"><xsl:value-of select="substring-before(substring-after(substring-after(
 		$temphref,'/ccel/'),'/'),'.')"/></xsl:when>
-            <xsl:when test="starts-with($temphref,'/')"><xsl:value-of 
-	      	select="substring-before(substring-after(substring($temphref,
+            <xsl:when test="starts-with($temphref,'/')"><xsl:value-of select="substring-before(substring-after(substring($temphref,
 		4),'/'),'/')"/></xsl:when>
           </xsl:choose>
         </xsl:variable>
@@ -1523,8 +1450,7 @@
 	<!-- the filename extension of the link -->
 	<xsl:variable name="linktype">
 	  <xsl:call-template name="getlinktype">
-	    <xsl:with-param name="theText" 
-	    	select="substring-after($temphref,$linkbookID)"/>
+	    <xsl:with-param name="theText" select="substring-after($temphref,$linkbookID)"/>
           </xsl:call-template>
 	</xsl:variable>
 
@@ -1560,8 +1486,7 @@
 			    </xsl:otherwise>
 			</xsl:choose>
 		</xsl:variable>
-      <xsl:value-of select="$bookID"/>.<xsl:value-of
-	    select="$hrefSect"/><xsl:text>.html</xsl:text>
+      <xsl:value-of select="$bookID"/>.<xsl:value-of select="$hrefSect"/><xsl:text>.html</xsl:text>
 	    <xsl:value-of select="$hrefHash"/>
 	
 	</xsl:otherwise>
@@ -1665,14 +1590,11 @@
     <xsl:variable name="noteRef"><xsl:choose><xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when><xsl:otherwise><xsl:value-of select="count(preceding::note | ancestor::note | preceding-sibling::note) + 1"/></xsl:otherwise></xsl:choose></xsl:variable>
 
     <p class="noteMark">
-     <a class="Note">
-      <xsl:attribute name="name"><xsl:value-of select="$fref"/></xsl:attribute>
-      <xsl:attribute name="href">#<xsl:value-of select="$bref"/></xsl:attribute>
+     <a class="Note" name="{$fref}" id="{$fref}">
       <sup class="NoteRef"><xsl:value-of select="$noteRef"/></sup>
      </a>
     </p>
     <div class="Note">
-      <xsl:attribute name="id"><xsl:value-of select="$fref"/></xsl:attribute>
       <xsl:apply-templates mode="includeParsing"/>
     </div>
   </xsl:template>
@@ -1773,7 +1695,7 @@
 		<xsl:param name="str"/>
 		<xsl:param name="isRec"/>
 		<xsl:if test="$str">
-			<xsl:variable name = "trans">
+			<xsl:variable name="trans">
 				<xsl:value-of select="translate($str,$termTrans,'abcdefghijklmnopqrstuvwxyz+')"/>
 			</xsl:variable>
 			<xsl:choose>