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: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Roger Kovack
Sent: 25 July 2004 01:36
To: saxon-help@lists.sourceforge.net
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>

reports:
<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>

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

This is running on a JDOM, saxon 7.8

Thanks,
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. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ saxon-help mailing list saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help