xsl-list
[Top] [All Lists]

Re: Do Templates Conflict?

2005-05-05 02:04:30

There is a massive gotcha here (or a bug in the spec, depending on your
point of view).

Consider a stylesheet that imports two stylesheets, which both contain a
template that matches the same element:

Surely the whole point of xsl:import is to overide things so I don't
see this as a bug. If you want the imported  templates to be mingled and
prioritised together then xsl:include is your friend.

Of course the natural ordering for imports is a tree partial order, and
so the linear ordering that is imposed to define import precedence is
slightly arbitrary, but it works as well as any other arbitrary
ordering, and I'm not sure the rules around a partial ordering would
have been any easier to explain or any less surprising on edge cases.
So long as you are aware that (almost uniquely for top level
instructions in in xsl) the order of xsl:import statements is
significant, then this isn't so bad is it?

David

________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>