1 16 19 package org.apache.xalan.templates; 20 21 import org.apache.xpath.XPath; 22 23 35 public class ElemWhen extends ElemTemplateElement 36 { 37 38 43 private XPath m_test; 44 45 52 public void setTest(XPath v) 53 { 54 m_test = v; 55 } 56 57 64 public XPath getTest() 65 { 66 return m_test; 67 } 68 69 76 public int getXSLToken() 77 { 78 return Constants.ELEMNAME_WHEN; 79 } 80 81 87 public void compose(StylesheetRoot sroot) 88 throws javax.xml.transform.TransformerException 89 { 90 super.compose(sroot); 91 java.util.Vector vnames = sroot.getComposeState().getVariableNames(); 92 if(null != m_test) 93 m_test.fixupVariables(vnames, sroot.getComposeState().getGlobalsSize()); 94 } 95 96 101 public String getNodeName() 102 { 103 return Constants.ELEMNAME_WHEN_STRING; 104 } 105 106 110 public ElemWhen(){} 111 112 116 protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs) 117 { 118 if(callAttrs) 119 m_test.getExpression().callVisitors(m_test, visitor); 120 super.callChildVisitors(visitor, callAttrs); 121 } 122 123 } 124 | Popular Tags |