code: protected boolean isParam(ExpressionNode expr)
    {
    	while(null != expr)
    	{
    		if(expr instanceof ElemTemplateElement)
    			break;
    		expr = expr.exprGetParent();
    	}
    	if(null != expr)
    	{
    		ElemTemplateElement ete = (ElemTemplateElement)expr;
    		while(null != ete)
    		{
    			int type = ete.getXSLToken();
    			switch(type)
    			{
    				case Constants.ELEMNAME_PARAMVARIABLE:
    					return true;
    				case Constants.ELEMNAME_TEMPLATE:
    				case Constants.ELEMNAME_STYLESHEET:
    					return false;
    			}
    			ete = ete.getParentElem();
    		}
    	}
    	return false;
    	
    }
docs: Tell if the expr param is contained within an xsl:param.