]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/doc/manual/html/c893.html
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / DEVEL / pxp / pxp / doc / manual / html / c893.html
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="x738.html"><LINK
18 REL="NEXT"
19 TITLE="The class type node"
20 HREF="x939.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="x738.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="x939.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="AEN893"
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="c893.html#AEN897"
88 >The <TT
89 CLASS="LITERAL"
90 >document</TT
91 > class</A
92 ></DT
93 ><DT
94 >3.2. <A
95 HREF="x939.html"
96 >The class type <TT
97 CLASS="LITERAL"
98 >node</TT
99 ></A
100 ></DT
101 ><DT
102 >3.3. <A
103 HREF="x1439.html"
104 >The class type <TT
105 CLASS="LITERAL"
106 >extension</TT
107 ></A
108 ></DT
109 ><DT
110 >3.4. <A
111 HREF="x1496.html"
112 >Details of the mapping from XML text to the tree representation</A
113 ></DT
114 ></DL
115 ></DIV
116 ><P
117 ><I
118 CLASS="EMPHASIS"
119 >This description might be out-of-date. See the module interface files
120 for updated information.</I
121 ></P
122 ><DIV
123 CLASS="SECT1"
124 ><H1
125 CLASS="SECT1"
126 ><A
127 NAME="AEN897"
128 >3.1. The <TT
129 CLASS="LITERAL"
130 >document</TT
131 > class</A
132 ></H1
133 ><P
134 ><PRE
135 CLASS="PROGRAMLISTING"
136 >class [ 'ext ] document :
137   Pxp_types.collect_warnings -&#62; 
138   object
139     method init_xml_version : string -&#62; unit
140     method init_root : 'ext node -&#62; unit
141
142     method xml_version : string
143     method xml_standalone : bool
144     method dtd : dtd
145     method root : 'ext node
146
147     method encoding : Pxp_types.rep_encoding
148
149     method add_pinstr : proc_instruction -&#62; unit
150     method pinstr : string -&#62; proc_instruction list
151     method pinstr_names : string list
152
153     method write : Pxp_types.output_stream -&#62; Pxp_types.encoding -&#62; unit
154
155   end
156 ;;</PRE
157 >
158
159 The methods beginning with <TT
160 CLASS="LITERAL"
161 >init_</TT
162 > are only for internal use
163 of the parser.</P
164 ><P
165 ></P
166 ><UL
167 COMPACT="COMPACT"
168 ><LI
169 STYLE="list-style-type: disc"
170 ><P
171 ><TT
172 CLASS="LITERAL"
173 >xml_version</TT
174 >: returns the version string at the beginning of
175 the document. For example, "1.0" is returned if the document begins with
176 <TT
177 CLASS="LITERAL"
178 >&lt;?xml version="1.0"?&gt;</TT
179 >.</P
180 ></LI
181 ><LI
182 STYLE="list-style-type: disc"
183 ><P
184 ><TT
185 CLASS="LITERAL"
186 >xml_standalone</TT
187 >: returns the boolean value of
188 <TT
189 CLASS="LITERAL"
190 >standalone</TT
191 > declaration in the XML declaration. If the
192 <TT
193 CLASS="LITERAL"
194 >standalone</TT
195 > attribute is missing, <TT
196 CLASS="LITERAL"
197 >false</TT
198 > is
199 returned. </P
200 ></LI
201 ><LI
202 STYLE="list-style-type: disc"
203 ><P
204 ><TT
205 CLASS="LITERAL"
206 >dtd</TT
207 >: returns a reference to the global DTD object.</P
208 ></LI
209 ><LI
210 STYLE="list-style-type: disc"
211 ><P
212 ><TT
213 CLASS="LITERAL"
214 >root</TT
215 >: returns a reference to the root element.</P
216 ></LI
217 ><LI
218 STYLE="list-style-type: disc"
219 ><P
220 ><TT
221 CLASS="LITERAL"
222 >encoding</TT
223 >: returns the internal encoding of the
224 document. This means that all strings of which the document consists are
225 encoded in this character set.</P
226 ></LI
227 ><LI
228 STYLE="list-style-type: disc"
229 ><P
230 ><TT
231 CLASS="LITERAL"
232 >pinstr</TT
233 >: returns the processing instructions outside the DTD
234 and outside the root element. The argument passed to the method names a
235 <I
236 CLASS="EMPHASIS"
237 >target</I
238 >, and the method returns all instructions with this
239 target. The target is the first word inside <TT
240 CLASS="LITERAL"
241 >&lt;?</TT
242 > and
243 <TT
244 CLASS="LITERAL"
245 >?&gt;</TT
246 >.</P
247 ></LI
248 ><LI
249 STYLE="list-style-type: disc"
250 ><P
251 ><TT
252 CLASS="LITERAL"
253 >pinstr_names</TT
254 >: returns the names of the processing instructions</P
255 ></LI
256 ><LI
257 STYLE="list-style-type: disc"
258 ><P
259 ><TT
260 CLASS="LITERAL"
261 >add_pinstr</TT
262 >: adds another processing instruction. This method
263 is used by the parser itself to enter the instructions returned by
264 <TT
265 CLASS="LITERAL"
266 >pinstr</TT
267 >, but you can also enter additional instructions.</P
268 ></LI
269 ><LI
270 STYLE="list-style-type: disc"
271 ><P
272 ><TT
273 CLASS="LITERAL"
274 >write</TT
275 >: writes the document to the passed stream as XML
276 text using the passed (external) encoding. The generated text is always valid
277 XML and can be parsed by PXP; however, the text is badly formatted (this is not
278 a pretty printer).</P
279 ></LI
280 ></UL
281 ></DIV
282 ></DIV
283 ><DIV
284 CLASS="NAVFOOTER"
285 ><HR
286 ALIGN="LEFT"
287 WIDTH="100%"><TABLE
288 WIDTH="100%"
289 BORDER="0"
290 CELLPADDING="0"
291 CELLSPACING="0"
292 ><TR
293 ><TD
294 WIDTH="33%"
295 ALIGN="left"
296 VALIGN="top"
297 ><A
298 HREF="x738.html"
299 >Prev</A
300 ></TD
301 ><TD
302 WIDTH="34%"
303 ALIGN="center"
304 VALIGN="top"
305 ><A
306 HREF="index.html"
307 >Home</A
308 ></TD
309 ><TD
310 WIDTH="33%"
311 ALIGN="right"
312 VALIGN="top"
313 ><A
314 HREF="x939.html"
315 >Next</A
316 ></TD
317 ></TR
318 ><TR
319 ><TD
320 WIDTH="33%"
321 ALIGN="left"
322 VALIGN="top"
323 >Example: An HTML backend for the <I
324 CLASS="EMPHASIS"
325 >readme</I
326 >
327 DTD</TD
328 ><TD
329 WIDTH="34%"
330 ALIGN="center"
331 VALIGN="top"
332 ><A
333 HREF="p34.html"
334 >Up</A
335 ></TD
336 ><TD
337 WIDTH="33%"
338 ALIGN="right"
339 VALIGN="top"
340 >The class type <TT
341 CLASS="LITERAL"
342 >node</TT
343 ></TD
344 ></TR
345 ></TABLE
346 ></DIV
347 ></BODY
348 ></HTML
349 >