> I'm curious about your expression <xsl:number
> count="note[@type= current()/@type]" level="any"/>.
>
> Within a pattern, current() refers to the node that the
> pattern is trying to match, which will be the note element.
> So I think the predicate is always true.
I've just been writing some tests for this - there are none in the W3C test
suite!
It turns out Saxon is getting it wrong. It's binding current() to the node
that is the context node at the time the pattern is evaluated, rather than
the node that is being tested against the pattern. It's the same thing in
the common case of xsl:template match patterns, but can be quite different
in other cases. It seems this bug has been present for a very long time, and
might be tricky to fix.
Michael Kay
http://www.saxonica.com/-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at
http://www.sourceforge.net/community/cca08_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help