question: protected void pushGlobalVars ( int contextNode ) throws TransformerException { XPathContext xctxt = m_xcontext ; VariableStack vs = xctxt . getVarStack ( ) ; StylesheetRoot sr = getStylesheet ( ) ; Vector vars = sr . getVariablesAndParamsComposed ( ) ; int i = vars . size ( ) ; vs . link ( i ) ; while ( -- i >= 0 ) { ElemVariable v = ( ElemVariable ) vars . elementAt ( i ) ; XObject xobj = new XUnresolvedVariable ( v , contextNode , this , vs . getStackFrame ( ) , 0 , true ) ; if ( null == vs . elementAt ( i ) ) vs . setGlobalVariable ( i , xobj ) ; } }
target:  Internal -- push the global variables from the Stylesheet onto the context's runtime variable stack. <p>If we encounter a variable that is already defined in the variable stack, we ignore it.  This is because the second variable definition will be at a lower import precedence.  Presumably, global"variables at the same import precedence with the same name will have been caught during the recompose process. <p>However, if we encounter a parameter that is already defined in the variable stack, we need to see if this is a parameter whose value was supplied by a setParameter call.  If so, we need to "receive" the one already in the stack, ignoring this one.  If it is just an earlier xsl:param or xsl:variable definition, we ignore it using the same reasoning as explained above for the variable.