xsl-list
[Top] [All Lists]

Magic numbers

2003-11-18 05:54:49
Hi everyone!

    I have the following xsl code:


<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="text"/>

<xsl:template match="/">
 <xsl:value-of select="100 * .05"/>
</xsl:template>

</xsl:stylesheet>



which works fine and shows the expected result... now...if you change
.05 for .07 you get something totally unexpected (at least is unexpected
to me).

My first thought was blaming the XSLT processor so I tried with another
one...
and I'm getting the same result whatever the processor is...
(MSXML 4 or Saxon 6.5.2)

   This only happens using the *magic* number of 7 with any other number it
works just fine and returns the expected result.

Does anyone know why this is happening?
Is is number 7 a truly magical number with undiscovered mathematical powers
or is it just me not understanding what's going on here? 
(my vote goes to the second one) ;-)



Regards,
Yago

_____________________________________________________________________
This e-mail is confidential and is intended solely for the use of the 
individual or entity to whom it is addressed.  If you are not the intended 
recipient and you have received this e-mail in error then any use, 
dissemination, forwarding, printing or copying of this e-mail is strictly 
prohibited. You should contact the sender by return e-mail and delete and 
destroy all the information from your system.  Any views or opinions presented 
are solely those of the author and do not necessarily represent those of CPM UK 
Limited.  This email does not form part of a legally binding agreement.  We 
have taken precautions to minimise the risk of transmitting software viruses or 
trojans, but we advise that you carry out your own virus checks on any 
attachments to this message.  We cannot accept liability for any loss or damage 
caused to your software, hardware or system.

Please note that all messages sent to CPM UK Limited are actively monitored for 
inappropriate material and/ or content.

More information about CPM can be found at our website at: 
http://www.cpm-int.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>