[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Priority and import precedence
> > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|