Examples of iteratePointers()


Examples of net.sf.jpluck.xml.ContextAdapter.iteratePointers()

        for (Iterator it = resolveIteratePointers("transform"); it.hasNext();) {
            Pointer p = (Pointer) it.next();
            Element transformElement = (Element) p.getNode();
            ContextAdapter transformContext = new ContextAdapter(transformElement);
            List xslList = new ArrayList();
            for (Iterator it2 = transformContext.iteratePointers("xslt"); it2.hasNext();) {
                Pointer p2 = (Pointer) it2.next();
                Element xslElement = (Element) p2.getNode();
                Source source;
                String href = xslElement.getAttribute("href");
                if (href.length() > 0) {
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                try {
                    if (nodeset == null) {
                        iter = NULL_ITER;
                    } else {
                        iter =
                            nodeset.iteratePointers(jxpathContext);
                    }
                } catch (Exception exc) {
                    throw new SAXParseException(exc.getMessage(),
                                                ev.location,
                                                exc);
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                try {
                    if (nodeset == null) {
                        iter = NULL_ITER;
                    } else {
                        iter =
                            nodeset.iteratePointers(jxpathContext);
                    }
                } catch (Exception exc) {
                    throw new SAXParseException(exc.getMessage(),
                                                ev.location,
                                                exc);
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                consumer.startElement(startElement.namespaceURI,
                                      startElement.localName,
                                      startElement.raw,
                                      startElement.attributes);
                if (ref != null) {
                    Iterator iter = ref.iteratePointers(jxpathContext);
                    while (iter.hasNext()) {
                        Pointer ptr = (Pointer)iter.next();
                        AttributesImpl attrs = new AttributesImpl();
                        attrs.addAttribute(NS, REF, REF, "CDATA",
                                           ptr.asPath());
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                CompiledExpression e = (CompiledExpression)compiled;
                boolean oldLenient = jxpathContext.isLenient();
                if (lenient != null) jxpathContext.setLenient(lenient.booleanValue());
                try {
                    Iterator iter =
                        e.iteratePointers(jxpathContext);
                    if (!iter.hasNext()) {
                        return null;
                    }
                    Pointer first = (Pointer)iter.next();
                    if (!iter.hasNext()) {
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                                                              expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            if (val instanceof NativeArray) {
                                iter = new JSIntrospector.NativeArrayIterator((NativeArray)val);
                            } else {
                                iter = compiledExpression.iteratePointers(jxpathContext);
                            }
                        } else if (expr.compiledExpression instanceof org.apache.commons.jexl.Expression) {
                            org.apache.commons.jexl.Expression e =
                                (org.apache.commons.jexl.Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

            if (compiled instanceof CompiledExpression) {
                CompiledExpression e = (CompiledExpression)compiled;
                boolean oldLenient = jxpathContext.isLenient();
                if (lenient != null) jxpathContext.setLenient(lenient.booleanValue());
                try {
                    Iterator iter = e.iteratePointers(jxpathContext);
                    if (iter.hasNext()) {
                        Pointer first = (Pointer)iter.next();
                        if (iter.hasNext()) {
                            List result = new LinkedList();
                            result.add(first.getNode());
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                            CompiledExpression compiledExpression = (CompiledExpression)expr.compiledExpression;
                            Object val =
                                compiledExpression.getPointer(jxpathContext, expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            iter = val instanceof NativeArray ? new JSIntrospector.NativeArrayIterator((NativeArray)val) :
                                        compiledExpression.iteratePointers(jxpathContext);
                        } else if (expr.compiledExpression instanceof Expression) {
                            Expression e = (Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
                            if (result != null) {
                                iter = Introspector.getUberspect().getIterator(result,
View Full Code Here

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()

                                                              expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            if (val instanceof NativeArray) {
                                iter = new JSIntrospector.NativeArrayIterator((NativeArray)val);
                            } else {
                                iter = compiledExpression.iteratePointers(jxpathContext);
                            }
                        } else if (expr.compiledExpression instanceof org.apache.commons.jexl.Expression) {
                            org.apache.commons.jexl.Expression e =
                                (org.apache.commons.jexl.Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
View Full Code Here

Examples of org.apache.commons.jxpath.JXPathContext.iteratePointers()

        Map map = new HashMap();
        map.put("foo", new String[] { "a", "b", "c" });

        JXPathContext context = JXPathContext.newContext(map);

        Iterator it = context.iteratePointers("foo");
        List actual = new ArrayList();
        while (it.hasNext()) {
            Pointer ptr = (Pointer) it.next();
            actual.add(context.getValue(ptr.asPath()));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.