[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Priority and import precedence

Subject: Re: [xsl] Priority and import precedence
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 31 Jan 2005 15:23:41 GMT

  It seems the priority attribute on a template is of less importance than
  the order in which stylesheets are imported, when using

and also apply-templates. templates in the importing stylesheet always
win, irrespective of priority, which is only considered for templates
at the same import level.

> Is there a reason for this?  

Apart from the consistency argument above, the answer to "why did you do
it that way" questions can only be answered by people on the original WG,
most of whom aren't so active on this list these days, I think:-)

Importing works well in cases of simple overrides, but if you need
finer control over which templates get executed I find it's often better
to use xsl:include and then control individual templates with priority.
But then you lose apply-import functionality, unless you are using xslt2
when you can use next-match which is more or less the same thing but
without the dependency on import.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread