/** * * * @see org.w3c.dom.Node */ public final boolean hasChildNodes() { return (DTM.NULL != dtm.getFirstChild(node)); }
/** * * * @see org.w3c.dom.Node */ public final boolean hasChildNodes() { return (DTM.NULL != dtm.getFirstChild(node)); }
/** * Public constructor: Create a NodeList to support * DTMNodeProxy.getChildren(). * * Unfortunately AxisIterators and DTMIterators don't share an API, * so I can't use the existing Axis.CHILD iterator. Rather than * create Yet Another Class, let's set up a special case of this * one. * * @param parentDTM The DTM containing this node * @param parentHandle DTM node-handle integer * */ public DTMChildIterNodeList(DTM parentDTM,int parentHandle) { m_parentDTM=parentDTM; m_firstChild=parentDTM.getFirstChild(parentHandle); }
/** * Public constructor: Create a NodeList to support * DTMNodeProxy.getChildren(). * * Unfortunately AxisIterators and DTMIterators don't share an API, * so I can't use the existing Axis.CHILD iterator. Rather than * create Yet Another Class, let's set up a special case of this * one. * * @param parentDTM The DTM containing this node * @param parentHandle DTM node-handle integer * */ public DTMChildIterNodeList(DTM parentDTM,int parentHandle) { m_parentDTM=parentDTM; m_firstChild=parentDTM.getFirstChild(parentHandle); }
/** * * * @see org.w3c.dom.Node */ public final Node getFirstChild() { int newnode = dtm.getFirstChild(node); return (newnode == DTM.NULL) ? null : dtm.getNode(newnode); }
/** * * * @see org.w3c.dom.Node */ public final Node getFirstChild() { int newnode = dtm.getFirstChild(node); return (newnode == DTM.NULL) ? null : dtm.getNode(newnode); }
/** * Returns the next node in the set and advances the position of the * iterator in the set. After a NodeIterator is created, the first call * to nextNode() returns the first node in the set. * * @return The next <code>Node</code> in the set being iterated over, or * <code>null</code> if there are no more members in that set. */ public int nextNode() { if(m_foundLast) return DTM.NULL; int next; m_lastFetched = next = (DTM.NULL == m_lastFetched) ? m_cdtm.getFirstChild(m_context) : m_cdtm.getNextSibling(m_lastFetched); // m_lastFetched = next; if (DTM.NULL != next) { m_pos++; return next; } else { m_foundLast = true; return DTM.NULL; } }
/** * Returns the next node in the set and advances the position of the * iterator in the set. After a NodeIterator is created, the first call * to nextNode() returns the first node in the set. * * @return The next <code>Node</code> in the set being iterated over, or * <code>null</code> if there are no more members in that set. */ public int nextNode() { if(m_foundLast) return DTM.NULL; int next; m_lastFetched = next = (DTM.NULL == m_lastFetched) ? m_cdtm.getFirstChild(m_context) : m_cdtm.getNextSibling(m_lastFetched); // m_lastFetched = next; if (DTM.NULL != next) { m_pos++; return next; } else { m_foundLast = true; return DTM.NULL; } }
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. * <p>WARNING: Do not mutate this class from this function!</p> * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { int current = xctxt.getCurrentNode(); DTM dtm = xctxt.getDTM(current); return dtm.getFirstChild(current); }
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. * <p>WARNING: Do not mutate this class from this function!</p> * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { int current = xctxt.getCurrentNode(); DTM dtm = xctxt.getDTM(current); return dtm.getFirstChild(current); }
int nextNode = m_dtm.getFirstChild(pos); while (DTM.NULL == nextNode)
int nextNode = m_dtm.getFirstChild(pos); while (DTM.NULL == nextNode)
whereNode = dtm.getFirstChild(whereNode);
whereNode = dtm.getFirstChild(whereNode);
int nextNode = m_dtm.getFirstChild(pos); while (DTM.NULL == nextNode)
int nextNode = m_dtm.getFirstChild(pos); while (DTM.NULL == nextNode)
for(int kidhandle=dtm.getFirstChild(dochandle); kidhandle!=DTM.NULL; kidhandle=dtm.getNextSibling(kidhandle))
for(int kidhandle=dtm.getFirstChild(dochandle); kidhandle!=DTM.NULL; kidhandle=dtm.getNextSibling(kidhandle))
for (int n = dtm.getFirstChild(doc); DTM.NULL != n; n = dtm.getNextSibling(n))
for (int n = dtm.getFirstChild(doc); DTM.NULL != n; n = dtm.getNextSibling(n))