How do i convert to uppercase in XSLT using sharepoint designer

I have a transformation in XSLT by which I am trying to convert the default display of the file type of an uploaded document from lower case to upper; pdf to PDF. How am I able to do this.

<xsl:value-of select="upper-case(@File_x0020_Type)"  disable-output-escaping="yes"/>

This gave me an error. Can you please help me in which function to use and how to use it. Thanks in advance.
Who is Participating?
Geert BormansConnect With a Mentor Information ArchitectCommented:
<xsl:value-of select="translate(@File_x0020_Type, 'azertyuiopqsdfghjklmwxcvbn', 'AZERTYUIOPQSDFGHJKLMWXCVBN')"/>

it is a bit awkward, but upper-case() is an XSLT2 function.
In sharepoint XSLT (which is XSLT1) you need to use translate

If you have a number of uppercases to make, put the lookup strings in global variables
<xsl:variable name="lc" select="'azertyuiopqsdfghjklmwxcvbn'"/>
<xsl:variable name="uc" select="'AZERTYUIOPQSDFGHJKLMWXCVBN'"/>

and use
<xsl:value-of select="translate(@File_x0020_Type, $lc, $uc)"/>
for upper-case
<xsl:value-of select="translate(@File_x0020_Type, $uc, $lc)"/>
for lower-case
FPI_DEVTEAMAuthor Commented:
sorry gertone. i want you to please let me know how do I use the upper-case() statement. what is the syntax. what is the namespace i should add?
Geert BormansInformation ArchitectCommented:
Maybe I was not clear enough.
You simply CAN'T use upper-case().
It is a non existent function in sharepoint XSLT as far as I know, it is XSLT2, so not supported in Sharepoint

If you want to upper-case, you need to use the workaround I have shown
Geert BormansInformation ArchitectCommented:
maybe you want some references, stating the same

since they are at least about two years old,
I found you a reference of a guy building an uppercase template for his library in SS2010
doing the same
so the issue still exist
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.