RE: Importing stylesheets Precedence Info

Subject: RE: Importing stylesheets Precedence Info
From: "Steven Livingstone" <s.livingstone@xxxxxxxxxxxxxx>
Date: Sat, 29 Jul 2000 17:28:12 +0100
Thanks again for your mail Jeni.

Yep - MSXML 3 supports apply-imports, but my XSL fragments are independent
of each other and so only the parent sheet should know about them - they
don't know about each other. So although your solution works, in my case it
isn't suitable.

One thing did get me thinking. Would it not be cool if the apply imports
could take a parameter of the stylesheet to apply the matching to?? So, if
you import 3 stylesheets, you could specify, during an apply-imports, that
the 2nd should have overall precedence...etc...

Anyone else thought about this? Could be i'm missing something.

thanks -

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Jeni Tennison
Sent: 28 July 2000 23:07
To: Steven Livingstone
Cc: xsl-list@xxxxxxxxxxxxxxxx
Subject: RE: Importing stylesheets Precedence Info


>The first was interesting. It works fine (i think) if only one of the
>templates you imported have a match, but in my case, if I imported 5
>stylesheet "fragments" and each one had a <xsl:template match="/"> then I
>think only the first imported one would be matched with apply-imports..i
>want to match them all.

I'm glad you've got it working anyway, and I don't want to distract you
from pursuing your current solution, but I think you could get it working
if you:

(a) rather than having all the imports occur in one stylesheet, have only
one stylesheet imported at each stage (with that stylesheet importing the
next stylesheet and so on) and

(b) put xsl:apply-imports in all the relevant templates in the stylesheets
that do some importing

Of course, it's a solution that is quite a lot of hassle and may cause
problems for other reasons, so I certainly won't be offended if you don't
use it ;)

It's not clear to me why xsl:apply-imports was designed only applies
templates found in the first imported stylesheet rather than doing so in
import-precedence order.  Perhaps someone can shed light on this?



Dr Jeni Tennison
Epistemics Ltd * Strelley Hall * Nottingham * NG8 6PE
tel: 0115 906 1301 * fax: 0115 906 1304 * email:

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread