You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@apache.org on 2001/04/24 20:30:22 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/transformer TransformSnapshotImpl.java

mmidy       01/04/24 11:30:22

  Modified:    java/src/org/apache/xalan/transformer
                        TransformSnapshotImpl.java
  Log:
  Keep a copy of current contextNodeList is there is one
  
  Revision  Changes    Path
  1.4       +11 -1     xml-xalan/java/src/org/apache/xalan/transformer/TransformSnapshotImpl.java
  
  Index: TransformSnapshotImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformSnapshotImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransformSnapshotImpl.java	2001/04/10 18:49:36	1.3
  +++ TransformSnapshotImpl.java	2001/04/24 18:30:20	1.4
  @@ -2,6 +2,7 @@
   
   import org.apache.xpath.XPathContext;
   import org.apache.xpath.VariableStack;
  +import org.apache.xpath.axes.ContextNodeList;
   import org.apache.xml.utils.NodeVector;
   import org.apache.xml.utils.BoolStack;
   import java.util.Stack;
  @@ -30,9 +31,14 @@
     private NodeVector m_currentExpressionNodes;
   
     /**
  -   * The current context node list.
  +   * The current context node lists stack.
      */
     private Stack m_contextNodeLists;
  +	
  +	/**
  +   * The current context node list.
  +   */
  +  private ContextNodeList m_contextNodeList;
   
     /**
      * Stack of AxesIterators.
  @@ -117,6 +123,8 @@
         m_currentNodes = (NodeVector)xpc.getCurrentNodeStack().clone();
         m_currentExpressionNodes = (NodeVector)xpc.getCurrentExpressionNodeStack().clone();
         m_contextNodeLists = (Stack)xpc.getContextNodeListsStack().clone();
  +			if (!m_contextNodeLists.empty())
  +				m_contextNodeList = (ContextNodeList)xpc.getContextNodeList().clone();
         m_axesIteratorStack = (Stack)xpc.getAxesIteratorStackStacks().clone();
     
         m_currentTemplateRuleIsNull = (BoolStack)transformer.m_currentTemplateRuleIsNull.clone();
  @@ -163,6 +171,8 @@
         xpc.setCurrentNodeStack((NodeVector)m_currentNodes.clone());
         xpc.setCurrentExpressionNodeStack((NodeVector)m_currentExpressionNodes.clone());
         xpc.setContextNodeListsStack((Stack)m_contextNodeLists.clone());
  +			if (m_contextNodeList != null)
  +				xpc.pushContextNodeList((ContextNodeList)m_contextNodeList.clone());
         xpc.setAxesIteratorStackStacks((Stack)m_axesIteratorStack.clone());
     
         transformer.m_currentTemplateRuleIsNull = (BoolStack)m_currentTemplateRuleIsNull.clone();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org