Debian Codegraph @

DOC/HTML/SGMLSpm/events.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <HTML>
2 <HEAD>
3 <TITLE>What are the different event types and data?</TITLE>
4 </HEAD>
5 <BODY>
6
7 <P><B>Links</B>: <A HREF=sgmlselement.html>Next</A> <A HREF=sgmlsevent.html>Previous</A> <A HREF=sgmlspm.html>Up</A> <A HREF=sgmlspm.html>Top</A></P>
8
9 <H1>What are the different event types and data?</H1>
10
11 <P>Table 2 lists the ten
12 different event types returned by the <TT>next_event</TT>
13 method of an <A HREF=sgmls.html><TT>SGMLS</TT></A>
14 object and the different types of data associated with each of these
15 (note that these do <EM>not</EM> correspond to the
16 standard <B>ESIS</B> events).</P>
17
18
19 <H3>Table 2: The <TT>SGMLS_Event</TT> types</H3>
20
21 <HR>
22 <DL>
23 <DT><B>Event Type</B></DT>
24 <DD><TT>'start_element'</TT></DD>
25 <DT><B>Event Data</B></DT>
26 <DD><TT>SGMLS_Element</TT></DD>
27 <DT><B>Description</B></DT>
28 <DD>The beginning of an element.</DD>
29
30 </DL>
31 <HR>
32
33
34 <DL>
35 <DT><B>Event Type</B></DT>
36 <DD><TT>'end_element'</TT></DD>
37 <DT><B>Event Data</B></DT>
38 <DD><TT>SGMLS_Element</TT></DD>
39 <DT><B>Description</B></DT>
40 <DD>The end of an element.</DD>
41
42 </DL>
43 <HR>
44
45
46 <DL>
47 <DT><B>Event Type</B></DT>
48 <DD><TT>'cdata'</TT></DD>
49 <DT><B>Event Data</B></DT>
50 <DD>string</DD>
51 <DT><B>Description</B></DT>
52 <DD>Regular character data.</DD>
53
54 </DL>
55 <HR>
56
57
58 <DL>
59 <DT><B>Event Type</B></DT>
60 <DD><TT>'sdata'</TT></DD>
61 <DT><B>Event Data</B></DT>
62 <DD>string</DD>
63 <DT><B>Description</B></DT>
64 <DD>Special system data.</DD>
65
66 </DL>
67 <HR>
68
69
70 <DL>
71 <DT><B>Event Type</B></DT>
72 <DD><TT>'re'</TT></DD>
73 <DT><B>Event Data</B></DT>
74 <DD>[none]</DD>
75 <DT><B>Description</B></DT>
76 <DD>A record-end (i.e., a newline).</DD>
77
78 </DL>
79 <HR>
80
81
82 <DL>
83 <DT><B>Event Type</B></DT>
84 <DD><TT>'pi'</TT></DD>
85 <DT><B>Event Data</B></DT>
86 <DD>string</DD>
87 <DT><B>Description</B></DT>
88 <DD>A processing instruction</DD>
89
90 </DL>
91 <HR>
92
93
94 <DL>
95 <DT><B>Event Type</B></DT>
96 <DD><TT>'entity'</TT></DD>
97 <DT><B>Event Data</B></DT>
98 <DD><TT>SGMLS_Entity</TT></DD>
99 <DT><B>Description</B></DT>
100 <DD>A non-SGML external entity.</DD>
101
102 </DL>
103 <HR>
104
105
106 <DL>
107 <DT><B>Event Type</B></DT>
108 <DD><TT>'start_subdoc'</TT></DD>
109 <DT><B>Event Data</B></DT>
110 <DD><TT>SGMLS_Entity</TT></DD>
111 <DT><B>Description</B></DT>
112 <DD>The beginning of an SGML subdocument.</DD>
113
114 </DL>
115 <HR>
116
117
118 <DL>
119 <DT><B>Event Type</B></DT>
120 <DD><TT>'end_subdoc'</TT></DD>
121 <DT><B>Event Data</B></DT>
122 <DD><TT>SGMLS_Entity</TT></DD>
123 <DT><B>Description</B></DT>
124 <DD>The end of an SGML subdocument.</DD>
125
126 </DL>
127 <HR>
128
129
130 <DL>
131 <DT><B>Event Type</B></DT>
132 <DD><TT>'conforming'</TT></DD>
133 <DT><B>Event Data</B></DT>
134 <DD>[none]</DD>
135 <DT><B>Description</B></DT>
136 <DD>The document was valid.</DD>
137
138 </DL>
139 <HR>
140
141
142 <P>For example, if <TT>$event->type</TT> returns
143 <TT>'start_element'</TT>, then
144 <TT>$event->data</TT> will return an object belonging to the
145 <A HREF=sgmlselement.html><TT>SGMLS_Element</TT></A>
146 class (which will contain a list of attributes, etc. -- see
147 below), <TT>$event->file</TT> and
148 <TT>$event->line</TT> will return the file and line-number
149 in which the element appeared (if you called <TT>sgmls</TT> or <A HREF="http://www.jclark.com/sp.html"><TT>nsgmls</TT></A> with
150 the <IT>-l</IT> flag), and
151 <TT>$event->element</TT> will return the element currently
152 in force (in this case, the same as
153 <TT>$event->data</TT>).</P>
154
155
156 <P><B>Links</B>: <A HREF=sgmlselement.html>Next</A> <A HREF=sgmlsevent.html>Previous</A> <A HREF=sgmlspm.html>Up</A> <A HREF=sgmlspm.html>Top</A></P>
157
158
159 <ADDRESS>David Megginson <A HREF="mailto:[email protected]">&lt;[email protected]&gt;</A></ADDRESS>
160 </BODY>
161 </HTML>