/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Set a parameter for the templates. * * @param name The name of the parameter. * @param namespace The namespace of the parameter. * @param value The value object. This can be any valid Java object * -- it's up to the processor to provide the proper * coersion to the object, or simply pass it on for use * in extensions. */ public void setParameter(String name, String namespace, Object value) { VariableStack varstack = getXPathContext().getVarStack(); QName qname = new QName(namespace, name); XObject xobject = XObject.create(value, getXPathContext()); StylesheetRoot sroot = m_stylesheetRoot; Vector vars = sroot.getVariablesAndParamsComposed(); int i = vars.size(); while (--i >= 0) { ElemVariable variable = (ElemVariable)vars.elementAt(i); if(variable.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE && variable.getName().equals(qname)) { varstack.setGlobalVariable(i, xobject); } } }
/** * Set a parameter for the templates. * * @param name The name of the parameter. * @param namespace The namespace of the parameter. * @param value The value object. This can be any valid Java object * -- it's up to the processor to provide the proper * coersion to the object, or simply pass it on for use * in extensions. */ public void setParameter(String name, String namespace, Object value) { VariableStack varstack = getXPathContext().getVarStack(); QName qname = new QName(namespace, name); XObject xobject = XObject.create(value, getXPathContext()); StylesheetRoot sroot = m_stylesheetRoot; Vector vars = sroot.getVariablesAndParamsComposed(); int i = vars.size(); while (--i >= 0) { ElemVariable variable = (ElemVariable)vars.elementAt(i); if(variable.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE && variable.getName().equals(qname)) { varstack.setGlobalVariable(i, xobject); } } }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:variable" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname Qualified name of the xsl:variable to get * * @return reference to the variable named by qname, or null if not found. */ public ElemVariable getVariable(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_VARIABLE) && (var.getName().equals(qname))) return var; } } return null; }
/** * Get an "xsl:param" property. * @see <a href="http://www.w3.org/TR/xslt#top-level-variables">top-level-variables in XSLT Specification</a> * * @param qname non-null reference to qualified name of the parameter. * * @return ElemParam with the given name in the list or null */ public ElemParam getParam(QName qname) { if (null != m_topLevelVariables) { int n = getVariableOrParamCount(); for (int i = 0; i < n; i++) { ElemVariable var = getVariableOrParam(i); if((var.getXSLToken() == Constants.ELEMNAME_PARAMVARIABLE) && (var.getName().equals(qname))) return (ElemParam)var; } } return null; }