Changeset 332

Show
Ignore:
Timestamp:
03/04/07 12:46:59 (2 years ago)
Author:
mikey
Message:

added <ul> around <li>s in forms
do not write <label> around <input type="submit" />
removed mandatory attribute from resulting <input>
removed type attribute from resulting <textarea> and <select>
rename form fields from id.fieldname to id_fieldname

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/resources/xsl/stub.xsl

    r278 r332  
    213213      </xsl:attribute> 
    214214      <xsl:copy-of select="@*[local-name() != 'class']"/>       
     215      <ul> 
    215216      <xsl:apply-templates select="node()"> 
    216217        <xsl:with-param name="id" select="@id"/> 
    217218      </xsl:apply-templates> 
     219      </ul> 
    218220    </div> 
    219221  </xsl:template> 
     
    222224    <xsl:param name="id" select="@id"/> 
    223225    <li> 
    224       <label
    225         <xsl:attribute name="for"
    226           <xsl:value-of select="$id"/
    227           <xsl:text>.</xsl:text
    228           <xsl:value-of select="@name"/
    229         </xsl:attribute
    230         <xsl:if test="not(@type = 'submit')"
     226      <xsl:if test="not(@type = 'submit')"
     227        <label
     228          <xsl:attribute name="for"
     229            <xsl:value-of select="$id"/
     230            <xsl:text>_</xsl:text
     231            <xsl:value-of select="@name"/
     232          </xsl:attribute
    231233          <xsl:call-template name="stub:include"> 
    232234            <xsl:with-param name="part"> 
     
    236238            </xsl:with-param> 
    237239          </xsl:call-template> 
    238         </xsl:if> 
    239         <xsl:if test="@mandatory = 'true'"><xsl:text>*</xsl:text></xsl:if
    240       </label
     240          <xsl:if test="@mandatory = 'true'"><xsl:text>*</xsl:text></xsl:if> 
     241        </label
     242      </xsl:if
    241243      <xsl:choose> 
    242244        <xsl:when test="@type = 'text'"> 
     
    244246            <xsl:attribute name="id"> 
    245247              <xsl:value-of select="$id"/> 
    246               <xsl:text>.</xsl:text> 
     248              <xsl:text>_</xsl:text> 
    247249              <xsl:value-of select="@name"/> 
    248250            </xsl:attribute> 
    249             <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name']"/> 
     251            <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name' and local-name() != 'mandatory']"/> 
    250252          </input> 
    251253        </xsl:when> 
     
    254256            <xsl:attribute name="id"> 
    255257              <xsl:value-of select="$id"/> 
    256               <xsl:text>.</xsl:text> 
     258              <xsl:text>_</xsl:text> 
    257259              <xsl:value-of select="@name"/> 
    258260            </xsl:attribute> 
    259             <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name']"/> 
     261            <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name' and local-name() != 'mandatory' and local-name() != 'type']"/> 
    260262            <xsl:apply-templates select="node()"> 
    261263              <xsl:with-param name="id" select="@id"/> 
     
    267269            <xsl:attribute name="id"> 
    268270              <xsl:value-of select="$id"/> 
    269               <xsl:text>.</xsl:text> 
     271              <xsl:text>_</xsl:text> 
    270272              <xsl:value-of select="@name"/> 
    271273            </xsl:attribute> 
    272             <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name']"/> 
     274            <xsl:copy-of select="@*[local-name() != 'id' and local-name() != 'name' and local-name() != 'mandatory' and local-name() != 'type']"/> 
    273275            <xsl:apply-templates select="text()"/> 
    274276          </textarea> 
     
    280282        </xsl:when> 
    281283        <xsl:otherwise> 
    282           <xsl:text>[ Unknown Item-Type! ]</xsl:text>  
     284          <xsl:text>[ Unknown Item-Type! ]</xsl:text> 
    283285        </xsl:otherwise> 
    284286      </xsl:choose>