Java Code Examples for com.sun.org.apache.xpath.internal.Expression#execute()
The following examples show how to use
com.sun.org.apache.xpath.internal.Expression#execute() .
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: FilterExprIteratorSimple.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 2
Source File: FilterExprIteratorSimple.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 3
Source File: FilterExprIteratorSimple.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 4
Source File: FilterExprIteratorSimple.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 5
Source File: FilterExprIteratorSimple.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 6
Source File: FilterExprIteratorSimple.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 7
Source File: FilterExprIteratorSimple.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 8
Source File: FilterExprIteratorSimple.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 9
Source File: FilterExprIteratorSimple.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 10
Source File: FilterExprIteratorSimple.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }
Example 11
Source File: FilterExprIteratorSimple.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Execute the expression. Meant for reuse by other FilterExpr iterators * that are not derived from this object. */ public static XNodeSet executeFilterExpr(int context, XPathContext xctxt, PrefixResolver prefixResolver, boolean isTopLevel, int stackFrame, Expression expr ) throws com.sun.org.apache.xml.internal.utils.WrappedRuntimeException { PrefixResolver savedResolver = xctxt.getNamespaceContext(); XNodeSet result = null; try { xctxt.pushCurrentNode(context); xctxt.setNamespaceContext(prefixResolver); // The setRoot operation can take place with a reset operation, // and so we may not be in the context of LocPathIterator#nextNode, // so we have to set up the variable context, execute the expression, // and then restore the variable context. if (isTopLevel) { // System.out.println("calling m_expr.execute(getXPathContext())"); VariableStack vars = xctxt.getVarStack(); // These three statements need to be combined into one operation. int savedStart = vars.getStackFrame(); vars.setStackFrame(stackFrame); result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); result.setShouldCacheNodes(true); // These two statements need to be combined into one operation. vars.setStackFrame(savedStart); } else result = (com.sun.org.apache.xpath.internal.objects.XNodeSet) expr.execute(xctxt); } catch (javax.xml.transform.TransformerException se) { // TODO: Fix... throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(se); } finally { xctxt.popCurrentNode(); xctxt.setNamespaceContext(savedResolver); } return result; }