RE: XT bug?

Subject: RE: XT bug?
From: "Ron Ten-Hove" <rtenhove@xxxxxxxxx>
Date: Tue, 30 May 2000 14:54:43 -0700

It is a bug.  In com.jclark.xsl.expr.FilterPattern, in the
getLastPosition() method, change line 64 from

	lastPosition = position;


	lastPosition = getPosition();

This problem appears whilst using the XSL last() function, in a use
case that causes the FilterPattern.getPosition() function not to be 
called prior to getLastPosition().


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of David Hunter
Sent: May 30, 2000 11:59
To: 'XSL-List@xxxxxxxxxxxxxxxx'
Subject: XT bug?

I just finished leaving the list, because I get too much email, and now I
have a question, and have to re-join.  :-)

I have come across an inconsistency, between XT and Saxon/MSXML3 (the May
release of MSXML).  I'm assuming that XT is incorrect, but I want to be

Suppose I have the following XML:


I want to create a stylesheet which prints out only the value of the last
<node> element.  So I have done this:

<xsl:stylesheet version="1.0"
<xsl:output method="text"/>

<xsl:template match="/nodes/node[last()]">
  <xsl:value-of select="."/>

<xsl:template match="text()"/>

>From both Saxon and MSXML, I get "c" as my output, but from XT I get

Is this an XT bug?  Note that if I change the template match to
"/nodes/node[position() = last()]", it works the same in all three.

If this is a bug, I'll submit it on XT's web site, but if it's a
re-interpretation of the spec, I'll leave it.

David Hunter

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread