Skip to content

Instantly share code, notes, and snippets.

@aaronmcadam
Created September 10, 2010 15:19
Show Gist options
  • Save aaronmcadam/573818 to your computer and use it in GitHub Desktop.
Save aaronmcadam/573818 to your computer and use it in GitHub Desktop.
upper case first letter in xslt
<xsl:variable name="firstChar" select="substring(/page/colour,1,1)"/>
<xsl:variable name="productColour">
<xsl:value-of select="translate($firstChar,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:value-of select="substring-after(/page/colour,$firstChar)"/>
</xsl:variable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment