xsl-list
[Top] [All Lists]

Re: [xsl] Default actions in XSLT 2.1

2008-11-03 11:53:42
2008/11/3 Michael Kay <mike(_at_)saxonica(_dot_)com>:

In 2.0 you also have the "initial template" parameter so you
can start the transform at any named template, which is much
more useful and kind of makes the initial mode parameter redundant.


Yes, if I have a stylesheet with multiple entry points then I tend to use
the "initial template" mechanism rather than "initial mode" to distinguish
them. In principle I've always felt "initial mode" should be a good idea
when you want to run one phase of a multi-phase stylesheet, but I've never
had occasion to put this idea into practice.

It's exactly for that kind of transform that I've used initial
template - you have your seperate named templates for each step: maybe
"front page", "index", "chapters" whatever, and then you have an "all"
template which just calls each of them in turn.

That way you only run the lengthy "all" transform when you do the
final run, keeping transform times short during development of each of
the steps.

Even if there was a compelling use for initial mode, it wouldn't take
too much effort to wrap each mode in a named template.

Maybe someone on the list has found a good use for it?


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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