Ignore:
Timestamp:
2012-07-24T11:10:57+12:00 (12 years ago)
Author:
kjdon
Message:

gsvar now used for variables, so remove the variable bit for gslib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/core/transform/preProcess.xsl

    r25880 r26009  
    5454
    5555
    56   <!-- produce an exact copy of the current node, but expand and replace all elements belonging to the gslib namespace. -->
     56  <!-- produce an exact copy of the current node, but expand and replace all elements belonging to the gslib/gsvar namespaces. -->
    5757  <xsl:template name="expand_gslib_elements">
    5858
     
    6060    <xsl:for-each select="*|text()">
    6161      <xsl:choose>
    62    
     62    <!-- variables -->
    6363    <xsl:when test="namespace-uri(.)=namespace::gsvar">
    6464      <xsl:element name="xsl:value-of">
     
    6666          </xsl:element>
    6767</xsl:when>
    68     <!-- if node has gslib prefix, expand it into appropriate copy-of or call-template element -->
    69     <xsl:when test="namespace-uri(.)=namespace::gslib">
    70      
     68    <!-- templates -->
     69    <xsl:when test="namespace-uri(.)=namespace::gslib">   
    7170      <xsl:variable name="name" select="local-name()"/>
    72       <xsl:choose>
    73        
    74         <!-- if library contains a variable of this name, expand to it's value -->
    75         <xsl:when test="/skinAndLibraryXsl/libraryXsl//xsl:variable[@name = $name]">
    76           <xsl:element name="xsl:copy-of">
    77         <xsl:attribute name="select">$<xsl:value-of select="local-name()" /></xsl:attribute>
    78           </xsl:element>
    79         </xsl:when>
    80        
    81        
    82         <!-- if library contains a template of this name, expand to a call-template and pass attributes as parameters -->
    83         <xsl:otherwise>
    8471          <xsl:element name="xsl:call-template">
    8572        <xsl:attribute name="name"> <xsl:value-of select="local-name()" /></xsl:attribute>
     
    9279        </xsl:for-each>
    9380          </xsl:element>
    94         </xsl:otherwise>
    95        
    96       </xsl:choose>
    9781    </xsl:when>
    9882
Note: See TracChangeset for help on using the changeset viewer.