public int asNode ( XPathContext xctxt ) throws javax . xml . transform . TransformerException { DTMIterator iter = ( DTMIterator ) m_clones . getInstance ( ) ; int current = xctxt . getCurrentNode ( ) ; iter . setRoot ( current , xctxt ) ; int next = iter . nextNode ( ) ; // m_clones.freeInstance(iter); iter . detach ( ) ; return next ; }
Return the first node out of the nodeset if this expression is a nodeset expression . This is the default implementation for nodesets . Derived classes should try and override this and return a value without having to do a clone operation .