Page 1 of 1

lower-case function

Posted: Wed Dec 14, 2005 5:09 am
by jsb
My reading of the string processing functions says there's a lower-case function, but I can't seem to get that recognized by my code. Is that function not yet widely supported?

Jon

Posted: Wed Dec 14, 2005 11:05 am
by george
Hi Jon,

In XSLT 2.0/XPath 2.0 there is a lower-case funtion, see below a sample stylesheet that uses it. You need to use Saxon 8 with that as it provides XSLT 2.0 in oXygen.

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:value-of select="lower-case('ABC')"/>
</xsl:template>
</xsl:stylesheet>
In XSLT 1.0/XPath 1.0 there is no such funtion, there you can use the translate funtion, something like:

translate($value, 'ABC', 'abc')

Best Regards,
George

Posted: Wed Dec 14, 2005 11:13 am
by george