[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: template conflicts

Subject: Re: template conflicts
From: Jeni Tennison <Jeni.Tennison@xxxxxxxxxxxxxxxx>
Date: Tue, 23 May 2000 15:21:22 +0100
domain.xsl
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.