I have seen patterns for translating a string into lower (or upper case) using the translate function for folks stuck using xslt 1.0.
Is there a elegant way of just making the first letter of a string lowercase?
TestCase => testCase
I have seen patterns for translating a string into lower (or upper case) using the translate function for folks stuck using xslt 1.0.
Is there a elegant way of just making the first letter of a string lowercase?
TestCase => testCase
Use the XPath
translate
function, having separated the string into first character and the rest. This will require somewhat long winded XSLT using multiple variables to hold intermediate results.You should be able to combine substring and concat with translate to do it like so:
XSLT has a substring function, so you could use that pattern with the substring function to get what you want.
If your string were, for example, in an attribute called
name
: