The following comment has been added to this issue:

     Author: Brian Minchau
    Created: Tue, 14 Sep 2004 8:06 AM
       Body:
For anyone who tries to clean this up, here is my understanding.

A "current node" is an XSLT concept. When a template is invoked it has a "current 
node".  A limited number of XSLT element change the "current node", and these are:
  - <xsl:template match="..."> a template invoked due to a "match"
  - <xsl:for-each>
  - others ?

A "context node" is an XPath concept. When evaluating an XPath expression that occurs 
in a stylesheet, e.g.
   <xsl:apply-templates select="a/b/c"/>
the evaluation of an XPath expression starts with an initial "context node" being set 
before the evaluation of the XPath expression. The evaluation of successive location 
steps in the XPath expression start from that step's "context node".

The initial "context node" for the evaluation of the XPath expression is the same as 
the "current node" but after that as location steps are successively evaluated the 
"context node" changes at each step. Meanwhile the stylesheets "current node" stays 
fixed during this XPath evaluation.

I hope this is clear and will help anyone who wants to clean up the code.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XALANJ-1470?page=comments#action_53084

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANJ-1470

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANJ-1470
    Summary: Current Node and Context Node terminology
       Type: Bug

     Status: Unassigned
   Priority: Blocker

    Project: XalanJ2
 Components: 
             Documentation
   Versions:
             2.5Dx

   Assignee: 
   Reporter: Igor Hersht

    Created: Fri, 4 Apr 2003 6:15 PM
    Updated: Tue, 14 Sep 2004 8:06 AM
Environment: Operating System: All
Platform: Other

Description:
This is actually a suggestion.
In code and comments (a lot of files) we use incorrect terminology.
We use Current Node when we mean Context Node and vice versa. 
As an example (see below from  XPathContext).
1. "current context node" is wrong terminology
2.  getContextNode returns getCurrentNode()
 (getCurrentNode() is final).
/**
   * Get the current context node.
   * @return The current context node.
   */
  public final int getContextNode()
  {
    return this.getCurrentNode();
  }


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to