Java Code Examples for com.sun.org.apache.xml.internal.dtm.DTMAxisIterator#reset()

The following examples show how to use com.sun.org.apache.xml.internal.dtm.DTMAxisIterator#reset() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiDOM.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 2
Source File: BasisLibrary.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 3
Source File: BasisLibrary.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 4
Source File: BasisLibrary.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 5
Source File: MultiDOM.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 6
Source File: BasisLibrary.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 7
Source File: MultiDOM.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 8
Source File: BasisLibrary.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 9
Source File: MultiDOM.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 10
Source File: BasisLibrary.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 11
Source File: MultiDOM.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 12
Source File: BasisLibrary.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 13
Source File: MultiDOM.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 14
Source File: BasisLibrary.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 15
Source File: MultiDOM.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 16
Source File: BasisLibrary.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 17
Source File: MultiDOM.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return null;
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 18
Source File: BasisLibrary.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}
 
Example 19
Source File: MultiDOM.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public NodeList makeNodeList(DTMAxisIterator iter) {
    int index = iter.next();
    if (index == DTM.NULL) {
        return new DTMAxisIterNodeList(null, null);
    }
    iter.reset();
    return _adapters[getDTMId(index)].makeNodeList(iter);
}
 
Example 20
Source File: BasisLibrary.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Utility function: node-set/node-set compare.
 */
public static boolean compare(DTMAxisIterator left, DTMAxisIterator right,
                              int op, DOM dom) {
    int lnode;
    left.reset();

    while ((lnode = left.next()) != DTMAxisIterator.END) {
        final String lvalue = dom.getStringValueX(lnode);

        int rnode;
        right.reset();
        while ((rnode = right.next()) != DTMAxisIterator.END) {
            // String value must be the same if both nodes are the same
            if (lnode == rnode) {
                if (op == Operators.EQ) {
                    return true;
                } else if (op == Operators.NE) {
                    continue;
                }
            }
            if (compareStrings(lvalue, dom.getStringValueX(rnode), op,
                               dom)) {
                return true;
            }
        }
    }
    return false;
}