/** * Tell if this expression or it's subexpressions can traverse outside * the current subtree. * * @return true if traversal outside the context node's subtree can occur. */ public boolean canTraverseOutsideSubtree() { return m_xpath.getExpression().canTraverseOutsideSubtree(); }
/** * Get an object that will be used to resolve URIs used in * document(), etc. * * @return An object that implements the URIResolver interface, * or null. */ public URIResolver getURIResolver() { return m_xcontext.getSourceTreeManager().getURIResolver(); }
/** * @see XSLTVisitable#callVisitors(XSLTVisitor) */ public void callVisitors(XSLTVisitor visitor) { m_xpath.getExpression().callVisitors(m_xpath, visitor); } }
private final void initDTM(int root, XPathContext xctxt){ m_dtmRoot = root; final DTM dtm = xctxt.getDTM(root); if(dtm != null){ m_DTMXRTreeFrag = xctxt.getDTMXRTreeFrag(xctxt.getDTMIdentity(dtm)); } }
/** * Reset the parameters to a null list. */ public void clearParameters() { synchronized (m_reentryGuard) { VariableStack varstack = new VariableStack(); m_xcontext.setVarStack(varstack); m_userParams = null; } }
/** * Get the first non-Expression parent of this node. * @return null or first ancestor that is not an Expression. */ public ExpressionNode getExpressionOwner() { ExpressionNode parent = exprGetParent(); while((null != parent) && (parent instanceof Expression)) parent = parent.exprGetParent(); return parent; }
/** * @see org.apache.xpath.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor) */ public void callVisitors(ExpressionOwner owner, XPathVisitor visitor) { if(visitor.visitUnaryOperation(owner, this)) { m_right.callVisitors(this, visitor); } }
/** * Set an object that will be used to resolve URIs used in * document(), etc. * @param resolver An object that implements the URIResolver interface, * or null. */ public void setURIResolver(URIResolver resolver) { synchronized (m_reentryGuard) { m_xcontext.getSourceTreeManager().setURIResolver(resolver); } }
public DTMXRTreeFrag(int dtmIdentity, XPathContext xctxt){ m_xctxt = xctxt; m_dtmIdentity = dtmIdentity; m_dtm = xctxt.getDTM(dtmIdentity); }
/** * This method retrieves the current context node * in the source tree. * * @return The current context node (should never be null?). */ public int getCurrentNode() { return m_xcontext.getCurrentNode(); }
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(FilterExprWalker.this); m_expr = exp; } }
/** * Get an instance of the DTMManager. Since a node * iterator may be passed without a DTMManager, this allows the * caller to easily get the DTMManager using just the iterator. * * @return a non-null DTMManager reference. */ public DTMManager getDTMManager() { return m_execContext.getDTMManager(); }
/** * Get the AVT part as the original string. * * @return the AVT part as the original string. */ public String getSimpleString() { return "{" + m_xpath.getPatternString() + "}"; }
/** * Create a NodeSet, and copy the members of the * given NodeIterator into it. * * @param ni Iterator which yields Nodes to be made members of the new set. */ public NodeSet(NodeIterator ni) { this(32); addNodes(ni); }
/** * Tell if this expression or it's subexpressions can traverse outside * the current subtree. * * @return true if traversal outside the context node's subtree can occur. */ public boolean canTraverseOutsideSubtree() { return m_xpath.getExpression().canTraverseOutsideSubtree(); }
/** * @see XSLTVisitable#callVisitors(XSLTVisitor) */ public void callVisitors(XSLTVisitor visitor) { m_xpath.getExpression().callVisitors(m_xpath, visitor); } }
/** * Reset the parameters to a null list. */ public void clearParameters() { synchronized (m_reentryGuard) { VariableStack varstack = new VariableStack(); m_xcontext.setVarStack(varstack); m_userParams = null; } }
/** * Get an object that will be used to resolve URIs used in * document(), etc. * * @return An object that implements the URIResolver interface, * or null. */ public URIResolver getURIResolver() { return m_xcontext.getSourceTreeManager().getURIResolver(); }
/** * Get the first non-Expression parent of this node. * @return null or first ancestor that is not an Expression. */ public ExpressionNode getExpressionOwner() { ExpressionNode parent = exprGetParent(); while((null != parent) && (parent instanceof Expression)) parent = parent.exprGetParent(); return parent; }
/** * @see org.apache.xpath.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor) */ public void callVisitors(ExpressionOwner owner, XPathVisitor visitor) { if(visitor.visitUnaryOperation(owner, this)) { m_right.callVisitors(this, visitor); } }