On 03/11/2012 18:42, Daniel Sullivan wrote:
But templates in the importing stylesheet that match have absolute priority
over those in the imported stylesheet, so a declarative stylesheet that imports
another stylesheet would have the same effect whether the imported stylesheet
was declarative or imperative, wouldn't it?
The point is that if you split your code into smaller templates, then
you can override smaller parts of your code. It's the same as in OO
programming - big monolithic methods can only be overridden in-toto, you
can't change parts of their behaviour selectively.
Incidentally, the terms "declarative" and "imperative" for describing
this distinction are not really very appropriate. Arguably everything in
XSLT is declarative. It's just that some constructs look more imperative
than others - especially those like choose and apply-templates and
format-number that are expressed using imperative English verbs.
Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--