The following issue has been updated:
Updater: Brian Minchau (mailto:[EMAIL PROTECTED])
Date: Fri, 24 Sep 2004 8:29 AM
Changes:
Component changed to transformation
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/XALANJ-1651?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XALANJ-1651
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XALANJ-1651
Summary: Error with node sets and [last()] predicate
Type: Bug
Status: Open
Project: XalanJ2
Components:
Xalan-interpretive transformation
transformation
Versions:
CurrentCVS
Assignee: Xalan Developers Mailing List
Reporter: Brian Minchau
Created: Fri, 5 Sep 2003 7:32 PM
Updated: Fri, 24 Sep 2004 8:29 AM
Environment: Operating System: Other
Platform: Other
Description:
This test was originally posted by Brian Lalonde under bug 15327 which is
against XSLTC, but it didn't fail with XSLTC. It does however fail for
Xalan-J interpretive.
Here is the stylesheet:
------------------------------------------
<?xml version="1.0" ?><?xml-stylesheet type="text/xsl" ?><!-- self-test -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-8" media-type="text/plain"/>
<xsl:param name="one">first</xsl:param>
<xsl:param name="two">second</xsl:param>
<xsl:template match="/">
<xsl:variable name="params" select="//xsl:param"/>
<xsl:variable name="params1" select="$params[1]"/>
<xsl:variable name="expression1"><xsl:value-of select="$params1[last
()]"/></xsl:variable>
<xsl:variable name="expression2"><xsl:value-of select="$params[1][last
()]"/></xsl:variable>
<xsl:text>Testing: </xsl:text>
<xsl:value-of select="system-property('xsl:vendor')"/><xsl:text> </xsl:text>
<xsl:value-of select="system-property('xsl:vendor-url')"/><xsl:text>
</xsl:text>
<xsl:choose>
<xsl:when test="$expression1=$expression2">OK</xsl:when>
<xsl:otherwise>Fail!</xsl:otherwise>
</xsl:choose>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
------------------------------------------
The same document is used as input (so it acts as XSL and input XML at the same
time). One difference from the original is that I've removed an href="test.xml"
in the xml-stylesheet processing instruction and I've renamed a few things.
Analysis: When fed as input to itself "params" should take on the list of two
parameters, "one" and "two". "params1" should take on the first of those,
just "one". "expression1" should be the last one in "params1", but since
there is only a single node it is just "one". "expression2" is just
like "expression1" except that the calculation happens in a single select, not
across 2 selects as it does for expression1. There is a final
test="$expression1=$expression2" which outputs OK or Fail!
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]