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

RE: Priority and import precedence

Subject: RE: Priority and import precedence
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Mon, 31 Jan 2005 15:55:21 -0000
xsl import precedence priority
> > 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.

What confused me here was that as A imports both B and C, I considered
templates in B and C to be of equal priority.  With that in mind I
thought I could put a template in B, give it a priority of say 10 and be
satisfied it would beat any templates defined in C.

It just seems really strange that the ordering of the import statements
should be more important that the priority attribute.  Maybe there
should be a processor warning 'Warning: priority attribute ignored
because of import precedence'... As you say, I think the best option is
to not use xsl:import/xsl:apply-imports and use
xsl:include/xsl:next-match instead.

cheers
andrew

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.