/** * By the nature of the stateless traversal, the context node can not be * returned or the iteration will go into an infinate loop. To see if * the self node should be processed, use this function. If the context * node does not match the expanded type ID, this function will return * false. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(context) == expandedTypeID) ? context : NULL; }
/** * By the nature of the stateless traversal, the context node can not be * returned or the iteration will go into an infinate loop. To see if * the self node should be processed, use this function. If the context * node does not match the expanded type ID, this function will return * false. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(context) == expandedTypeID) ? context : NULL; }
/** * Return the root if it matches the expanded type ID, * else return null (nothing found) * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { int root=getDocumentRoot(context); return (getExpandedTypeID(root) == expandedTypeID) ? root : NULL; }
/** * Return the root if it matches the expanded type ID, * else return null (nothing found) * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { int root=getDocumentRoot(context); return (getExpandedTypeID(root) == expandedTypeID) ? root : NULL; }
/** * By the nature of the stateless traversal, the context node can not be * returned or the iteration will go into an infinate loop. To see if * the self node should be processed, use this function. If the context * node does not match the expanded type ID, this function will return * false. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(context) == expandedTypeID) ? context : next(context, context, expandedTypeID); } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { while (DTM.NULL != (current = getNextSibling(current))) { if (getExpandedTypeID(current) == expandedTypeID) return current; } return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { while (DTM.NULL != (current = getPreviousSibling(current))) { if (getExpandedTypeID(current) == expandedTypeID) return current; } return NULL; } }
/** * By the nature of the stateless traversal, the context node can not be * returned or the iteration will go into an infinate loop. To see if * the self node should be processed, use this function. If the context * node does not match the expanded type ID, this function will return * false. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(context) == expandedTypeID) ? context : next(context, context, expandedTypeID); } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { while (DTM.NULL != (current = getNextSibling(current))) { if (getExpandedTypeID(current) == expandedTypeID) return current; } return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { while (DTM.NULL != (current = getPreviousSibling(current))) { if (getExpandedTypeID(current) == expandedTypeID) return current; } return NULL; } }
/** * Return the root if it matches the expanded type ID. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(getDocumentRoot(context)) == expandedTypeID) ? context : next(context, context, expandedTypeID); }
/** * Return the root if it matches the expanded type ID. * * @param context The context node of this traversal. * @param expandedTypeID The expanded type ID that must match. * * @return the first node in the traversal. */ public int first(int context, int expandedTypeID) { return (getExpandedTypeID(getDocumentRoot(context)) == expandedTypeID) ? context : next(context, context, expandedTypeID); }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { current = (context == current) ? getFirstAttribute(context) : getNextAttribute(current); do { if (getExpandedTypeID(current) == expandedTypeID) return current; } while (DTM.NULL != (current = getNextAttribute(current))); return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { current = (context == current) ? getFirstNamespaceNode(context, false) : getNextNamespaceNode(context, current, false); do { if (getExpandedTypeID(current) == expandedTypeID) return current; } while (DTM.NULL != (current = getNextNamespaceNode(context, current, false))); return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { current = (context == current) ? getFirstNamespaceNode(context, true) : getNextNamespaceNode(context, current, true); do { if (getExpandedTypeID(current) == expandedTypeID) return current; } while (DTM.NULL != (current = getNextNamespaceNode(context, current, true))); return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { current = (context == current) ? getFirstAttribute(context) : getNextAttribute(current); do { if (getExpandedTypeID(current) == expandedTypeID) return current; } while (DTM.NULL != (current = getNextAttribute(current))); return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { current = (context == current) ? getFirstNamespaceNode(context, false) : getNextNamespaceNode(context, current, false); do { if (getExpandedTypeID(current) == expandedTypeID) return current; } while (DTM.NULL != (current = getNextNamespaceNode(context, current, false))); return NULL; } }
/** * Traverse to the next node after the current node that is matched * by the expanded type ID. * * @param context The context node of this iteration. * @param current The current node of the iteration. * @param expandedTypeID The expanded type ID that must match. * * @return the next node in the iteration, or DTM.NULL. */ public int next(int context, int current, int expandedTypeID) { current = (context == current) ? getFirstNamespaceNode(context, true) : getNextNamespaceNode(context, current, true); do { if (getExpandedTypeID(current) == expandedTypeID) return current; } while (DTM.NULL != (current = getNextNamespaceNode(context, current, true))); return NULL; } }
if (getExpandedTypeID(first) == expandedTypeID) return first; else else if (getExpandedTypeID(first) == expandedTypeID) return first; else
if (getExpandedTypeID(first) == expandedTypeID) return first; else else if (getExpandedTypeID(first) == expandedTypeID) return first; else