jkesselm    02/05/14 08:57:03

  Modified:    java/src/org/apache/xpath/objects XNodeSetForDOM.java
  Log:
  m_last was not being set correctly. See comments.
  
  Revision  Changes    Path
  1.3       +16 -2     xml-xalan/java/src/org/apache/xpath/objects/XNodeSetForDOM.java
  
  Index: XNodeSetForDOM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XNodeSetForDOM.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XNodeSetForDOM.java       22 Mar 2002 01:04:44 -0000      1.2
  +++ XNodeSetForDOM.java       14 May 2002 15:57:03 -0000      1.3
  @@ -41,14 +41,28 @@
     {
       m_dtmMgr = xctxt.getDTMManager();
       m_origObj = nodeList;
  -    m_obj = new org.apache.xpath.NodeSetDTM(nodeList, xctxt);
  +
  +    // JKESS 20020514: Longer-term solution is to force
  +    // folks to request length through an accessor, so we can defer this
  +    // retrieval... but that requires an API change.
  +    // m_obj=new org.apache.xpath.NodeSetDTM(nodeList, xctxt);
  +    org.apache.xpath.NodeSetDTM nsdtm=new org.apache.xpath.NodeSetDTM(nodeList, 
xctxt);
  +    m_last=nsdtm.getLength();
  +    m_obj = nsdtm;   
     }
   
     public XNodeSetForDOM(NodeIterator nodeIter, XPathContext xctxt)
     {
       m_dtmMgr = xctxt.getDTMManager();
       m_origObj = nodeIter;
  -    m_obj = new org.apache.xpath.NodeSetDTM(nodeIter, xctxt);
  +
  +    // JKESS 20020514: Longer-term solution is to force
  +    // folks to request length through an accessor, so we can defer this
  +    // retrieval... but that requires an API change.
  +    // m_obj = new org.apache.xpath.NodeSetDTM(nodeIter, xctxt);
  +    org.apache.xpath.NodeSetDTM nsdtm=new org.apache.xpath.NodeSetDTM(nodeIter, 
xctxt);
  +    m_last=nsdtm.getLength();
  +    m_obj = nsdtm;   
     }
     
     /**
  
  
  

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

Reply via email to