~ubuntu-branches/ubuntu/hardy/pxp/hardy

« back to all changes in this revision

Viewing changes to doc/manual/html/c895.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2005-03-29 11:06:39 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050329110639-5p39hz1d4aq3r2ec
Tags: 1.1.95-6
* Rebuilt against ocaml 3.08.3
* No longer built with wlex support (since wlex is no longer supported
  upstream and corresponding package has been removed from the debian
  archive)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<HTML
2
 
><HEAD
3
 
><TITLE
4
 
>The objects representing the document</TITLE
5
 
><META
6
 
NAME="GENERATOR"
7
 
CONTENT="Modular DocBook HTML Stylesheet Version 1.46"><LINK
8
 
REL="HOME"
9
 
TITLE="The PXP user's guide"
10
 
HREF="index.html"><LINK
11
 
REL="UP"
12
 
TITLE="User's guide"
13
 
HREF="p34.html"><LINK
14
 
REL="PREVIOUS"
15
 
TITLE="Example: An HTML backend for the readme
16
 
DTD"
17
 
HREF="x740.html"><LINK
18
 
REL="NEXT"
19
 
TITLE="The class type node"
20
 
HREF="x941.html"><LINK
21
 
REL="STYLESHEET"
22
 
TYPE="text/css"
23
 
HREF="markup.css"></HEAD
24
 
><BODY
25
 
CLASS="CHAPTER"
26
 
BGCOLOR="#FFFFFF"
27
 
TEXT="#000000"
28
 
LINK="#0000FF"
29
 
VLINK="#840084"
30
 
ALINK="#0000FF"
31
 
><DIV
32
 
CLASS="NAVHEADER"
33
 
><TABLE
34
 
WIDTH="100%"
35
 
BORDER="0"
36
 
CELLPADDING="0"
37
 
CELLSPACING="0"
38
 
><TR
39
 
><TH
40
 
COLSPAN="3"
41
 
ALIGN="center"
42
 
>The PXP user's guide</TH
43
 
></TR
44
 
><TR
45
 
><TD
46
 
WIDTH="10%"
47
 
ALIGN="left"
48
 
VALIGN="bottom"
49
 
><A
50
 
HREF="x740.html"
51
 
>Prev</A
52
 
></TD
53
 
><TD
54
 
WIDTH="80%"
55
 
ALIGN="center"
56
 
VALIGN="bottom"
57
 
></TD
58
 
><TD
59
 
WIDTH="10%"
60
 
ALIGN="right"
61
 
VALIGN="bottom"
62
 
><A
63
 
HREF="x941.html"
64
 
>Next</A
65
 
></TD
66
 
></TR
67
 
></TABLE
68
 
><HR
69
 
ALIGN="LEFT"
70
 
WIDTH="100%"></DIV
71
 
><DIV
72
 
CLASS="CHAPTER"
73
 
><H1
74
 
><A
75
 
NAME="AEN895"
76
 
>Chapter 3. The objects representing the document</A
77
 
></H1
78
 
><DIV
79
 
CLASS="TOC"
80
 
><DL
81
 
><DT
82
 
><B
83
 
>Table of Contents</B
84
 
></DT
85
 
><DT
86
 
>3.1. <A
87
 
HREF="c895.html#AEN899"
88
 
>The <TT
89
 
CLASS="LITERAL"
90
 
>document</TT
91
 
> class</A
92
 
></DT
93
 
><DT
94
 
>3.2. <A
95
 
HREF="x941.html"
96
 
>The class type <TT
97
 
CLASS="LITERAL"
98
 
>node</TT
99
 
></A
100
 
></DT
101
 
><DT
102
 
>3.3. <A
103
 
HREF="x3475.html"
104
 
>The class type <TT
105
 
CLASS="LITERAL"
106
 
>extension</TT
107
 
></A
108
 
></DT
109
 
><DT
110
 
>3.4. <A
111
 
HREF="x3533.html"
112
 
>Details of the mapping from XML text to the tree representation</A
113
 
></DT
114
 
><DT
115
 
>3.5. <A
116
 
HREF="x3613.html"
117
 
>Namespaces</A
118
 
></DT
119
 
></DL
120
 
></DIV
121
 
><P
122
 
><I
123
 
CLASS="EMPHASIS"
124
 
>This description might be out-of-date. See the module interface files
125
 
for updated information.</I
126
 
></P
127
 
><DIV
128
 
CLASS="SECT1"
129
 
><H1
130
 
CLASS="SECT1"
131
 
><A
132
 
NAME="AEN899"
133
 
>3.1. The <TT
134
 
CLASS="LITERAL"
135
 
>document</TT
136
 
> class</A
137
 
></H1
138
 
><P
139
 
><PRE
140
 
CLASS="PROGRAMLISTING"
141
 
>class [ 'ext ] document :
142
 
  Pxp_types.collect_warnings -&#62; 
143
 
  object
144
 
    method init_xml_version : string -&#62; unit
145
 
    method init_root : 'ext node -&#62; unit
146
 
 
147
 
    method xml_version : string
148
 
    method xml_standalone : bool
149
 
    method dtd : dtd
150
 
    method root : 'ext node
151
 
 
152
 
    method encoding : Pxp_types.rep_encoding
153
 
 
154
 
    method add_pinstr : proc_instruction -&#62; unit
155
 
    method pinstr : string -&#62; proc_instruction list
156
 
    method pinstr_names : string list
157
 
 
158
 
    method write : Pxp_types.output_stream -&#62; Pxp_types.encoding -&#62; unit
159
 
 
160
 
  end
161
 
;;</PRE
162
 
>
163
 
 
164
 
The methods beginning with <TT
165
 
CLASS="LITERAL"
166
 
>init_</TT
167
 
> are only for internal use
168
 
of the parser.</P
169
 
><P
170
 
></P
171
 
><UL
172
 
COMPACT="COMPACT"
173
 
><LI
174
 
STYLE="list-style-type: disc"
175
 
><P
176
 
><TT
177
 
CLASS="LITERAL"
178
 
>xml_version</TT
179
 
>: returns the version string at the beginning of
180
 
the document. For example, "1.0" is returned if the document begins with
181
 
<TT
182
 
CLASS="LITERAL"
183
 
>&lt;?xml version="1.0"?&gt;</TT
184
 
>.</P
185
 
></LI
186
 
><LI
187
 
STYLE="list-style-type: disc"
188
 
><P
189
 
><TT
190
 
CLASS="LITERAL"
191
 
>xml_standalone</TT
192
 
>: returns the boolean value of
193
 
<TT
194
 
CLASS="LITERAL"
195
 
>standalone</TT
196
 
> declaration in the XML declaration. If the
197
 
<TT
198
 
CLASS="LITERAL"
199
 
>standalone</TT
200
 
> attribute is missing, <TT
201
 
CLASS="LITERAL"
202
 
>false</TT
203
 
> is
204
 
returned. </P
205
 
></LI
206
 
><LI
207
 
STYLE="list-style-type: disc"
208
 
><P
209
 
><TT
210
 
CLASS="LITERAL"
211
 
>dtd</TT
212
 
>: returns a reference to the global DTD object.</P
213
 
></LI
214
 
><LI
215
 
STYLE="list-style-type: disc"
216
 
><P
217
 
><TT
218
 
CLASS="LITERAL"
219
 
>root</TT
220
 
>: returns a reference to the root element.</P
221
 
></LI
222
 
><LI
223
 
STYLE="list-style-type: disc"
224
 
><P
225
 
><TT
226
 
CLASS="LITERAL"
227
 
>encoding</TT
228
 
>: returns the internal encoding of the
229
 
document. This means that all strings of which the document consists are
230
 
encoded in this character set.</P
231
 
></LI
232
 
><LI
233
 
STYLE="list-style-type: disc"
234
 
><P
235
 
><TT
236
 
CLASS="LITERAL"
237
 
>pinstr</TT
238
 
>: returns the processing instructions outside the DTD
239
 
and outside the root element. The argument passed to the method names a
240
 
<I
241
 
CLASS="EMPHASIS"
242
 
>target</I
243
 
>, and the method returns all instructions with this
244
 
target. The target is the first word inside <TT
245
 
CLASS="LITERAL"
246
 
>&lt;?</TT
247
 
> and
248
 
<TT
249
 
CLASS="LITERAL"
250
 
>?&gt;</TT
251
 
>.</P
252
 
></LI
253
 
><LI
254
 
STYLE="list-style-type: disc"
255
 
><P
256
 
><TT
257
 
CLASS="LITERAL"
258
 
>pinstr_names</TT
259
 
>: returns the names of the processing instructions</P
260
 
></LI
261
 
><LI
262
 
STYLE="list-style-type: disc"
263
 
><P
264
 
><TT
265
 
CLASS="LITERAL"
266
 
>add_pinstr</TT
267
 
>: adds another processing instruction. This method
268
 
is used by the parser itself to enter the instructions returned by
269
 
<TT
270
 
CLASS="LITERAL"
271
 
>pinstr</TT
272
 
>, but you can also enter additional instructions.</P
273
 
></LI
274
 
><LI
275
 
STYLE="list-style-type: disc"
276
 
><P
277
 
><TT
278
 
CLASS="LITERAL"
279
 
>write</TT
280
 
>: writes the document to the passed stream as XML
281
 
text using the passed (external) encoding. The generated text is always valid
282
 
XML and can be parsed by PXP; however, the text is badly formatted (this is not
283
 
a pretty printer).</P
284
 
></LI
285
 
></UL
286
 
></DIV
287
 
></DIV
288
 
><DIV
289
 
CLASS="NAVFOOTER"
290
 
><HR
291
 
ALIGN="LEFT"
292
 
WIDTH="100%"><TABLE
293
 
WIDTH="100%"
294
 
BORDER="0"
295
 
CELLPADDING="0"
296
 
CELLSPACING="0"
297
 
><TR
298
 
><TD
299
 
WIDTH="33%"
300
 
ALIGN="left"
301
 
VALIGN="top"
302
 
><A
303
 
HREF="x740.html"
304
 
>Prev</A
305
 
></TD
306
 
><TD
307
 
WIDTH="34%"
308
 
ALIGN="center"
309
 
VALIGN="top"
310
 
><A
311
 
HREF="index.html"
312
 
>Home</A
313
 
></TD
314
 
><TD
315
 
WIDTH="33%"
316
 
ALIGN="right"
317
 
VALIGN="top"
318
 
><A
319
 
HREF="x941.html"
320
 
>Next</A
321
 
></TD
322
 
></TR
323
 
><TR
324
 
><TD
325
 
WIDTH="33%"
326
 
ALIGN="left"
327
 
VALIGN="top"
328
 
>Example: An HTML backend for the <I
329
 
CLASS="EMPHASIS"
330
 
>readme</I
331
 
>
332
 
DTD</TD
333
 
><TD
334
 
WIDTH="34%"
335
 
ALIGN="center"
336
 
VALIGN="top"
337
 
><A
338
 
HREF="p34.html"
339
 
>Up</A
340
 
></TD
341
 
><TD
342
 
WIDTH="33%"
343
 
ALIGN="right"
344
 
VALIGN="top"
345
 
>The class type <TT
346
 
CLASS="LITERAL"
347
 
>node</TT
348
 
></TD
349
 
></TR
350
 
></TABLE
351
 
></DIV
352
 
></BODY
353
 
></HTML
354
 
>
 
 
b'\\ No newline at end of file'