Thanks for reporting this. So that I can investigate it, could you please:
(a) check whether the problem still exists on Saxon 8.0
(b) send me a source file for the XML document used.
Michael Kay

From: [] On Behalf Of Roger Kovack
Sent: 25 July 2004 01:36
Subject: [saxon] Numeric predicate in ancestor:: ignored

This template fragment: ($el-name = 'po')

        <xsl:variable name="src-parent" select="$this-node/ancestor::task/*[name() = $el-name][text() != ''][@decl]"/>
                <xsl:message>src parent: <xsl:copy-of select="$src-parent[1]"/></xsl:message>

<po decl="">23</po>
which IS the expected results.

But this:

        <xsl:variable name="src-parent" select="$this-node/ancestor::task/*[name() = $el-name][text() != ''][@decl][1]"/>
                <xsl:message>src parent: <xsl:copy-of select="$src-parent"/></xsl:message>

<po decl="">23</po><po decl="">11</po>
NOT the expected results.

This is running on a JDOM, saxon 7.8

Roger Kovack
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. _______________________________________________ saxon-help mailing list