Boolean values are incorrectly converted to string in attribute value templates.
According to the XSLT specification, "The attribute value template is instantiated by replacing the expression together with surrounding curly braces by the result of evaluating the expression and converting the resulting object to a string as if by a call to the string function".
Let us assume the following stylesheet:
<?xml version="1.0" encoding = "ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
Normally, the boolean value true should be converted to the string "true", according to the definition of the string() function of XPath.
However, with XalanC 1.10, this is not the case. The boolean value true is converted to the string "1", and the boolean value false is converted to "0", as if the number() function had been called on the boolean value!
That is, the output produced is:
instead of the expected output:
Alain Le Guennec - R&D Expert Engineer