01: /*
02: * (C) Copyright 2002-2003, Andy Clark. All rights reserved.
03: *
04: * This file is distributed under an Apache style license. Please
05: * refer to the LICENSE file for specific details.
06: */
07:
08: package org.cyberneko.pull.event;
09:
10: import org.cyberneko.pull.XMLEvent;
11:
12: /**
13: * An XMLDecl or TextDecl event. This event is used to communicate both
14: * the XML declaration at the beginning of XML instance documents and
15: * text declarations appearing at the beginning of external parsed
16: * entities.
17: * <p color='red'>
18: * REVISIT: [Q] Should these be separate events? -Ac
19: * </p>
20: *
21: * @author Andy Clark
22: *
23: * @version $Id$
24: */
25: public class TextDeclEvent extends XMLEvent {
26:
27: //
28: // Data
29: //
30:
31: /** True if this event is used for XMLDecl; false if used for TextDecl. */
32: public boolean xmldecl;
33:
34: /** The value of the "version" pseudo-attribute. */
35: public String version;
36:
37: /** The value of the "encoding" pseudo-attribute. */
38: public String encoding;
39:
40: /**
41: * The value of the "standalone" pseudo-attribute. This value will not
42: * be set for TextDecl events.
43: * <p color='red'>
44: * REVISIT: This is why I'm thinking that the XMLDecl should be
45: * separate from the TextDecl. It just seems <em>wrong</em>
46: * to have unused fields based on the type.
47: * </p>
48: */
49: public String standalone;
50:
51: //
52: // Constructors
53: //
54:
55: /** Default constructor. */
56: public TextDeclEvent() {
57: super (XMLEvent.TEXT_DECL);
58: } // <init>()
59:
60: } // class TextDeclEvent
|