Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lower-case

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
I have a variable in my xsl file which i want to convert to lower case. The code I am using is as below but I gat the error message 'unknown Xpath function error'

<xsl:value-of select="lower-case($Freq"/>

Can anyone help.

Regards,
 
I'm amazed. I just tried the same thing with a little .net app I wrote and got the same thing. If you are using a server side language can you not just do the conversion there?
 
[1] I suppose this is a typo.
><xsl:value-of select="lower-case($Freq"/>
[tt]<xsl:value-of select="lower-case($Freq[red])[/red]"/>[/tt]

[2] Then I suppose you know very well lower-case is xslt2 function and you use the xslt2-aware application.

[2.1] If $Freq sequence contains only one item, there should not be a problem.

[2.2] If $Freq contains more than one item, you have a problem. You've to zoom into a particular item, say, item 1.
[tt]<xsl:value-of select="lower-case($Freq[1])"/>[/tt]
then you should be fine.
 
Sorry for not getting back to you. I've been away for the last week. it was due to item 2 above. not xslt2-aware.

Regards,

 
Though lower-case() has functionally more than just lower-case of alphabets (ABC...), you can try if it is enough treating them only by xslt1.0 translate().
[tt] <xsl:value-of select="translate($Freq,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top