[xslt] Problem with date:seconds



Hi all

I have a little problem with the date:seconds
function.
The Result is sometimes a positive integer and
sometimes a negative integer.

The older 1.0.20 version of libxslt is working better
than the newer 1.0.21, but maybe it depends on the
operating System.


EXAMPLE:
--------
<?xml version="1.0"?> 
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:date="http://exslt.org/dates-and-times"; 
extension-element-prefixes="date" 
> 
<xsl:output method="xml" encoding="utf-8"
indent="yes"/> 
<xsl:variable
name="datetime">2002-11-26T19:41:52</xsl:variable> 

<xsl:template match="/"> 
<xsl:value-of select="date:seconds($datetime)"/> 
</xsl:template> 

</xsl:stylesheet> 

1.RESULT (Linux 2.4.18-4GB):
---------

xsltproc date.xslt date.xslt
<?xml version="1.0" encoding="utf-8"?>
1038339712


xsltproc -V
Using libxml 20424, libxslt 10020 and libexslt 711
xsltproc was compiled against libxml 20424, libxslt
10020 and libexslt 711
libxslt 10020 was compiled against libxml 20424
libexslt 711 was compiled against libxml 20424

2. Result
----------
linuxstefan:/web/test # xsltproc date.xsl date.xsl 
<?xml version="1.0" encoding="utf-8"?> 
-1038339712 

linuxstefan:/web/test # xsltproc -V 
Using libxml 20425, libxslt 10021 and libexslt 712 
xsltproc was compiled against libxml 20425, libxslt
10021 and libexslt 712 
libxslt 10021 was compiled against libxml 20425 
libexslt 712 was compiled against libxml 20425 

3. Result (Solaris)
-----------
vdcrtmp1 # /usr/local/bin/xsltproc date.xsl date.xsl 
<?xml version="1.0" encoding="utf-8"?> 
-1038339712 

vdcrtmp1 # /usr/local/bin/xsltproc -V 
Using libxml 20425, libxslt 10021 and libexslt 712 
xsltproc was compiled against libxml 20425, libxslt
10021 and libexslt 712 
libxslt 10021 was compiled against libxml 20425 
libexslt 712 was compiled against libxml 20425 

thanx

Bernhard
http://datenkueche.com

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de



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