[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'

Subject: Re: a bit of distraction ' quiz of XSLT 1.0 oddities'
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 3 Jan 2006 10:11:15 +0000
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

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.