Re: template conflicts

Subject: Re: template conflicts
From: Jeni Tennison <Jeni.Tennison@xxxxxxxxxxxxxxxx>
Date: Tue, 23 May 2000 15:21:22 +0100
Linda,

>I added the template to "domain.xsl" because I needed it to override the
>general one in "general.xsl", but it doesn't do so. Is this correct
>behaviour? I'm using XT.

My first thought, after reading of Section 2.6.2 (Stylesheet Import) in the
XSLT spec was that you might be importing 'general.xsl' after including
'domain.xsl'.

Then I tried it out using SAXON, and it shouted at me (very politely and
quite correctly) because xsl:import elements must come before xsl:include
elements.  I assume that XT complains in the same way, and that your
stylesheet looks like:

<xsl:import href="general.xsl"/>
...
<xsl:include href="module.xsl"/>
<xsl:include href="domain.xsl"/>
...

That being the case, according to the spec 'general.xsl' should have lower
import priority than 'domain.xsl' and therefore templates in 'domain.xsl'
should override those in 'general.xsl'.  In SAXON, this is what happens, so
it looks like either XT is misbehaving or there's something else wonky in
the stylesheet that I didn't include because I don't know about it.

If it's a problem in XT and you need to use XT, you could try adding a
priority attribute to the template to get the behaviour you want, but
that's definitely non-optimal.

Sorry to not be of more help.

Cheers,

Jeni

Dr Jeni Tennison
Epistemics Ltd, Strelley Hall, Nottingham, NG8 6PE
Telephone 0115 9061301 ? Fax 0115 9061304 ? Email
jeni.tennison@xxxxxxxxxxxxxxxx



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread