lower-case function

Here should go questions about transforming XML with XSLT and FOP.
jsb
Posts: 20
Joined: Sat Nov 26, 2005 5:17 pm
Location: Houston, Texas, USA
Contact:

lower-case function

Post by jsb » Wed Dec 14, 2005 5:09 am

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
Jon Berndt
Development Coordinator
JSBSim Project
Open Source Flight Dynamics Model
http://www.jsbsim.org

george
Site Admin
Posts: 2100
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Wed Dec 14, 2005 11:05 am

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

george
Site Admin
Posts: 2100
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Wed Dec 14, 2005 11:13 am


Post Reply