Search

Excuse the newbie question, not worked with XSLT before.

What’s the easiest way to convert a string to lower case

<xsl:value-of select="name"/>

Google brought up a few “lower-case” function results, but this failed:

<xsl:value-of select="lower-case(name)"/>

Usually like this

Eeek. Thanks

Seems tedious..

Any reason why you can’t use text-transform with css instead?

In my experience, lower/uppercase text requests are usually due to design, and as a strict standards based coder, I tend to keep those design specifics strictly in the css..

For example (Just incase):

#menu li { text-transform: lowercase; }

Right, but sometimes you need to change the case on a string for comparisons and such in the XSLT.

Ah, I see.. Haven’t run into a use for that yet. :)

If that’s the case, sorry for my unnecessary post.

Not unnecessary at all! It’s a valid point, and something Hainesy82 should consider if his usage is purely presentational.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details