mod() function broken on linux Alpha (was: Re: [xslt] libxslt build problems on linux-alpha?)
- From: Geert Kloosterman <geertk ai rug nl>
- To: xslt gnome org
- Subject: mod() function broken on linux Alpha (was: Re: [xslt] libxslt build problems on linux-alpha?)
- Date: Wed, 26 Jun 2002 19:36:42 +0200
Hi Daniel, all,
I've done some more research on the problem. I did a
xsltproc -v patterns.xsl db100.xml 2> patterns.log
and compared the logs from both machines:
--- patterns.log.i386 Wed Jun 26 17:54:38 2002
+++ patterns.log.alpha Wed Jun 26 17:54:25 2002
@@ -1083,8 +1083,11 @@
xsltDefaultProcessOneNode: copy text
xsltEvalXPathPredicate: returns 0
-xsltProcessOneNode: applying template 'row[id mod 3 = 2][following-sibling::row[4]/firstname='Bob']' for row
-xsltApplyOneTemplate: copy node crazy
+xsltEvalXPathPredicate: returns 0
+xsltEvalXPathPredicate: returns 0
+xsltEvalXPathPredicate: returns 0
+xsltProcessOneNode: applying template 'row' for row
+xsltApplyOneTemplate: copy node row
xsltApplyTemplates: node: row
xsltApplyTemplates: list of 15 nodes
xsltProcessOneNode: no template found for text
<snip>
The problem seems to be the "mod" statement. For example, the
following stylesheet:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="table/row[id mod 3 = 2]">
<xsl:value-of select="id"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
generates (using db100.xml again) on i386:
0002
0005
0008
...
(left a couple out to save space)
...
0095
0098
but on alpha the output is just:
0002
0005
The test documents were identical.
On i386 the output of the following stylesheet is "OK", on alpha it's
"Ooops!".
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="8 mod 3 = 2">
<xsl:text>OK
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Ooops!
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Geert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]