|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: a bit of distraction ' quiz of XSLT 1.0 oddities'
On 1/3/06, Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx> wrote: > On 1/3/06, andrew welch <andrew.j.welch@xxxxxxxxx> wrote: > > An 'oddity' I've had to deal with a few times: > > <Snip/> > > > > > > What is the output? > > I have not used import very often, but looking up a bit, I would say: > I am in second.xsl! > > The reason for this is that second.xsl is imported after first.xsl and > therefore has a higher precedence, and import precedence is considered > before priority in matches (if I read it correctly). Correct. The very first rule in conflict resolution is to get rid of all templates with lower import precedence - this is decided ultimately by the order of the imports. It doesn't matter about the priority attribute, or the fact that match="node" is a better match than match="*", it's all down to the order of the import statements. The oddity (im my mind) is that "order of occurence" is the very last all-else-has-failed-and-we-have-to-choose-one technique for templates in the same stylesheet, but the very first for imported templates. 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
|

Cart








