translate()-function does not work I used this xml: <?xml version="1.0" encoding="UTF-8"?> <!-- Document : Test.xml Created on : 8. September 2002, 16:31 Author : tim Description: Purpose of the document follows. --> <root> this is text in lowercase </root> with this xsl: <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- Document : test.xsl Created on : 8. September 2002, 16:31 Author : tim Description: Purpose of transformation follows. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="root"> <xsl:variable name="upper_case" select="ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ"/> <xsl:variable name="lower_case" select="abcdefghijklmnopqrstuvwxyzäöü"/> <xsl:value-of select="."/> <xsl:value-of select="translate(string(.), $lower_case, $upper_case)"/> </xsl:template> </xsl:stylesheet> and the result was: <?xml version="1.0" encoding="UTF-8"?> this is text in lowercase this is text in lowercase The second line should be upper-case thanx
1. XSLT problems are not FOP problems. They should be reported to the XSLT processor team. 2. The translate function does work. The problem is here: <xsl:variable name="upper_case" select="ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ"/> ^^^^ Do a <xsl:value-of select="$upper_case"/>. The result is an empty string. The variable gets the value of the element ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ assigned, which does not exist, therefore the variable has the empty node set as value. The translate function call is actually translate(.,'',''), a noop. Use <xsl:variable name="upper_case" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ'"/> to get the string assigned to the variable.
batch transition to closed remaining pre-FOP1.0 resolved bugs