01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/publishing/markups/TKXmlMarkup.java,v 1.6 2000/06/01 15:02:56 alex Exp $
03: *
04: */
05: package com.teamkonzept.publishing.markups;
06:
07: import com.teamkonzept.lib.*;
08:
09: public class TKXmlMarkup extends TKMarkup {
10:
11: public boolean isAtom;
12:
13: public TKXmlMarkup(String name, boolean isAtom, TKHashtable params,
14: 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)
31: buf.append('<').append(toId()).append("/>");
32: else
33: buf.append('<').append(toId()).append('>');
34:
35: return new String(buf);
36: }
37:
38: public String expand() {
39:
40: StringBuffer buf = new StringBuffer();
41:
42: if (isAtom)
43: buf.append('<').append(toDisplay()).append("/>");
44: else
45: buf.append('<').append(toDisplay()).append('>');
46:
47: return new String(buf);
48: }
49:
50: public String toMarkup() {
51:
52: return super .toString();
53: }
54:
55: //{{DECLARE_CONTROLS
56: //}}
57: }
|