1 16 19 package org.apache.xalan.templates; 20 21 import javax.xml.transform.TransformerException ; 22 23 import org.apache.xalan.transformer.TransformerImpl; 24 25 34 public class ElemFallback extends ElemTemplateElement 35 { 36 37 43 public int getXSLToken() 44 { 45 return Constants.ELEMNAME_FALLBACK; 46 } 47 48 53 public String getNodeName() 54 { 55 return Constants.ELEMNAME_FALLBACK_STRING; 56 } 57 58 69 public void execute( 70 TransformerImpl transformer) 71 throws TransformerException 72 { 73 } 74 75 90 public void executeFallback( 91 TransformerImpl transformer) 92 throws TransformerException 93 { 94 95 int parentElemType = m_parentNode.getXSLToken(); 96 if (Constants.ELEMNAME_EXTENSIONCALL == parentElemType 97 || Constants.ELEMNAME_UNDEFINED == parentElemType) 98 { 99 100 if (TransformerImpl.S_DEBUG) 101 transformer.getTraceManager().fireTraceEvent(this); 102 103 transformer.executeChildTemplates(this, true); 104 105 if (TransformerImpl.S_DEBUG) 106 transformer.getTraceManager().fireTraceEndEvent(this); 107 } 108 else 109 { 110 111 System.out.println( 113 "Error! parent of xsl:fallback must be an extension or unknown element!"); 114 } 115 } 116 } 117 | Popular Tags |