Index: main/branches/64_bit_Greenstone/greenstone3/web/interfaces/default/transform/document.xsl
===================================================================
--- main/branches/64_bit_Greenstone/greenstone3/web/interfaces/default/transform/document.xsl	(revision 23506)
+++ main/branches/64_bit_Greenstone/greenstone3/web/interfaces/default/transform/document.xsl	(revision 24007)
@@ -3,9 +3,7 @@
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:java="http://xml.apache.org/xslt/java"
-  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
   xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
-  extension-element-prefixes="java util"
-  exclude-result-prefixes="java util gsf">
-
+  extension-element-prefixes="java"
+  exclude-result-prefixes="java gsf">
 
   <!-- style includes global params interface_name, library_name -->
@@ -56,5 +54,5 @@
   <xsl:template name="pageTitle">
     <xsl:variable name="docID" select="/page/pageResponse/document/@selectedNode"/>
-    <xsl:for-each select='/page/pageResponse/document/descendant::documentNode[@nodeID=$docID]/ancestor-or-self::documentNode'><xsl:if test='position()!=1'>::</xsl:if><xsl:value-of select="metadataList/metadata[@name='Title']"/></xsl:for-each>
+    <xsl:for-each select="/page/pageResponse/document/descendant::documentNode[@nodeID=$docID]/ancestor-or-self::documentNode"><xsl:if test='position()!=1'>::</xsl:if><xsl:value-of select="metadataList/metadata[@name='Title']"/></xsl:for-each>
   </xsl:template>
 
@@ -70,4 +68,5 @@
       </xsl:text>
     </style>
+
     <!--TODO: add berry basket switch-->
     <!--<xsl:if test="$berryBaskets = 'true'">-->
@@ -138,20 +137,20 @@
 	    <xsl:text disable-output-escaping="yes">
 	      var doc_url = document.URL; 
-	      doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
-	      doc_url += '&amp;book=flashxml';
+	      doc_url = doc_url.replace(/(&amp;amp;|\?)book=[a-z]+/gi,'');
+	      doc_url += '&amp;amp;book=flashxml';
 
 	      var flash_plug_html = ""
-	      flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
+	      flash_plug_html += '&amp;lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
 	      flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
 	      flash_plug_html += '  height="100%" id="Book" swLiveConnect="true" \n';
-	      flash_plug_html += '  width="100%"&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
+	      flash_plug_html += '  width="100%"&amp;gt;\n';
+	      flash_plug_html += '    &amp;lt;PARAM name="allowScriptAccess" value="always" /&amp;gt;\n';
+	      flash_plug_html += '    &amp;lt;PARAM name="movie" value="Book.swf';
 	      flash_plug_html += '?src_image=' + escape(img_cover);
-	      flash_plug_html += '&amp;doc_url=' + escape(doc_url)
-	      flash_plug_html += '" /&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
-	      flash_plug_html += '    &lt;EMBED align="middle" \n';
+	      flash_plug_html += '&amp;amp;doc_url=' + escape(doc_url)
+	      flash_plug_html += '" /&amp;gt;\n';
+	      flash_plug_html += '    &amp;lt;PARAM name="quality" value="high" /&amp;gt;\n';
+	      flash_plug_html += '    &amp;lt;PARAM name="bgcolor" value="#FFFFFF" /&amp;gt;\n';
+	      flash_plug_html += '    &amp;lt;EMBED align="middle" \n';
 	      flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
 	      flash_plug_html += '      bgcolor="#FFFFFF" height="100%" name="Book" \n';
@@ -160,8 +159,8 @@
 	      flash_plug_html += '      src="Book.swf';
 	      flash_plug_html += '?src_image=' + escape(img_cover);
-	      flash_plug_html += '&amp;doc_url=' + escape(doc_url);
+	      flash_plug_html += '&amp;amp;doc_url=' + escape(doc_url);
 	      flash_plug_html += '"\n'; 
-	      flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&gt;\n';
-	      flash_plug_html += '&lt;/OBJECT&gt;\n';
+	      flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&amp;gt;\n';
+	      flash_plug_html += '&amp;lt;/OBJECT&amp;gt;\n';
 	      var flash_div = document.getElementById("bookdiv");
 	      flash_div.innerHTML = flash_plug_html;
@@ -199,5 +198,5 @@
     <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
     <div id="documentheading">
-      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
+      <a href="{$library_name}?a={$p.a}&amp;amp;sa={$p.sa}&amp;amp;s={$p.s}&amp;amp;c={$p.c}&amp;amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="'close_book'"/></xsl:with-param>
 	</xsl:call-template></a>
       <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
@@ -253,5 +252,5 @@
       </xsl:when>
       <xsl:otherwise>
-	<img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
+	<img><xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
       </xsl:otherwise>
     </xsl:choose>
@@ -270,12 +269,8 @@
       <li>
         <xsl:choose><xsl:when test="string($ed)='1'">
-	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
-	    </a>
+	    <a href="{$library_name}?a=d&amp;amp;d={$docID}&amp;amp;c={$collName}&amp;amp;sib={$sib}&amp;amp;ed=0" class="getTextFor doc.contract_doc_b this.title.doc.contract_doc_tip"></a>
 	  </xsl:when>
 	  <xsl:otherwise>
-	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
-	    </a>
+	    <a href="{$library_name}?a=d&amp;amp;d={$docID}&amp;amp;c={$collName}&amp;amp;sib={$sib}&amp;amp;ed=1" class="getTextFor doc.expand_doc_b this.title.doc.expand_doc_tip"></a>
 	  </xsl:otherwise>
 	</xsl:choose>
@@ -287,11 +282,8 @@
       <li>
 	<xsl:choose><xsl:when test="string($ec)='1'">
-	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
+	    <a href="{$library_name}?a=d&amp;amp;d={$docID}&amp;amp;c={$collName}&amp;amp;sib={$sib}&amp;amp;ec=0" class="getTextFor doc.contract_contents_b this.title.doc.contract_contents_tip"></a>
 	  </xsl:when>
 	  <xsl:otherwise>
-	    <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
-	    </a>
+	    <a  href="{$library_name}?a=d&amp;amp;d={$docID}&amp;amp;c={$collName}&amp;amp;sib={$sib}&amp;amp;ec=1" class="getTextFor doc.expand_contents_b this.title.doc.expand_contents_tip"></a>
 	  </xsl:otherwise>
 	</xsl:choose>
@@ -302,7 +294,5 @@
     <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
     <li>
-      <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
-	<xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
-      </a></li>
+      <a target="_blank" class="getTextFor doc.detach_page_b this.title.doc.detach_page_tip"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;amp;d=<xsl:value-of select="$docID"/>&amp;amp;c=<xsl:value-of select="$collName"/>&amp;amp;sib=<xsl:value-of select="$sib"/>&amp;amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute></a></li>
   </xsl:template>
 
@@ -333,11 +323,18 @@
     <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
     <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
-    <xsl:if test="documentNode[@nodeID]">
+    <script type="text/javascript">
+      <xsl:text>
+        // Load up the initial document using AJAX!
+        var initialHash = '</xsl:text>
+      <xsl:value-of select="$d" /><xsl:text>';
+      </xsl:text>
+    </script>
+    <xsl:if test="documentNode[@nodeID]">      
       <ul id="tocnodes">
-	<li>
+	<li id="tocstart">
 	  <xsl:choose><xsl:when test="string($oc)='0'">
-	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
+	      <a href="{$library_name}?a=d&amp;amp;c={$collName}&amp;amp;d={$d}&amp;amp;sib={$sib}&amp;amp;oc=1&amp;amp;p.s={$p.s}&amp;amp;p.sa={$p.sa}&amp;amp;p.a={$p.a}&amp;amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="'doc.open_toc'"/></xsl:with-param></xsl:call-template></a>
 	    </xsl:when>
-	    <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
+	    <xsl:otherwise><a href="{$library_name}?a=d&amp;amp;c={$collName}&amp;amp;d={$d}&amp;amp;sib={$sib}&amp;amp;oc=0&amp;amp;p.s={$p.s}&amp;amp;p.sa={$p.sa}&amp;amp;p.a={$p.a}&amp;amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="'doc.close_toc'"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><span class="getTextFor doc.table_of_contents">&amp;amp;nbsp;</span>
 	  <xsl:if test="string($oc)!='0'">
 	    <ul class="tocnode">
@@ -362,5 +359,5 @@
     <!-- Display the appropriate image, depending on the node type -->
     <li>
-      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
+      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;amp;c=<xsl:value-of select="$collName"/>&amp;amp;d=<xsl:value-of select="@nodeID"/><xsl:if test="documentNode">.pr</xsl:if>&amp;amp;sib=1<xsl:if test="string($ec) = '1'">&amp;amp;ec=1</xsl:if>&amp;amp;p.a=<xsl:value-of select="$p.a"/>&amp;amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;amp;p.s=<xsl:value-of select="$p.s"/>&amp;amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
 	<xsl:apply-templates select="." mode="displayNodeIcon"/>
       </a>
@@ -372,5 +369,5 @@
 	</xsl:when>
 	<xsl:otherwise>
-	  <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
+	  <span><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
 	</xsl:otherwise>
       </xsl:choose>
@@ -394,5 +391,5 @@
 	<xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
 	<xsl:otherwise>
-	  <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
+	  <!--<xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>-->
 	</xsl:otherwise>
       </xsl:choose>
@@ -411,9 +408,8 @@
   <!-- the actual text/content -->
   <xsl:template match="nodeContent">
-    <p/>
     <xsl:for-each select="node()">
       <xsl:choose>
 	<xsl:when test="not(name())">
-	  <xsl:value-of select="." disable-output-escaping="yes"/>
+	  <xsl:value-of select="." disable-output-escaping="yes" />
 	</xsl:when>
 	<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
@@ -444,15 +440,15 @@
       <xsl:when test="nodeContent">
 	<xsl:text disable-output-escaping="yes">
-	  &lt;Section&gt;
-	  &lt;Description&gt;
-	  &lt;Metadata name="Title"&gt;
+	  &amp;lt;Section&amp;gt;
+	  &amp;lt;Description&amp;gt;
+	  &amp;lt;Metadata name="Title"&amp;gt;
 	</xsl:text>
 	<xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
 	<xsl:text disable-output-escaping="yes">
-	  &lt;/Metadata&gt;
-	  &lt;/Description&gt;
+	  &amp;lt;/Metadata&amp;gt;
+	  &amp;lt;/Description&amp;gt;
 	</xsl:text>
 	<xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
-	<xsl:text disable-output-escaping="yes">&lt;/Sec&gt;</xsl:text>
+	<xsl:text disable-output-escaping="yes">&amp;lt;/Sec&amp;gt;</xsl:text>
       </xsl:when>
     </xsl:choose>
@@ -465,5 +461,5 @@
     <!-- end the section -->
     <xsl:text disable-output-escaping="yes">
-      &lt;/Section&gt;
+      &amp;lt;/Section&amp;gt;
     </xsl:text>
   </xsl:template>
@@ -473,5 +469,5 @@
     <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
     <xsl:choose>
-      <xsl:when test="util:isImage(@mimeType)">
+      <xsl:when test="starts-with(@mimeType, 'image/')">
 	<img src="{$httpPath}/{@href}"/>
       </xsl:when>
@@ -488,5 +484,5 @@
       <xsl:choose>
 	<xsl:when test="@type='document'">a=d</xsl:when>
-	<xsl:when test="@type='query'">a=q&amp;s=<xsl:value-of select="@service"/>&amp;rt=rd</xsl:when>
+	<xsl:when test="@type='query'">a=q&amp;amp;s=<xsl:value-of select="@service"/>&amp;amp;rt=rd</xsl:when>
 	<xsl:otherwise>
 	p
@@ -495,7 +491,7 @@
     </xsl:variable>
     <xsl:variable name="serviceargs">
-      <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
+      <xsl:for-each select="param">&amp;amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
     </xsl:variable>
-    <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
+    <a href="{$library_name}?{$actionargs}&amp;amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
   </xsl:template>
 
@@ -518,8 +514,8 @@
 	    </td>
 	    <td align="center"><center>
-		<b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
+		<b class="getTextFor doc.pages"></b>
 	      </center></td>
 	    <td align="right">
-	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
+	      <a href="{$library_name}?a=d&amp;amp;c={$collName}&amp;amp;d={@selectedNode}.fc"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
 	    </td>
 	  </tr>
@@ -530,13 +526,13 @@
 	    <td align="left">
 	      <xsl:if test=" not ( $pos = 1 )">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
+		<a href="{$library_name}?a=d&amp;amp;c={$collName}&amp;amp;d={@selectedNode}.ps"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
 	      </xsl:if>
 	    </td>
 	    <td align="center"><center>
-		<b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
+		<b><xsl:attribute name="class"><xsl:value-of select="concat('getTextFor null this.innerText.doc.pageof|', $pos, ';', $length)"/></xsl:attribute></b>
 	      </center></td>
 	    <td align="right">
 	      <xsl:if test=" not($pos = $length)">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
+		<a href="{$library_name}?a=d&amp;amp;c={$collName}&amp;amp;d={@selectedNode}.ns"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
 	      </xsl:if>
 	    </td>
@@ -551,5 +547,5 @@
 	    <input type='hidden' name='d' value='{@selectedNode}'/>
 	    <input type="text" name="gp" size="3" maxlength="4"/>
-	    <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
+	    <input type="submit" class="getTextFor null this.value.doc.gotopage"></input>
 	  </form>
 	</td>
@@ -568,14 +564,14 @@
 	    <form name="EnrichForm" method="get" action="{$library_name}">
 	      <xsl:apply-templates select="paramList"/>
-	      <input type='hidden' name='a' value='d'/>
-	      <input type='hidden' name='d' value='{$docID}'/>
-	      <input type='hidden' name='c' value='{$collName}'/>
-	      <xsl:if test='$request-params/param[@name="sib"]'>
-		<input type='hidden' name='sib'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="sib"]/@value'/></xsl:attribute></input></xsl:if>
-	      <input type='hidden' name='s' value='{@name}'/>
-	      <input type='hidden' name='p.a'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.a"]'/></xsl:attribute></input>
-	      <input type='hidden' name='p.sa'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.sa"]'/></xsl:attribute></input>
-	      <input type='hidden' name='p.s'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.s"]'/></xsl:attribute></input>
-	      <input type='hidden' name='end' value='1'/>
+	      <input type="hidden" name="a" value="d"/>
+	      <input type="hidden" name="d" value="{$docID}"/>
+	      <input type="hidden" name="c" value="{$collName}"/>
+	      <xsl:if test="$request-params/param[@name='sib']">
+		<input type="hidden" name="sib"><xsl:attribute name="value"><xsl:value-of select="$request-params/param[@name='sib']/@value"/></xsl:attribute></input></xsl:if>
+	      <input type="hidden" name="s" value="{@name}"/>
+	      <input type="hidden" name="p.a"><xsl:attribute name="value"><xsl:value-of select="$request-params/param[@name='p.a']"/></xsl:attribute></input>
+	      <input type="hidden" name="p.sa"><xsl:attribute name="value"><xsl:value-of select="$request-params/param[@name='p.sa']"/></xsl:attribute></input>
+	      <input type="hidden" name="p.s"><xsl:attribute name="value"><xsl:value-of select="$request-params/param[@name='p.s']"/></xsl:attribute></input>
+	      <input type="hidden" name="end" value='1'/>
 	      <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
 	    </form>
@@ -615,6 +611,6 @@
     <xsl:param name="direction"/>
     <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
-    <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'>  
-      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
+    <xsl:if test="$request-params/param[@name='dt']/@value != 'simple'">  
+      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;amp;c=<xsl:value-of select="$collName"/>&amp;amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;amp;sib=1&amp;amp;p.s=<xsl:value-of select="$request-params/param[@name='p.s']/@value"/>&amp;amp;p.sa=<xsl:value-of select="$request-params/param[@name='p.sa']/@value"/>&amp;amp;p.a=<xsl:value-of select="$request-params/param[@name='p.a']/@value"/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     </xsl:if> 
   </xsl:template>
@@ -622,13 +618,9 @@
   <xsl:template name="externalPage">
     <xsl:param name="external"/>
-    <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
-    <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
-    <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
+    <xsl:variable name="go_forward_link"><a class="getTextfor external.go_forward"><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute></a></xsl:variable>
+    <h2 class="getTextFor external.title"></h2>
+    <p><xsl:attribute name="class"><xsl:value-of select="concat('getTextFor null this.innerText.external.text|', $go_forward_link)" /></xsl:attribute>
     </p>
   </xsl:template>
 
 </xsl:stylesheet>
-
-
-
-
