Package org.exist.xquery

Examples of org.exist.xquery.DescendantSelector


    @Test
    public void descendantSelector() throws XPathException, SAXException, PermissionDeniedException {
        Sequence seq = executeQuery(broker, "//SCENE", 72, null);
        NameTest test = new NameTest(Type.ELEMENT, new QName("SPEAKER", ""));
        NodeSelector selector = new DescendantSelector(seq.toNodeSet(), -1);
        NodeSet set = broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, seq.getDocumentSet(), test.getName(), selector);
       
        assertEquals(2639, set.getLength());
    }
View Full Code Here


        try {
            broker = pool.get(null);
            final MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(this);
            final NodeProxy p = new NodeProxy(this, root.getNodeId(), root.getInternalAddress());
            final NodeSelector selector = new DescendantSelector(p, Expression.NO_CONTEXT_ID);
            return broker.getStructuralIndex().findElementsByTagName(ElementValue.ELEMENT, docs, qname, selector, null);
        } catch (final Exception e) {
            LOG.warn("Exception while finding elements: " + e.getMessage(), e);
        } finally {
            pool.release(broker);
View Full Code Here

TOP

Related Classes of org.exist.xquery.DescendantSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.