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 XslOutput extends XslNode implements XslTopNode { 39 42 public String getTagName() 43 { 44 return "xsl:output"; 45 } 46 47 50 public void addAttribute(QName name, String value) 51 throws XslParseException 52 { 53 if (name.getName().equals("indent")) { 54 if (value.equals("yes")) 55 _gen.setOutputAttribute(name.getName(), value); 56 else if (value.equals("no")) 57 _gen.setOutputAttribute(name.getName(), value); 58 else 59 throw error(L.l("'{0}' is an illegal indent value. <xsl:output> indent must be 'yes' or 'no'.", 60 value)); 61 } 62 else if (name.getName().equals("disable-output-escaping") || 63 name.getName().equals("resin:disable-output-escaping")) { 64 if (value.equals("yes") || value.equals("true")) 65 _gen.setDisableOutputEscaping(true); 66 else if (value.equals("no") || value.equals("false")) 67 _gen.setDisableOutputEscaping(false); 68 else 69 throw error(L.l("'{0}' is an illegal disable-output-escaping value. <xsl:output> disable-output-escaping must be 'yes' or 'no'.", 70 value)); 71 } 72 else 73 _gen.setOutputAttribute(name.getName(), value); 74 } 75 76 81 public void generate(JavaWriter out) 82 throws Exception 83 { 84 } 85 } 86 | Popular Tags |