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 XtpScriptlet extends XslNode { 39 private String _text = ""; 40 41 44 public String getTagName() 45 { 46 return "xtp:scriptlet"; 47 } 48 49 52 public void addAttribute(QName name, String value) 53 throws XslParseException 54 { 55 } 56 57 60 public void addChild(XslNode node) 61 throws XslParseException 62 { 63 if (node == null) 64 return; 65 66 if (node instanceof TextNode) { 67 _text += ((TextNode) node).getText(); 68 } 69 else 70 throw error(L.l("'{0}' is not allowed as an xtp:scriptlet child.", 71 node)); 72 } 73 74 79 public void generate(JavaWriter out) 80 throws Exception 81 { 82 out.print(_text); 83 } 84 } 85 | Popular Tags |