Posted By

Meander365 on 08/03/09


Tagged

case XSL uppercase first


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


First Character to Upper Case


 / Published in: XSLT
 

Generate the first character then show the remaining string.

  1. <!-- generate first character -->
  2. <xsl:value-of select="concat( translate( substring( $MY-STRING, 1, 1 ),$lowerCase, $upperCase ), substring( @type, 2, string-length( $MY-STRING)))" />
  3.  
  4. <!-- generate remaining string -->
  5. <xsl:value-of select="substring($MY-STRING,2,string-length($MY-STRING)-1)" />

Report this snippet  

You need to login to post a comment.