sboag       01/08/04 14:06:12

  Modified:    java/src/org/apache/xpath/objects XObject.java
  Log:
  In response to regression posted on xalan-dev by John Gentilin <[EMAIL 
PROTECTED]>
  on 08/03/2001 06:49 PM.  When the XNodeSet taks a DTMIterator, it
  will call val.getDTMManager();, which will call LocPathIterator#getDTMManager,
  which will call m_execContext..getDTMManager(), which means
  that setRoot has to be called on the iterator before it is added to
  XNodeSet.  Thus, call setRoot on the OneStepIterator in
  create(Object, XPathContext) before it is added to the XNodeSet.
  The regression was related to fix for 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925.
  
  Revision  Changes    Path
  1.16      +5 -3      xml-xalan/java/src/org/apache/xpath/objects/XObject.java
  
  Index: XObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XObject.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XObject.java      2001/08/03 02:43:17     1.15
  +++ XObject.java      2001/08/04 21:06:12     1.16
  @@ -250,6 +250,7 @@
           DTMAxisIterator iter = dtm.getAxisIterator(Axis.SELF);
           iter.setStartNode(dtmRoot);
           DTMIterator iterator = new OneStepIterator(iter);
  +        iterator.setRoot(dtmRoot, xctxt);
           result = new XNodeSet(iterator);
         }
         catch(Exception ex)
  @@ -262,9 +263,10 @@
         DTMAxisIterator iter = (DTMAxisIterator)val;
         try
         {
  -       DTMIterator iterator = new OneStepIterator(iter);
  -       result = new XNodeSet(iterator);
  -     }
  +        DTMIterator iterator = new OneStepIterator(iter);
  +        iterator.setRoot(iter.getStartNode(), xctxt);
  +        result = new XNodeSet(iterator);
  +      }
         catch(Exception ex)
         {
           throw new org.apache.xml.utils.WrappedRuntimeException(ex);
  
  
  

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

Reply via email to