1 5 package com.teamkonzept.publishing.markups; 6 7 import com.teamkonzept.lib.*; 8 9 public class TKXmlMarkup extends TKMarkup { 10 11 public boolean isAtom; 12 13 public TKXmlMarkup (String name, boolean isAtom, 14 TKHashtable params, int pos) throws Exception { 15 16 super (name,params,pos); 17 this.isAtom = isAtom; 18 } 19 20 public TKXmlMarkup (TKXmlMarkup markup) { 21 22 super ((TKMarkup) markup); 23 this.isAtom = markup.isAtom; 24 } 25 26 public String toString() { 27 28 StringBuffer buf = new StringBuffer (); 29 30 if (isAtom) buf.append('<').append(toId()).append("/>"); 31 else buf.append('<').append(toId()).append('>'); 32 33 return new String (buf); 34 } 35 36 public String expand() { 37 38 StringBuffer buf = new StringBuffer (); 39 40 if (isAtom) buf.append('<').append(toDisplay()).append("/>"); 41 else buf.append('<').append(toDisplay()).append('>'); 42 43 return new String (buf); 44 } 45 46 public String toMarkup() { 47 48 return super.toString(); 49 } 50 51 } 54 55 | Popular Tags |