xsl-list
[Top] [All Lists]

RE: [xsl] When exactly is the current node changed?

2006-11-16 17:31:38

I think I missed the point. Why are we suddenly so interested in the order
in which internal things happen? The only thing you know for sure is that a
node becomes the current node before you evaluate an expression that
references it. That might be long after the template has exited.

One can imagine a situation where the compiler knows that apply-templates
will select an A element (because the schema says that's the only thing
there can be); and that there's only one template rule that can handle this
element. So the template rule gets fired off; but it never references the
context node, so the A element actually never gets evaluated at all.

Michael Kay
http://www.saxonica.com/


I think logically current nnode is changed by the apply 
templates and is set (in turn) to each of teh sekected nodes 
_before_ a template is instantiated. The definition of the 
match patern more or less implies this as it is in terms of 
defining which templates match the current node. 
Implementtaions may do something else entirely of course.

David

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



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