sboag       00/12/09 21:21:34

  Modified:    java/src/org/apache/xalan/templates FuncKey.java
  Log:
  Clone the key iterators before returning.   Have Myriam check that
  this is really what we want (I can't see how it isn't).  Fixes test idkey01.
  
  Revision  Changes    Path
  1.8       +16 -3     
xml-xalan/java/src/org/apache/xalan/templates/FuncKey.java
  
  Index: FuncKey.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/FuncKey.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FuncKey.java      2000/12/05 22:29:34     1.7
  +++ FuncKey.java      2000/12/10 05:21:34     1.8
  @@ -151,8 +151,14 @@
             kmgr.getNodeSetByKey(xctxt, docContext, keyname, ref,
                                  xctxt.getNamespaceContext());
   
  -        upi.addIterator(nl);
  -
  +        try
  +        {
  +          upi.addIterator((LocPathIterator)nl.clone());
  +        }
  +        catch(CloneNotSupportedException cnse)
  +        {
  +          // will never happen.
  +        }
           //mnodeset.addNodesInDocOrder(nl, xctxt); needed??
         }
   
  @@ -167,7 +173,14 @@
                                                   ref,
                                                   xctxt.getNamespaceContext());
   
  -      nodes = new XNodeSet(nl);
  +      try
  +      {
  +        nodes = new XNodeSet((LocPathIterator)nl.cloneWithReset());
  +      }
  +      catch(CloneNotSupportedException cnse)
  +      {
  +        // will never happen.
  +      }
       }
   
       return nodes;
  
  
  

Reply via email to