Subject: Upper-casing the first character of a string -- Am I missing some thing? From: Brian Young <Brian.Young@xxxxxxx> Date: Mon, 31 Jul 2000 15:34:20 -0400 |
Hello, I need to upper-case the first character of a string contained in my input XML prior to output. I was wondering if there was a better way, this seems a bit clunky: <xsl:value-of select="translate(substring(@name, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /> <xsl:value-of select="substring(@name, 2, string-length(@name) - 1)" /> I don't need to worry about non-English characters, as this code is meant to convert a property name ("text") over to its corresponding accessor method name ("getText", "setText"). I do the "get" vs. "set" determination earlier. Thanks, Brian Young XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Recall: Sort supported processors ?, Don Bruey | Thread | applying templates more efficiently, Eric Taylor |
RE: microsoft latest, bug with exte, Sebastian Rahtz | Date | RE: microsoft latest, bug with exte, Andrew Kimball |
Month |