[prev in list] [next in list] [prev in thread] [next in thread]
List: xalan-j-users
Subject: Xsltc bug?
From: "Tsui, Alban" <Alban.Tsui () COGNOS ! com>
Date: 2002-04-25 14:34:30
[Download RAW message or body]
I think I have found a bug in xpath implementation in xsltc:
I had the following
<xsl:value-of
select="count(((preceding-sibling::*[number(indent_level)=number($curlevel)-
1])[last()])/preceding-sibling::row)+2"/>
and it works in normal xalan transform but it doesn't work in xsltc but it
works again if I change the line to
<xsl:value-of
select="count(((preceding-sibling::*[number(indent_level)=number($curlevel)-
1])[1])/preceding-sibling::row)+2"/>
Notice that the "last()" has been changed to a "1" - the first in the
nodeset.
I think in xsltc, the nodes in the (sub-) nodeset returned from the bit
preceding-sibling::*[number(indent_level)=number($curlevel)-1]
are returned in a reverse order, i.e. not in the order as in the original
document.
Has this bug been noticed and fixed?
Alban Tsui
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. Thank you.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.89">
<TITLE>Xsltc bug?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">I think I have found a bug in xpath implementation in \
xsltc:</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">I had the following</FONT>
<BR>
<BR> <FONT SIZE=2 \
FACE="Arial"><xsl:value-of \
select="count(((preceding-sibling::*[number(indent_level)=number($curlevel)-1])[last()])/preceding-sibling::row)+2"/></FONT></P>
<P><FONT SIZE=2 FACE="Arial">and it works in normal xalan transform but it doesn't \
work in xsltc but it works again if I change the line to</FONT> \
<BR> \
<BR> <FONT SIZE=2 \
FACE="Arial"><xsl:value-of \
select="count(((preceding-sibling::*[number(indent_level)=number($curlevel)-1])[1])/preceding-sibling::row)+2"/></FONT></P>
<P><FONT SIZE=2 FACE="Arial">Notice that the "last()" has been changed to a \
"1" - the first in the nodeset.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">I think in xsltc, the nodes in the (sub-) nodeset \
returned from the bit</FONT> </P>
<P> <FONT SIZE=2 \
FACE="Arial">preceding-sibling::*[number(indent_level)=number($curlevel)-1]</FONT> \
</P>
<P><FONT SIZE=2 FACE="Arial">are returned in a reverse order, i.e. not in the order \
as in the original document.</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Has this bug been noticed and fixed?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Alban Tsui</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">This message may contain privileged and/or confidential \
information. If you have received this e-mail in error or are not the intended \
recipient, you may not use, copy, disseminate or distribute it; do not open any \
attachments, delete it immediately from your system and notify the sender promptly by \
e-mail that you have done so. Thank you.</FONT></P>
</BODY>
</HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic