Changeset 25398

Show
Ignore:
Timestamp:
17.04.2012 19:57:53 (7 years ago)
Author:
ak19
Message:

gslib:langfrag used directly in document.xsl and documentbasket.xsl which used to call the document-editor-language-fragments template before, which itself then called gslib:langfrag. However, since gslib statements are expanded only once by TransformingReceptionist?.java, the 2 document xsl files in the pages folder call gslib:langfrag directly now.

Location:
main/trunk/greenstone3/web/interfaces/oran/transform
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/header.xsl

    r25378 r25398  
    404404    </xsl:template> 
    405405 
    406     <!-- gslib:langfrag should get expanded in ../util.xsl --> 
     406    <!-- document-editor-language-fragments is no longer called from anywhere (document.xsl and documentbasket.xsl  
     407         use to call it), since all the xsl pages wishing to make use of doc-editor-lang-fragments now directly  
     408         call gslib:langfrag which is defined in ../util.xsl --> 
    407409    <xsl:template name="document-editor-language-fragments"> 
    408410      <!--<gslib:langfrag name="dse"/>--> 
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl

    r25371 r25398  
    349349            </td> 
    350350        </tr></table> 
    351         <xsl:call-template name="document-editor-language-fragments"/> 
     351        <gslib:langfrag name="dse"/><!--<xsl:call-template name="document-editor-language-fragments"/>--> 
    352352    </xsl:template> 
    353353     
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/documentbasket.xsl

    r25293 r25398  
    3636            </xsl:for-each> 
    3737             
    38             <xsl:call-template name="document-editor-language-fragments"/> 
     38            <gslib:langfrag name="dse"/><!--<xsl:call-template name="document-editor-language-fragments"/>--> 
    3939        </xsl:if> 
    4040    </xsl:template> 
  • main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl

    r25378 r25398  
    678678  </xsl:template> 
    679679 
    680   <!-- call function with the name prefix (e.g. dse) --> 
     680 
     681  <!-- This next template expands gslib:langfrag. 
     682       When debugging with o=skinandlibdoc, it's seen that <gslib:langfrag name='dse' /> gets expanded to: 
     683       <xsl:call-template name="langfrag"> 
     684     <xsl:with-param name="name">dse</xsl:with-param> 
     685       </xsl:call-template> 
     686       Before the param can be used in this template, need to retrieve it by name with <xsl:param/> 
     687       as explained in http://www.maconstateit.net/tutorials/XML/XML05/xml05-05.aspx 
     688       --> 
    681689  <xsl:template name="langfrag"> 
    682     <script type="text/javascript">       
    683       <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceStringsAsJavascript($interface_name, /page/@lang, @name)"/> 
     690    <xsl:param name="name"/> 
     691    <script type="text/javascript"> 
     692      <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceStringsAsJavascript($interface_name, /page/@lang, $name)"/> 
    684693    </script> 
    685694  </xsl:template>