xsl-list
[Top] [All Lists]

Re: [xsl] stylesheet organisation

2011-09-03 09:11:22
On 3 September 2011 14:31, Jesper Tverskov <jesper(_at_)tverskov(_dot_)dk> 
wrote:
I'm sorry that I dropped "as far as I know" from my posting right
before I hit the Send button, but I some times take chances in order
to stir up things that makes it possible for all of us to learn
something.

:)  You soon learn (or at least commit it to memory) when you answer
someone, and then others point out that your answer was wrong... it
worked for me anyway.

I still feel that the spec pretty much says what I'm saying,
http://www.w3.org/TR/xslt20/#import, and that most of the differences
are due to the simple fact the xsl.import must be the first child.

The main thing to remember with xsl:import is that the order of the
imports takes precedence over everything including the priority
attribute.

If you have:

<xsl:import href="foo.xslt">
<xsl:import href="bar.xslt"/>

and then someone comes along and changes it to:

<xsl:import href="bar.xslt"/>
<xsl:import href="foo.xslt">

...then it can change the output.  Changing the priorities of any of
the templates won't make any difference... those in foo.xslt will
always win - which goes against your idea that it was ultimately just
the ordering of the templates underneath.

xsl:include can be in any order, it doesn't matter, and priorities
still have an effect.


-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
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>