Ignore:
Timestamp:
2009-01-06T14:26:10+13:00 (15 years ago)
Author:
kjdon
Message:

indented the xml nicely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/default/transform/service-params.xsl

    r13505 r18316  
    55  extension-element-prefixes="java">
    66
    7 <!-- handling of the different types of params on a service form
     7  <!-- handling of the different types of params on a service form
    88  - these now only output the selection box/text box etc, not the name -->
    99
     
    1919      <xsl:otherwise>
    2020        <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
    21           <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
     21        <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
    2222      </xsl:otherwise>
    2323    </xsl:choose>
     
    2525    </ul>
    2626  </xsl:template>
    27  
     27  
    2828  <!-- puts all the params into a=p&p=h type form - need to change this if use
    2929  multi params  -->
     
    111111    </select>
    112112  </xsl:template>
    113  
     113  
    114114  <!-- string params -->
    115115  <xsl:template match="param[@type='string']">
     
    131131    <xsl:variable name="parent" select="@name"/>
    132132    <table>
    133         <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
     133      <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
    134134        <xsl:for-each select="param">
    135         <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
     135      <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
    136136    </xsl:for-each>
    137         </tr>
     137      </tr>
    138138     
    139         <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
     139      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    140140    </table>
    141141  </xsl:template>
     
    170170  <!--
    171171  <xsl:template match="paramList">
    172   <p/><table width="537">
    173   <xsl:choose>
    174   <xsl:when test='count(param)>4'>
    175   <xsl:for-each select="param[position() mod 2 = 1]">
    176   <tr><xsl:apply-templates select="."/>
    177   <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
    178 </xsl:for-each>
    179 </xsl:when>
    180   <xsl:otherwise>
    181   <xsl:for-each select="param">
    182   <tr><xsl:apply-templates select='.'/></tr>
    183 </xsl:for-each>
    184 </xsl:otherwise>
    185 </xsl:choose>
    186 </table>
    187 </xsl:template>
     172    <p/><table width="537">
     173      <xsl:choose>
     174        <xsl:when test='count(param)>4'>
     175          <xsl:for-each select="param[position() mod 2 = 1]">
     176            <tr><xsl:apply-templates select="."/>
     177              <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
     178          </xsl:for-each>
     179        </xsl:when>
     180    <xsl:otherwise>
     181      <xsl:for-each select="param">
     182        <tr><xsl:apply-templates select='.'/></tr>
     183      </xsl:for-each>
     184    </xsl:otherwise>
     185      </xsl:choose>
     186    </table>
     187  </xsl:template>
    188188  -->
Note: See TracChangeset for help on using the changeset viewer.