> Second, while running, any
> xsl:apply-templates command
> will spend time trying to match against the extra templates
> that have a "match" attribute.
>
An XSLT processor is very unlikely to do a serial search of template rules
to find the one that matches. It will typically build some kind of decision
tree or hash table at compile time. If a template rule is of the form
<xsl:template match="some-element-name">
then it's very unlikely that it will add perceptibly to the cost of
executing xsl:apply-templates on a node that is not a <some-element-name>
element.
Of course, I'm making assumptions here about XSLT processors whose internals
are known only to the vendors.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|