1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 75 public class script extends MultiPartElement implements Printable 76 { 77 80 { 81 setElementType("script"); 82 setCase(LOWERCASE); 83 setAttributeQuote(true); 84 setLanguage("Javascript"); 85 } 86 89 public script() 90 { 91 } 92 93 97 public script(Element element) 98 { 99 addElement(element); 100 } 101 102 107 public script(Element element, String src) 108 { 109 addElement(element); 110 setSrc(src); 111 } 112 113 119 public script(Element element, String src, String type) 120 { 121 addElement(element); 122 setSrc(src); 123 setType(type); 124 } 125 126 133 public script(Element element, String src, String type, String lang) 134 { 135 addElement(element); 136 setSrc(src); 137 setType(type); 138 setLanguage(lang); 139 } 140 141 145 public script(String element) 146 { 147 addElement(element); 148 } 149 150 155 public script(String element, String src) 156 { 157 addElement(element); 158 setSrc(src); 159 } 160 161 167 public script(String element, String src, String type) 168 { 169 addElement(element); 170 setSrc(src); 171 setType(type); 172 } 173 174 181 public script(String element, String src, String type, String lang) 182 { 183 addElement(element); 184 setSrc(src); 185 setType(type); 186 setLanguage(lang); 187 } 188 189 193 public script setSrc(String src) 194 { 195 addAttribute("src",src); 196 return this; 197 } 198 199 203 public script setType(String type) 204 { 205 addAttribute("type", type); 206 return this; 207 } 208 209 213 public script setLanguage(String language) 214 { 215 addAttribute("language", language); 216 return this; 217 } 218 219 223 public Element setLang(String lang) 224 { 225 addAttribute("lang",lang); 226 addAttribute("xml:lang",lang); 227 return this; 228 } 229 230 235 public script addElement(String hashcode,Element element) 236 { 237 addElementToRegistry(hashcode,element); 238 return(this); 239 } 240 241 246 public script addElement(String hashcode,String element) 247 { 248 addElementToRegistry(hashcode,element); 249 return(this); 250 } 251 252 256 public script addElement(Element element) 257 { 258 addElementToRegistry(element); 259 return(this); 260 } 261 262 266 public script addElement(String element) 267 { 268 addElementToRegistry(element); 269 return(this); 270 } 271 275 public script removeElement(String hashcode) 276 { 277 removeElementFromRegistry(hashcode); 278 return(this); 279 } 280 } 281 | Popular Tags |