On 17/02/2012 04:27, ihe onwuka wrote:
AFAIK this doesn't work. Why?
--~------------------------------------------------------------------
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>
--~--
Are you asking: why cannot I refer to the value of a tunnel parameter
within the match pattern of a template?
If so, I agree it would be useful, but the design would be awkward. We
would have to decide whether the variable needs to be declared in the
xsl:param elements. If so, having a variable reference before the
variable declaration would feel strange. If not, allowing a reference to
an undeclared variable in the match pattern but not in the template body
would feel strange. It's also difficult to introduce retrospectively
because a variable in the match pattern is currently defined to refer to
global variables.
It would also prevent some optimizations, which might be important to
some implementors. Currently during the course of a single
transformation, if you do apply-templates twice on the same node in the
same mode, the same template rule is matched each time; this invariant
would no longer hold. Since XSLT performance depends critically on being
smart in the way template pattern matching works, this could be
significant (though not for Saxon).
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>
--~--