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 XslCopy extends XslNode { 39 private String _copyNamespaces; 40 private String _validation; 41 private String _type; 42 43 46 public void addAttribute(QName name, String value) 47 throws XslParseException 48 { 49 if (name.getName().equals("use-attribute-sets")) { 50 XslUseAttributeSets attr = new XslUseAttributeSets(value); 51 52 attr.setGenerator(_gen); 53 54 addChild(attr); 55 } 56 else if (name.getName().equals("copy-namespaces")) 57 _copyNamespaces = value; 58 else if (name.getName().equals("validation")) 59 _validation = value; 60 else if (name.getName().equals("type")) 61 _type = value; 62 else 63 super.addAttribute(name, value); 64 } 65 66 71 public void generate(JavaWriter out) 72 throws Exception 73 { 74 out.println("out.pushCopy(node);"); 75 77 generateChildren(out); 78 79 out.println("out.popCopy(node);"); 80 } 81 } 82 | Popular Tags |