[xslt] Peculiar xsl:number behavior or XSL mistake?



Hi,

I'm getting strange output from xsltproc on Windows ("Using libxml 20602, 
libxslt 10100 and libexslt 800") when trying to use xsl:number.

Here is an example:

<xsl:template match="/">
<html><body>

<xsl:number value="4234237" grouping-separator="," grouping-size="3" />

</body></html>

</xsl:template>


The expected output (and I am getting it from Saxon, Mozilla and IE) is:

<html><body>
4,234,237
</body></html>

On the other hand, from xsltproc I get:

<html><body>
4 34 37
</body></html>

Even worse, if I remove the <html> and <body> tags and use this:

<xsl:template match="/">

<xsl:number value="4234237" grouping-separator="," grouping-size="3" />

</xsl:template>

Instead of:

<?xml version="1.0"?>
4,234,237

I get from xsltproc:

xmlEncodeEntitiesReentrant : char out of range
<?xml version="1.0"?>
4&#255;34 37


In all tests I am using an empty XML input file:

<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>
<lala>
</lala>


Am I doing something wrong or is this a bug in xsltproc?

Any input would be appreciated.

Thanks,

Yuval

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]