Changeset 31850


Ignore:
Timestamp:
08/03/17 14:13:59 (3 years ago)
Author:
kjdon
Message:

handle the case where there are HList children of HLists. this happens eg DateList with -bymonth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r31652 r31850  
    9898    <li>
    9999      <xsl:attribute name="class">
    100         <xsl:if test="@nodeID = /page/pageRequest/paramList/param[@name = 'cl']/@value">selectedHorizontalClassifierNode </xsl:if>
     100        <!--<xsl:if test="@nodeID = /page/pageRequest/paramList/param[@name = 'cl']/@value">selectedHorizontalClassifierNode </xsl:if>-->
     101        <xsl:if test="starts-with(/page/pageRequest/paramList/param[@name = 'cl']/@value, @nodeID)">selectedHorizontalClassifierNode </xsl:if>
    101102        <xsl:text>horizontalClassifierNode</xsl:text>
    102103      </xsl:attribute>
     
    108109      </xsl:for-each>
    109110    </ul>
    110     <table id="classifiernodelist">
    111       <xsl:for-each select='classifierNode'>
    112     <xsl:call-template name="processNodeChildren">
    113       <xsl:with-param name='collName' select='$collName'/>
    114       <xsl:with-param name='serviceName' select='$serviceName'/>
    115     </xsl:call-template>
    116       </xsl:for-each>
    117     </table>
     111    <xsl:choose>
     112      <!-- if the children are HLists-->
     113      <xsl:when test="classifierNode[@childType = 'HList']">
     114    <xsl:for-each select='classifierNode'><!-- there should be only one-->
     115      <xsl:call-template name="HList">
     116        <xsl:with-param name='collName' select='$collName'/>
     117        <xsl:with-param name='serviceName' select='$serviceName'/>
     118      </xsl:call-template>
     119    </xsl:for-each>
     120    </xsl:when>
     121    <xsl:otherwise>
     122    <table id="classifiernodelist">
     123      <xsl:for-each select='classifierNode'>
     124        <xsl:call-template name="processNodeChildren">
     125          <xsl:with-param name='collName' select='$collName'/>
     126          <xsl:with-param name='serviceName' select='$serviceName'/>
     127        </xsl:call-template>
     128      </xsl:for-each>
     129    </table>
     130      </xsl:otherwise>
     131    </xsl:choose>
    118132  </xsl:template>   
    119133
Note: See TracChangeset for help on using the changeset viewer.