Package org.apache.commons.jxpath.ri.axes

Examples of org.apache.commons.jxpath.ri.axes.NodeSetContext


        if (function == null) {
            throw new JXPathFunctionNotFoundException("No such function: "
                    + functionName + Arrays.asList(parameters));
        }
        Object result = function.invoke(context, parameters);
        return result instanceof NodeSet ? new NodeSetContext(context,
                (NodeSet) result) : result;
    }
View Full Code Here


            ec = (EvalContext) value;
            if (ec.hasNext()) {
                value = ((NodePointer) ec.next()).getValue();
            }
            else { // empty context -> empty results
                return new NodeSetContext(context, new BasicNodeSet());
            }
        }
        JXPathContext jxpathContext = context.getJXPathContext();
        NodeSet nodeSet = jxpathContext.getNodeSetByKey(key, value);
        if (ec != null && ec.hasNext()) {
            BasicNodeSet accum = new BasicNodeSet();
            accum.add(nodeSet);
            while (ec.hasNext()) {
                value = ((NodePointer) ec.next()).getValue();
                accum.add(jxpathContext.getNodeSetByKey(key, value));
            }
            nodeSet = accum;
        }
        return new NodeSetContext(context, nodeSet);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jxpath.ri.axes.NodeSetContext

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.