/** * 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; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * 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; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * Assert that the expression is a LocPathIterator, and, if * not, try to give some diagnostic info. */ private final void assertIsLocPathIterator(Expression expr1, ExpressionOwner eo) throws RuntimeException { if(!(expr1 instanceof LocPathIterator)) { String errMsg; if(expr1 instanceof Variable) { errMsg = "Programmer's assertion: expr1 not an iterator: "+ ((Variable)expr1).getQName(); } else { errMsg = "Programmer's assertion: expr1 not an iterator: "+ expr1.getClass().getName(); } throw new RuntimeException(errMsg + ", "+ eo.getClass().getName()+" "+ expr1.exprGetParent()); } }
/** * Assert that the expression is a LocPathIterator, and, if * not, try to give some diagnostic info. */ private final void assertIsLocPathIterator(Expression expr1, ExpressionOwner eo) throws RuntimeException { if(!(expr1 instanceof LocPathIterator)) { String errMsg; if(expr1 instanceof Variable) { errMsg = "Programmer's assertion: expr1 not an iterator: "+ ((Variable)expr1).getQName(); } else { errMsg = "Programmer's assertion: expr1 not an iterator: "+ expr1.getClass().getName(); } throw new RuntimeException(errMsg + ", "+ eo.getClass().getName()+" "+ expr1.exprGetParent()); } }
/** * From an XPath expression component, get the ElemTemplateElement * owner. * * @param expr Should be static expression with proper parentage. * @return Valid ElemTemplateElement, or throw a runtime exception * if it is not found. */ protected ElemTemplateElement getElemFromExpression(Expression expr) { ExpressionNode parent = expr.exprGetParent(); while(null != parent) { if(parent instanceof ElemTemplateElement) return (ElemTemplateElement)parent; parent = parent.exprGetParent(); } throw new RuntimeException(XSLMessages.createMessage(XSLTErrorResources.ER_ASSERT_NO_TEMPLATE_PARENT, null)); // "Programmer's error! expr has no ElemTemplateElement parent!"); }
/** * From an XPath expression component, get the ElemTemplateElement * owner. * * @param expr Should be static expression with proper parentage. * @return Valid ElemTemplateElement, or throw a runtime exception * if it is not found. */ protected ElemTemplateElement getElemFromExpression(Expression expr) { ExpressionNode parent = expr.exprGetParent(); while(null != parent) { if(parent instanceof ElemTemplateElement) return (ElemTemplateElement)parent; parent = parent.exprGetParent(); } throw new RuntimeException(XSLMessages.createMessage(XSLTErrorResources.ER_ASSERT_NO_TEMPLATE_PARENT, null)); // "Programmer's error! expr has no ElemTemplateElement parent!"); }
/** * 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; }
/** * 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; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * 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; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * 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; }
/** * 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; }
/** * Set the raw expression object for this object. * * * @param exp the raw Expression object, which should not normally be null. */ public void setExpression(Expression exp) { if(null != m_mainExp) exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus m_mainExp = exp; }
/** * 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; }
/** * 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; }