elemvariablepsuedo.java

来自「java jdk 1.4的源码」· Java 代码 · 共 49 行

JAVA
49
字号
package org.apache.xalan.templates;import javax.xml.transform.TransformerException;import org.apache.xalan.transformer.TransformerImpl;import org.apache.xpath.XPath;public class ElemVariablePsuedo extends ElemVariable{  XUnresolvedVariableSimple m_lazyVar;	  /**   * Set the "select" attribute.   * If the variable-binding element has a select attribute,   * then the value of the attribute must be an expression and   * the value of the variable is the object that results from   * evaluating the expression. In this case, the content   * of the variable must be empty.   *   * @param v Value to set for the "select" attribute.   */  public void setSelect(XPath v)  {    super.setSelect(v);    m_lazyVar = new XUnresolvedVariableSimple(this);  }    /**   * Execute a variable declaration and push it onto the variable stack.   * @see <a href="http://www.w3.org/TR/xslt#variables">variables in XSLT Specification</a>   *   * @param transformer non-null reference to the the current transform-time state.   * @param sourceNode non-null reference to the <a href="http://www.w3.org/TR/xslt#dt-current-node">current source node</a>.   * @param mode reference, which may be null, to the <a href="http://www.w3.org/TR/xslt#modes">current mode</a>.   *   * @throws TransformerException   */  public void execute(TransformerImpl transformer) throws TransformerException  {    // if (TransformerImpl.S_DEBUG)    //  transformer.getTraceManager().fireTraceEvent(this);    // transformer.getXPathContext().getVarStack().pushVariable(m_qname, var);    transformer.getXPathContext().getVarStack().setLocalVariable(m_index, m_lazyVar);  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?