XSLT 1.0: xsl:apply-imports when there is no overridden rule

Section 5.6 says that "A template rule that is being used to override a
template rule in an imported stylesheet can use <xsl:apply-imports>"; it
does not say what happens if there is no such overridden rule. I can think
of at least three defensible interpretations: signal an error, invoke the
built-in template rule, or do a no-op.

A user has reported that Saxon and MSXML3 behave differently in this area.

The user was actually using xsl:apply-imports from within a template called
by name, and it might be that it was this that caused the difference. I
think the spec here can only be read one way, though it could be more
explicit: the phrase quoted above leaves room for doubt about whether
<xsl:apply-imports> can correctly be used outside a template rule, neither
does it explicitly say that <xsl:call-template> leaves the current template
rule unchanged.

Mike Kay

Received on Wednesday, 6 December 2000 04:55:37 UTC