On 15 May 2014, at 15:38, Rushforth, Peter
peter(_dot_)rushforth(_at_)nrcan-rncan(_dot_)gc(_dot_)ca
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Hi,
We are using <xsl:apply-imports/> to allow an imported stylesheet to provide
custom javascript links in the head
of the generated html page.
The problem is that unless the imported stylesheet provides a do-nothing
template for this mode, the <xsl:apply-imports/>
directive seems to invoke the default templates from either the imported
stylesheet or itself. I thought, from reading
the "manual", that xsl:apply-imports only invoked templates which have the
same mode as that of the invoking template.
Why are the default templates apparently being invoked? Thank you.
If I remember correctly, XSLT 1.0 was a bit vague on this and XSLT 2.0
clarified it, so processors may vary. XSLT 2.0 states that if no user-written
template is found to meet the criteria for xsl;apply-imports, the built-in
template is executed.
Built-in templates of course apply to every mode.
Michael Kay
Saxonica
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--