Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary#stringF()

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary#stringF() . 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: KeyIndex.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 2
Source File: KeyIndex.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 3
Source File: KeyIndex.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 4
Source File: KeyIndex.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 5
Source File: KeyIndex.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 6
Source File: KeyIndex.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 7
Source File: KeyIndex.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 8
Source File: KeyIndex.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 9
Source File: KeyIndex.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 10
Source File: KeyIndex.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}
 
Example 11
Source File: KeyIndex.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Evaluate the reference to the <code>key</code> or <code>id</code>
 * function with the context specified by {@link #setStartNode(int)}
 * and set up this iterator to iterate over the DTM nodes that are
 * to be returned.
 */
protected void init() {
    super.init();
    _position = 0;

    // All nodes retrieved are in the same document
    int rootHandle = _dom.getAxisIterator(Axis.ROOT)
                              .setStartNode(_startNode).next();

    // Is the argument not a node set?
    if (_keyValueIterator == null) {
        // Look up nodes returned for the single string argument
        _nodes = lookupNodes(rootHandle, _keyValue);

        if (_nodes == null) {
            _nodes = EMPTY_NODES;
        }
    } else {
        DTMAxisIterator keyValues = _keyValueIterator.reset();
        int retrievedKeyValueIdx = 0;
        boolean foundNodes = false;

        _nodes = null;

        // For each node in the node set argument, get the string value
        // and look up the nodes returned by key or id for that string
        // value.  If at most one string value has nodes associated,
        // the nodes will be stored in _nodes; otherwise, the nodes
        // will be placed in a heap.
        for (int keyValueNode = keyValues.next();
             keyValueNode != DTMAxisIterator.END;
             keyValueNode = keyValues.next()) {

            String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

            IntegerArray nodes = lookupNodes(rootHandle, keyValue);

            if (nodes != null) {
                if (!foundNodes) {
                    _nodes = nodes;
                    foundNodes = true;
                } else {
                    if (_nodes != null) {
                        addHeapNode(new KeyIndexHeapNode(_nodes));
                        _nodes = null;
                    }
                    addHeapNode(new KeyIndexHeapNode(nodes));
                }
            }
        }

        if (!foundNodes) {
            _nodes = EMPTY_NODES;
        }
    }
}