You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by ra...@epost.de on 2001/02/05 17:22:42 UTC

[Xalan-J 2 BUG] Template with node-set parameter no longer works

Hi,

I have an XSL template that expects a node-set as parameter and ran fine
under the Xalan-J 1 command-line tool. Now I have "upgraded" to Xalan-J
2 and my template no longer works. It claims that the node-set is empty
now.

Here's the beginning of my template:

<!--
Selects those nodes in a node-set that occur before a given node.
$nodeSet: The node-set.
$node: The elements in $nodeSet before this nodes are counted.
-->
<xsl:template name="nodesBefore">
 <xsl:variable name="first" select="$nodeSet[position() &lt; last()]"/>
 <xsl:variable name="last"  select="$nodeSet[position() = last()]"/>
 ...
</xsl:template>

I call it with something like
<xsl:call-template name="nodesBefore">
 <xsl:with-param name="node"    select="self::node()"/>
 <xsl:with-param name="nodeSet" select="//object[attribute::type='image']"/>
</xsl:call-template>

As I said, this run perfectly well under Xalan 1, but breaks Xalan 2.

Best regards
Rainer Klute

  Dipl.-Inform.                     E-Mail: rainer.klute@epost.de
  Rainer Klute                        Tel.: (0172) 2324824
  Körner Grund 24                           (0231) 511693
D-44143 Dortmund                       Fax: (0231) 511809