Ignore:
Timestamp:
2003-07-11T16:14:13+12:00 (21 years ago)
Author:
kjdon
Message:

documentType att now docType, changed where and how the display info is formatted

File:
1 edited

Legend:

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

    r4878 r4900  
    2020        <xsl:variable name="pname" select="@name"/>
    2121        <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"/></xsl:variable>
    22         <tr><td><xsl:value-of select='ancestor::service/display/param[@name=$pname]/name'/></td><td align="right"><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/></xsl:apply-templates></td></tr>
     22        <tr><td><xsl:value-of select="displayItem[@name='name']"/></td><td align="right"><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/></xsl:apply-templates></td></tr>
    2323      </xsl:otherwise>
    2424    </xsl:choose>
     
    3636    <xsl:param name="default"/>
    3737    <xsl:variable name="pname" select='@name'/>
    38     <xsl:variable name='pdisplay' select='ancestor::service/display/param[@name=$pname]'/>
    3938    <select name='{@shortname}'>
    40       <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select='$pdisplay/option[@name="0"]'/></option>
    41       <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select='$pdisplay/option[@name="1"]'/></option>
     39      <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option>
     40      <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option>
    4241    </select>
    4342  </xsl:template>
     
    5352    <xsl:param name="default"/>
    5453    <xsl:variable name="pname"><xsl:value-of select='@name'/></xsl:variable>
    55     <xsl:variable name='pdisplay' select='ancestor::service/display/param[@name=$pname]'/>
    5654    <xsl:choose>
    5755      <xsl:when test="count(option) = 1">
    58     <xsl:value-of select='$pdisplay/option'/>
     56    <xsl:value-of select="option/displayItem[@name='name']"/>
    5957    <input type='hidden' name='{@shortname}'><xsl:attribute name='value'><xsl:value-of  select='option/@name'/></xsl:attribute></input>
    6058      </xsl:when>
     
    6260    <select name="{@shortname}">
    6361      <xsl:for-each select="option">
    64         <xsl:variable name='op_name' select='@name'/>
    65         <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select='$pdisplay/option[@name=$op_name]'/></option>
     62        <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
    6663      </xsl:for-each>
    6764    </select>
     
    7572  <xsl:template match="param[@type='enum_multi']">
    7673    <xsl:variable name="pname" select='@name'/>
    77     <xsl:variable name='pdisplay' select='ancestor::service/display/param[@name=$pname]'/>
    7874    <select name="{@shortname}" size='2'><xsl:attribute name="multiple"></xsl:attribute>
    7975      <xsl:for-each select="option">
    80     <xsl:variable name='op_name' select='@name'/>
    81     <option value="{@name}"><xsl:value-of select='$pdisplay/option[@name=$op_name]'/></option>
     76    <option value="{@name}"><xsl:value-of select="displayItem[@name='name']"/></option>
    8277      </xsl:for-each>
    8378    </select>
     
    10095    <xsl:variable name="parent" select="@name"/>
    10196    <table>
    102       <tr><td colspan='10'><xsl:value-of select="ancestor::service/display/param[@name=$parent]/name"/></td></tr>
     97      <tr><td colspan='10'><xsl:value-of select="displayItem[@name='name']"/></td></tr>
    10398      <tr>
    10499    <xsl:for-each select="param">
    105       <xsl:variable name='pname' select='@name'/>
    106      
    107       <td><xsl:value-of select="ancestor::service/display/param[@name=$pname]/name"/></td>
     100      <td><xsl:value-of select="displayItem[@name='name']"/></td>
    108101    </xsl:for-each>
    109102      </tr>
     
    114107  <xsl:template match="param[@type='multi']" mode="contents">
    115108    <xsl:param name="occurs">1</xsl:param>
    116     <xsl:variable name="pos" select="@occurs - $occurs"/>
     109    <xsl:variable name="pos" select="@occurs - $occurs"/>   
    117110    <tr><xsl:for-each select="param">
    118111    <xsl:variable name="pname" select="@name"/>
Note: See TracChangeset for help on using the changeset viewer.