You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2007/08/30 23:20:31 UTC

[jira] Resolved: (XALANC-655) Boolean value incorrectly converted to string in attribute value templates

     [ https://issues.apache.org/jira/browse/XALANC-655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni resolved XALANC-655.
----------------------------------

       Resolution: Fixed
    Fix Version/s: CurrentCVS

Patch applied.

> Boolean value incorrectly converted to string in attribute value templates
> --------------------------------------------------------------------------
>
>                 Key: XALANC-655
>                 URL: https://issues.apache.org/jira/browse/XALANC-655
>             Project: XalanC
>          Issue Type: Bug
>          Components: XalanC
>    Affects Versions: 1.10
>         Environment: win-xp-sp2
>            Reporter: Alain Le Guennec
>            Assignee: David Bertoni
>             Fix For: CurrentCVS
>
>         Attachments: patch.patch
>
>
> 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"/>
> 	<xsl:template match="/">
> 		<BOOL value="{true()}"/>
> 	</xsl:template>
> </xsl:stylesheet>
> 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:
> <BOOL value="1"/>
> instead of the expected output:
> <BOOL value="true"/>
> -- 
> Alain Le Guennec - R&D Expert Engineer
> ESTEREL TECHNOLOGIES
> Mail: Alain.LeGuennec@esterel-technologies.com

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org