protected void changeToVarRef(QName varName,ExpressionOwner owner,Vector paths,ElemTemplateElement psuedoVarRecipient){
  Variable varRef=(paths == m_absPaths) ? new VariableSafeAbsRef() : new Variable();
  varRef.setQName(varName);
  if (paths == m_absPaths) {
    StylesheetRoot root=(StylesheetRoot)psuedoVarRecipient;
    Vector globalVars=root.getVariablesAndParamsComposed();
    varRef.setIndex(globalVars.size() - 1);
    varRef.setIsGlobal(true);
  }
  owner.setExpression(varRef);
}

protected void changeToVarRef ( QName varName , ExpressionOwner owner , Vector paths , ElemTemplateElement psuedoVarRecipient ) { Variable varRef = ( paths == m_absPaths ) ? new VariableSafeAbsRef ( ) : new Variable ( ) ; varRef . setQName ( varName ) ; if ( paths == m_absPaths ) { StylesheetRoot root = ( StylesheetRoot ) psuedoVarRecipient ; Vector globalVars = root . getVariablesAndParamsComposed ( ) ; varRef . setIndex ( globalVars . size ( ) - 1 ) ; varRef . setIsGlobal ( true ) ; } owner . setExpression ( varRef ) ; }
change the expression owned by the owner argument to a variable reference of the given name . warning : for global vars , this function relies on the variable declaration to which it refers having been added just prior to this function being called , so that the reference index can be determined from the size of the global variables list minus one .
