You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2002/06/08 22:34:21 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath XPathContext.java

sboag       2002/06/08 13:34:21

  Modified:    java/src/org/apache/xpath XPathContext.java
  Log:
  Add resets for m_contextNodeLists, etc.  It might be possible that these are
  redundent with the same thing being done somewhere else, but given
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6021 I suspect
  that this really does need to be done here.  It would explain any problems
  that might have been reported after an exception has been thrown, and
  the Transformer is being reused.
  
  Revision  Changes    Path
  1.39      +22 -2     xml-xalan/java/src/org/apache/xpath/XPathContext.java
  
  Index: XPathContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathContext.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- XPathContext.java	9 May 2002 21:19:40 -0000	1.38
  +++ XPathContext.java	8 Jun 2002 20:34:21 -0000	1.39
  @@ -114,7 +114,7 @@
   
   import org.apache.xpath.axes.DescendantIterator;
   
  -// For RTF handling.
  +// For  handling.
   import org.apache.xml.dtm.ref.sax2dtm.SAX2RTFDTM;
   
   /**
  @@ -387,6 +387,26 @@
     	
       m_dtmManager = DTMManager.newInstance(
                      org.apache.xpath.objects.XMLStringFactoryImpl.getFactory());
  +                   
  +    m_saxLocations = new SourceLocator[RECURSIONLIMIT];
  +	m_saxLocationsTop = 0;
  +    
  +	m_axesIteratorStack = new Stack();
  +	m_contextNodeLists = new Stack();
  +	m_currentExpressionNodes = new int[RECURSIONLIMIT];
  +	m_currentExpressionNodesFirstFree = 0;
  +	m_currentNodes = new int[RECURSIONLIMIT];
  +	m_currentNodesFirstFree = 0;
  +	m_iteratorRoots = new NodeVector();
  +	m_predicatePos = new IntStack();
  +	m_predicateRoots = new NodeVector();
  +	m_prefixResolvers = new PrefixResolver[RECURSIONLIMIT];
  +	int m_prefixResolversTop = 0;
  +	
  +	m_prefixResolvers[m_prefixResolversTop++] = null;
  +    m_currentNodes[m_currentNodesFirstFree++] = DTM.NULL;
  +    m_currentNodes[m_currentExpressionNodesFirstFree++] = DTM.NULL;
  +    m_saxLocations[m_saxLocationsTop++] = null;
     }
   
     /** The current stylesheet locator. */
  @@ -883,13 +903,13 @@
     /** A stack of the current sub-expression nodes.  */
     private NodeVector m_iteratorRoots = new NodeVector();
   
  -  
     /** A stack of the current sub-expression nodes.  */
     private NodeVector m_predicateRoots = new NodeVector();
   
     /** A stack of the current sub-expression nodes.  */
     private int m_currentExpressionNodes[] = new int[RECURSIONLIMIT];
     protected int m_currentExpressionNodesFirstFree = 0;
  +  
        
     public int[] getCurrentExpressionNodeStack() { return m_currentExpressionNodes; }
     public void setCurrentExpressionNodeStack(int[] nv) { m_currentExpressionNodes = nv; }
  
  
  

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