Soren Kuula <dongfang-remove_this@remove_this-bitplanet.net> writes:
> Hi,
>
> Suppose I have:
>
> <xsl:template match="foo[position()!=last()]"/>
> <xsl:template match="foo[position()=last()]"/>
>
> -- is that an error (same priority)?
These two match patterns match distinct nodes so that is no more an
error than match="a" and match="b".
> (my precessor reports nothing, buts
> as far as I recall it doesn't really have to). Or is the priority a
> post-predicate-survival issue?
>
> Are these any better or worse (with respect to specification
> fulfillment) that the above pair?
>
> <xsl:template match="foo[position() > 2]"/>
> <xsl:template match="foo[position() < 4]"/>
here for position()=3 both templates match, with the same priority, so
this is an error, butit is specified as being recoverable with the
recovery action, if the processor does not report the error, is to take
the last one on the stylesheet. (This is the only case in which order of
the templates makes any difference.)
with saxon for example with -w0 no error is generated, with the default
-w1 a warning is made but the last template is used, with -w2 it is
taken as a fatal error.
> (yes I could find out for myself all right .. and who knows if I will be
> the first onw ansering myself
But isn't an interesting little gotcha?)
>
> Soren
David