1 28 29 package com.caucho.xsl.java; 30 31 import com.caucho.java.JavaWriter; 32 import com.caucho.xml.QName; 33 import com.caucho.xsl.XslParseException; 34 35 38 public class XtpDirectivePage extends XslNode implements XslTopNode { 39 42 public String getTagName() 43 { 44 return "xtp:directive.page"; 45 } 46 47 50 public void addAttribute(QName name, String value) 51 throws XslParseException 52 { 53 if (name.getName().equals("errorPage")) 54 _gen.setErrorPage(value); 55 else if (name.getName().equals("import")) 56 _gen.addImportList(value); 57 else if (name.getName().equals("contentType")) 58 _gen.setContentType(value); 59 else 60 super.addAttribute(name, value); 61 } 62 63 66 public void addChild(XslNode node) 67 throws XslParseException 68 { 69 if (node == null) 70 return; 71 72 if (node instanceof TextNode) { 73 } 74 else 75 throw error(L.l("'{0}' is not allowed as an xtp:directive.page child.", 76 node)); 77 } 78 79 84 public void generateDeclaration(JavaWriter out) 85 throws Exception 86 { 87 } 89 90 95 public void generate(JavaWriter out) 96 throws Exception 97 { 98 } 99 } 100 | Popular Tags |