At 2011-11-07 12:57 -0500, Wendell Piez wrote:
Hi,
On 11/7/2011 12:32 PM, Michael Kay wrote:
On 11/4/2011 9:27 PM, G. Ken Holman wrote:
The current() function returns that node that was current at the
beginning of the evaluation of the XPath expression.
I'm sure Ken won't mind if I add a little color commentary. It may
help to keep in mind that the "context node" is an XPath concept,
while the "current node" is an XSLT concept.
That's the way the 1.0 specifications described it. In 2.0 both specs
speak of the context item, and the current() function, rather
inelegantly, is defined as returning "the item that was the context item
at the point where the [XPath] expression was invoked from the XSLT
stylesheet. "
I suppose that's understandable, inasmuch as XSLT 2.0 in general is
being pulled in the direction of a generalized data processing
language and not just a tree transformation language. (What with
xsl:for-each no longer selecting -- or, some day, template rules no
longer matching -- only nodes.)
Yet I dare say it may help to keep a rough distinction in mind in any case.
So does this also mean the concepts of "current node list" etc. go
by the boards? (Now going to look and see.)
Yes, it does ... it is now the "context list".
J.2.1 Pervasive changes
The description of the evaluation context has been
changed. The concepts of current node and current
node list have been replaced by the XPath concepts
of context item, context position, and context size.
Though I don't often remember to use that terminology since the list
sometimes has to be nodes. For example in XSLT 1 and 2 some
constructs (like the "/" operator) require the context list returned
by left hand side to be a node list ... but I understand this is
likely to be changed in the next version.
And I don't mind at all that you point out nuances in my posts,
Wendell ... we are all participating to help posters and enrich the archive.
. . . . . . . . . . Ken
--
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
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>
--~--