/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }
/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }
/** * Returns the <code>index</code>th item in the collection. If * <code>index</code> is greater than or equal to the number of nodes in * the list, this returns <code>null</code>. * @param index Index into the collection. * @return The node at the <code>index</code>th position in the * <code>NodeList</code>, or <code>null</code> if that is not a valid * index. */ public Node item(int index) { if (m_iter != null) { int handle=m_iter.item(index); if (handle == DTM.NULL) { return null; } return m_iter.getDTM(handle).getNode(handle); } else { return null; } }
/** * Returns the <code>index</code>th item in the collection. If * <code>index</code> is greater than or equal to the number of nodes in * the list, this returns <code>null</code>. * @param index Index into the collection. * @return The node at the <code>index</code>th position in the * <code>NodeList</code>, or <code>null</code> if that is not a valid * index. */ public Node item(int index) { if (m_iter != null) { int handle=m_iter.item(index); if (handle == DTM.NULL) { return null; } return m_iter.getDTM(handle).getNode(handle); } else { return null; } }
/** @return the next node in the set and advance the position of the * iterator in the set. * * @throws DOMException - INVALID_STATE_ERR Raised if this method is * called after the detach method was invoked. * */ public Node nextNode() throws DOMException { if(!valid) throw new DTMDOMException(DOMException.INVALID_STATE_ERR); int handle=dtm_iter.nextNode(); if (handle==DTM.NULL) return null; return dtm_iter.getDTM(handle).getNode(handle); }
/** @return the next previous in the set and advance the position of the * iterator in the set. * * @throws DOMException - INVALID_STATE_ERR Raised if this method is * called after the detach method was invoked. * */ public Node previousNode() { if(!valid) throw new DTMDOMException(DOMException.INVALID_STATE_ERR); int handle=dtm_iter.previousNode(); if (handle==DTM.NULL) return null; return dtm_iter.getDTM(handle).getNode(handle); } }
/** @return the next node in the set and advance the position of the * iterator in the set. * * @throws DOMException - INVALID_STATE_ERR Raised if this method is * called after the detach method was invoked. * */ public Node nextNode() throws DOMException { if(!valid) throw new DTMDOMException(DOMException.INVALID_STATE_ERR); int handle=dtm_iter.nextNode(); if (handle==DTM.NULL) return null; return dtm_iter.getDTM(handle).getNode(handle); }
/** @return the next previous in the set and advance the position of the * iterator in the set. * * @throws DOMException - INVALID_STATE_ERR Raised if this method is * called after the detach method was invoked. * */ public Node previousNode() { if(!valid) throw new DTMDOMException(DOMException.INVALID_STATE_ERR); int handle=dtm_iter.previousNode(); if (handle==DTM.NULL) return null; return dtm_iter.getDTM(handle).getNode(handle); } }
DTM dtm = iter.getDTM(xNS.nextNode()); return (SQLDocument)dtm;
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator nodes = m_arg0.asIterator(xctxt, xctxt.getCurrentNode()); double sum = 0.0; int pos; while (DTM.NULL != (pos = nodes.nextNode())) { DTM dtm = nodes.getDTM(pos); XMLString s = dtm.getStringValue(pos); if (null != s) sum += s.toDouble(); } nodes.detach(); return new XNumber(sum); } }
/** * Execute the function. The function must return * a valid object. * @param xctxt The current execution context. * @return A valid XObject. * * @throws javax.xml.transform.TransformerException */ public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator nodes = m_arg0.asIterator(xctxt, xctxt.getCurrentNode()); double sum = 0.0; int pos; while (DTM.NULL != (pos = nodes.nextNode())) { DTM dtm = nodes.getDTM(pos); XMLString s = dtm.getStringValue(pos); if (null != s) sum += s.toDouble(); } nodes.detach(); return new XNumber(sum); } }
DTM dtm = iter.getDTM(rootHandle); return dtm.getNode(dtm.getFirstChild(rootHandle)); DTM dtm = iter.getDTM(rootHandle); Node child = dtm.getNode(dtm.getFirstChild(rootHandle)); int handle = ni.nextNode(); if (handle != DTM.NULL) return ni.getDTM(handle).getNode(handle); // may be null. else return null; DTM dtm = iter.getDTM(childHandle); Node child = dtm.getNode(childHandle); if(javaClass.isAssignableFrom(child.getClass()))
DTM ndtm = ni.getDTM(pos); String refval = ndtm.getStringValue(pos).toString();
DTM dtm = nl.getDTM(pos); int top = pos;
DTM ndtm = ni.getDTM(pos); String refval = ndtm.getStringValue(pos).toString();
/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }
/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }
/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }
/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }
/** @return The root node of the NodeIterator, as specified * when it was created. * */ public Node getRoot() { int handle=dtm_iter.getRoot(); return dtm_iter.getDTM(handle).getNode(handle); }