home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / Doc / libhtmllib.tex / node1_ct.html < prev    next >
LaTeX Document  |  1997-01-17  |  5.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 53 74 | 61 6e 64 61 72 64 20 4d |ts of St|andard M|
|000000b0| 6f 64 75 6c 65 20 68 74 | 6d 6c 6c 69 62 3c 2f 54 |odule ht|mllib</T|
|000000c0| 49 54 4c 45 3e 0a 0a 3c | 4d 45 54 41 20 48 54 54 |ITLE>..<|META HTT|
|000000d0| 50 2d 45 51 55 49 56 3d | 22 43 6f 6e 74 65 6e 74 |P-EQUIV=|"Content|
|000000e0| 2d 54 79 70 65 22 20 43 | 4f 4e 54 45 4e 54 3d 22 |-Type" C|ONTENT="|
|000000f0| 74 65 78 74 2f 68 74 6d | 6c 3b 20 63 68 61 72 73 |text/htm|l; chars|
|00000100| 65 74 3d 75 74 66 2d 38 | 22 3e 0a 3c 4d 45 54 41 |et=utf-8|">.<META|
|00000110| 20 4e 41 4d 45 3d 22 76 | 69 65 77 70 6f 72 74 22 | NAME="v|iewport"|
|00000120| 20 43 4f 4e 54 45 4e 54 | 3d 22 77 69 64 74 68 3d | CONTENT|="width=|
|00000130| 64 65 76 69 63 65 2d 77 | 69 64 74 68 2c 20 69 6e |device-w|idth, in|
|00000140| 69 74 69 61 6c 2d 73 63 | 61 6c 65 3d 31 2e 30 22 |itial-sc|ale=1.0"|
|00000150| 3e 0a 3c 4d 45 54 41 20 | 4e 41 4d 45 3d 22 47 65 |>.<META |NAME="Ge|
|00000160| 6e 65 72 61 74 6f 72 22 | 20 43 4f 4e 54 45 4e 54 |nerator"| CONTENT|
|00000170| 3d 22 4c 61 54 65 58 32 | 48 54 4d 4c 20 76 32 30 |="LaTeX2|HTML v20|
|00000180| 32 32 22 3e 0a 0a 3c 4c | 49 4e 4b 20 52 45 4c 3d |22">..<L|INK REL=|
|00000190| 22 53 54 59 4c 45 53 48 | 45 45 54 22 20 48 52 45 |"STYLESH|EET" HRE|
|000001a0| 46 3d 22 6c 69 62 68 74 | 6d 6c 6c 69 62 2e 63 73 |F="libht|mllib.cs|
|000001b0| 73 22 3e 0a 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |s">..<LI|NK REL="|
|000001c0| 70 72 65 76 69 6f 75 73 | 22 20 48 52 45 46 3d 22 |previous|" HREF="|
|000001d0| 6c 69 62 68 74 6d 6c 6c | 69 62 5f 6d 6e 2e 68 74 |libhtmll|ib_mn.ht|
|000001e0| 6d 6c 22 3e 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |ml">.<LI|NK REL="|
|000001f0| 75 70 22 20 48 52 45 46 | 3d 22 6c 69 62 68 74 6d |up" HREF|="libhtm|
|00000200| 6c 6c 69 62 5f 6d 6e 2e | 68 74 6d 6c 22 3e 0a 3c |llib_mn.|html">.<|
|00000210| 2f 48 45 41 44 3e 0a 20 | 0a 3c 42 4f 44 59 20 62 |/HEAD>. |.<BODY b|
|00000220| 67 63 6f 6c 6f 72 3d 22 | 23 66 66 66 66 66 66 22 |gcolor="|#ffffff"|
|00000230| 20 74 65 78 74 3d 22 23 | 30 30 30 30 30 30 22 20 | text="#|000000" |
|00000240| 6c 69 6e 6b 3d 22 23 39 | 39 34 34 45 45 22 20 76 |link="#9|944EE" v|
|00000250| 6c 69 6e 6b 3d 22 23 30 | 30 30 30 66 66 22 20 61 |link="#0|000ff" a|
|00000260| 6c 69 6e 6b 3d 22 23 30 | 30 66 66 30 30 22 3e 0a |link="#0|0ff00">.|
|00000270| 0a 3c 48 31 3e 3c 41 20 | 49 44 3d 22 53 45 43 54 |.<H1><A |ID="SECT|
|00000280| 49 4f 4e 30 30 30 31 30 | 30 30 30 30 30 30 30 30 |ION00010|00000000|
|00000290| 30 30 30 30 30 30 30 22 | 3e 0a 53 74 61 6e 64 61 |0000000"|>.Standa|
|000002a0| 72 64 20 4d 6f 64 75 6c | 65 20 68 74 6d 6c 6c 69 |rd Modul|e htmlli|
|000002b0| 62 3c 2f 41 3e 0a 3c 2f | 48 31 3e 0a 68 74 6d 6c |b</A>.</|H1>.html|
|000002c0| 6c 69 62 0a 3c 41 20 49 | 44 3d 22 33 22 3e 3c 2f |lib.<A I|D="3"></|
|000002d0| 41 3e 0a 3c 41 20 49 44 | 3d 22 34 22 3e 3c 2f 41 |A>.<A ID|="4"></A|
|000002e0| 3e 0a 0a 3c 50 3e 0a 0a | 3c 50 3e 0a 54 68 69 73 |>..<P>..|<P>.This|
|000002f0| 20 6d 6f 64 75 6c 65 20 | 64 65 66 69 6e 65 73 20 | module |defines |
|00000300| 61 20 63 6c 61 73 73 20 | 77 68 69 63 68 20 63 61 |a class |which ca|
|00000310| 6e 20 73 65 72 76 65 20 | 61 73 20 61 20 62 61 73 |n serve |as a bas|
|00000320| 65 20 66 6f 72 20 70 61 | 72 73 69 6e 67 20 74 65 |e for pa|rsing te|
|00000330| 78 74 0a 66 69 6c 65 73 | 20 66 6f 72 6d 61 74 74 |xt.files| formatt|
|00000340| 65 64 20 69 6e 20 74 68 | 65 20 48 79 70 65 72 54 |ed in th|e HyperT|
|00000350| 65 78 74 20 4d 61 72 6b | 2d 75 70 20 4c 61 6e 67 |ext Mark|-up Lang|
|00000360| 75 61 67 65 20 28 48 54 | 4d 4c 29 2e 20 20 54 68 |uage (HT|ML). Th|
|00000370| 65 20 63 6c 61 73 73 0a | 69 73 20 6e 6f 74 20 64 |e class.|is not d|
|00000380| 69 72 65 63 74 6c 79 20 | 63 6f 6e 63 65 72 6e 65 |irectly |concerne|
|00000390| 64 20 77 69 74 68 20 49 | 2f 4f 20 26 6d 64 61 73 |d with I|/O &mdas|
|000003a0| 68 3b 20 69 74 20 6d 75 | 73 74 20 62 65 20 70 72 |h; it mu|st be pr|
|000003b0| 6f 76 69 64 65 64 20 77 | 69 74 68 20 69 6e 70 75 |ovided w|ith inpu|
|000003c0| 74 0a 69 6e 20 73 74 72 | 69 6e 67 20 66 6f 72 6d |t.in str|ing form|
|000003d0| 20 76 69 61 20 61 20 6d | 65 74 68 6f 64 2c 20 61 | via a m|ethod, a|
|000003e0| 6e 64 20 6d 61 6b 65 73 | 20 63 61 6c 6c 73 20 74 |nd makes| calls t|
|000003f0| 6f 20 6d 65 74 68 6f 64 | 73 20 6f 66 20 61 0a 60 |o method|s of a.`|
|00000400| 60 66 6f 72 6d 61 74 74 | 65 72 27 27 20 6f 62 6a |`formatt|er'' obj|
|00000410| 65 63 74 20 69 6e 20 6f | 72 64 65 72 20 74 6f 20 |ect in o|rder to |
|00000420| 70 72 6f 64 75 63 65 20 | 6f 75 74 70 75 74 2e 20 |produce |output. |
|00000430| 20 54 68 65 0a 48 54 4d | 4c 50 61 72 73 65 72 20 | The.HTM|LParser |
|00000440| 63 6c 61 73 73 20 69 73 | 20 64 65 73 69 67 6e 65 |class is| designe|
|00000450| 64 20 74 6f 20 62 65 20 | 75 73 65 64 20 61 73 20 |d to be |used as |
|00000460| 61 20 62 61 73 65 20 63 | 6c 61 73 73 20 66 6f 72 |a base c|lass for|
|00000470| 0a 6f 74 68 65 72 20 63 | 6c 61 73 73 65 73 20 69 |.other c|lasses i|
|00000480| 6e 20 6f 72 64 65 72 20 | 74 6f 20 61 64 64 20 66 |n order |to add f|
|00000490| 75 6e 63 74 69 6f 6e 61 | 6c 69 74 79 2c 20 61 6e |unctiona|lity, an|
|000004a0| 64 20 61 6c 6c 6f 77 73 | 20 6d 6f 73 74 20 6f 66 |d allows| most of|
|000004b0| 20 69 74 73 0a 6d 65 74 | 68 6f 64 73 20 74 6f 20 | its.met|hods to |
|000004c0| 62 65 20 65 78 74 65 6e | 64 65 64 20 6f 72 20 6f |be exten|ded or o|
|000004d0| 76 65 72 72 69 64 64 65 | 6e 2e 20 20 49 6e 20 74 |verridde|n. In t|
|000004e0| 75 72 6e 2c 20 74 68 69 | 73 20 63 6c 61 73 73 20 |urn, thi|s class |
|000004f0| 69 73 20 64 65 72 69 76 | 65 64 0a 66 72 6f 6d 20 |is deriv|ed.from |
|00000500| 61 6e 64 20 65 78 74 65 | 6e 64 73 20 74 68 65 20 |and exte|nds the |
|00000510| 53 47 4d 4c 50 61 72 73 | 65 72 20 63 6c 61 73 73 |SGMLPars|er class|
|00000520| 20 64 65 66 69 6e 65 64 | 20 69 6e 20 6d 6f 64 75 | defined| in modu|
|00000530| 6c 65 0a 73 67 6d 6c 6c | 69 62 2e 20 20 54 77 6f |le.sgmll|ib. Two|
|00000540| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 73 | impleme|ntations|
|00000550| 20 6f 66 20 66 6f 72 6d | 61 74 74 65 72 20 6f 62 | of form|atter ob|
|00000560| 6a 65 63 74 73 20 61 72 | 65 0a 70 72 6f 76 69 64 |jects ar|e.provid|
|00000570| 65 64 20 69 6e 20 74 68 | 65 20 66 6f 72 6d 61 74 |ed in th|e format|
|00000580| 74 65 72 20 6d 6f 64 75 | 6c 65 3b 20 72 65 66 65 |ter modu|le; refe|
|00000590| 72 20 74 6f 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |r to the| documen|
|000005a0| 74 61 74 69 6f 6e 0a 66 | 6f 72 20 74 68 61 74 20 |tation.f|or that |
|000005b0| 6d 6f 64 75 6c 65 20 66 | 6f 72 20 69 6e 66 6f 72 |module f|or infor|
|000005c0| 6d 61 74 69 6f 6e 20 6f | 6e 20 74 68 65 20 66 6f |mation o|n the fo|
|000005d0| 72 6d 61 74 74 65 72 20 | 69 6e 74 65 72 66 61 63 |rmatter |interfac|
|000005e0| 65 2e 0a 3c 41 20 49 44 | 3d 22 31 31 22 3e 3c 2f |e..<A ID|="11"></|
|000005f0| 41 3e 0a 73 67 6d 6c 6c | 69 62 0a 53 47 4d 4c 50 |A>.sgmll|ib.SGMLP|
|00000600| 61 72 73 65 72 0a 3c 41 | 20 49 44 3d 22 31 34 22 |arser.<A| ID="14"|
|00000610| 3e 3c 2f 41 3e 0a 66 6f | 72 6d 61 74 74 65 72 0a |></A>.fo|rmatter.|
|00000620| 0a 3c 50 3e 0a 54 68 65 | 20 66 6f 6c 6c 6f 77 69 |.<P>.The| followi|
|00000630| 6e 67 20 69 73 20 61 20 | 73 75 6d 6d 61 72 79 20 |ng is a |summary |
|00000640| 6f 66 20 74 68 65 20 69 | 6e 74 65 72 66 61 63 65 |of the i|nterface|
|00000650| 20 64 65 66 69 6e 65 64 | 20 62 79 0a 73 67 6d 6c | defined| by.sgml|
|00000660| 6c 69 62 2e 53 47 4d 4c | 50 61 72 73 65 72 3a 0a |lib.SGML|Parser:.|
|00000670| 0a 3c 50 3e 0a 0a 3c 55 | 4c 3e 0a 3c 4c 49 3e 54 |.<P>..<U|L>.<LI>T|
|00000680| 68 65 20 69 6e 74 65 72 | 66 61 63 65 20 74 6f 20 |he inter|face to |
|00000690| 66 65 65 64 20 64 61 74 | 61 20 74 6f 20 61 6e 20 |feed dat|a to an |
|000006a0| 69 6e 73 74 61 6e 63 65 | 20 69 73 20 74 68 72 6f |instance| is thro|
|000006b0| 75 67 68 20 74 68 65 20 | 66 65 65 64 28 29 0a 6d |ugh the |feed().m|
|000006c0| 65 74 68 6f 64 2c 20 77 | 68 69 63 68 20 74 61 6b |ethod, w|hich tak|
|000006d0| 65 73 20 61 20 73 74 72 | 69 6e 67 20 61 72 67 75 |es a str|ing argu|
|000006e0| 6d 65 6e 74 2e 20 20 54 | 68 69 73 20 63 61 6e 20 |ment. T|his can |
|000006f0| 62 65 20 63 61 6c 6c 65 | 64 20 77 69 74 68 20 61 |be calle|d with a|
|00000700| 73 0a 6c 69 74 74 6c 65 | 20 6f 72 20 61 73 20 6d |s.little| or as m|
|00000710| 75 63 68 20 74 65 78 74 | 20 61 74 20 61 20 74 69 |uch text| at a ti|
|00000720| 6d 65 20 61 73 20 64 65 | 73 69 72 65 64 3b 20 70 |me as de|sired; p|
|00000730| 2e 66 65 65 64 28 61 29 | 3b 0a 70 2e 66 65 65 64 |.feed(a)|;.p.feed|
|00000740| 28 62 29 20 68 61 73 20 | 74 68 65 20 73 61 6d 65 |(b) has |the same|
|00000750| 20 65 66 66 65 63 74 20 | 61 73 20 70 2e 66 65 65 | effect |as p.fee|
|00000760| 64 28 61 2b 62 29 2e 20 | 20 57 68 65 6e 20 74 68 |d(a+b). | When th|
|00000770| 65 20 64 61 74 61 0a 63 | 6f 6e 74 61 69 6e 73 20 |e data.c|ontains |
|00000780| 63 6f 6d 70 6c 65 74 65 | 20 48 54 4d 4c 20 74 61 |complete| HTML ta|
|00000790| 67 73 2c 20 74 68 65 73 | 65 20 61 72 65 20 70 72 |gs, thes|e are pr|
|000007a0| 6f 63 65 73 73 65 64 20 | 69 6d 6d 65 64 69 61 74 |ocessed |immediat|
|000007b0| 65 6c 79 3b 0a 69 6e 63 | 6f 6d 70 6c 65 74 65 20 |ely;.inc|omplete |
|000007c0| 65 6c 65 6d 65 6e 74 73 | 20 61 72 65 20 73 61 76 |elements| are sav|
|000007d0| 65 64 20 69 6e 20 61 20 | 62 75 66 66 65 72 2e 20 |ed in a |buffer. |
|000007e0| 20 54 6f 20 66 6f 72 63 | 65 20 70 72 6f 63 65 73 | To forc|e proces|
|000007f0| 73 69 6e 67 20 6f 66 20 | 61 6c 6c 0a 75 6e 70 72 |sing of |all.unpr|
|00000800| 6f 63 65 73 73 65 64 20 | 64 61 74 61 2c 20 63 61 |ocessed |data, ca|
|00000810| 6c 6c 20 74 68 65 20 63 | 6c 6f 73 65 28 29 20 6d |ll the c|lose() m|
|00000820| 65 74 68 6f 64 2e 0a 0a | 3c 50 3e 0a 46 6f 72 20 |ethod...|<P>.For |
|00000830| 65 78 61 6d 70 6c 65 2c | 20 74 6f 20 70 61 72 73 |example,| to pars|
|00000840| 65 20 74 68 65 20 65 6e | 74 69 72 65 20 63 6f 6e |e the en|tire con|
|00000850| 74 65 6e 74 73 20 6f 66 | 20 61 20 66 69 6c 65 2c |tents of| a file,|
|00000860| 20 75 73 65 3a 0a 3c 50 | 52 45 3e 0a 70 61 72 73 | use:.<P|RE>.pars|
|00000870| 65 72 2e 66 65 65 64 28 | 6f 70 65 6e 28 27 6d 79 |er.feed(|open('my|
|00000880| 66 69 6c 65 2e 68 74 6d | 6c 27 29 2e 72 65 61 64 |file.htm|l').read|
|00000890| 28 29 29 0a 70 61 72 73 | 65 72 2e 63 6c 6f 73 65 |()).pars|er.close|
|000008a0| 28 29 0a 3c 2f 50 52 45 | 3e 0a 0a 3c 50 3e 0a 3c |().</PRE|>..<P>.<|
|000008b0| 2f 4c 49 3e 0a 3c 4c 49 | 3e 54 68 65 20 69 6e 74 |/LI>.<LI|>The int|
|000008c0| 65 72 66 61 63 65 20 74 | 6f 20 64 65 66 69 6e 65 |erface t|o define|
|000008d0| 20 73 65 6d 61 6e 74 69 | 63 73 20 66 6f 72 20 48 | semanti|cs for H|
|000008e0| 54 4d 4c 20 74 61 67 73 | 20 69 73 20 76 65 72 79 |TML tags| is very|
|000008f0| 20 73 69 6d 70 6c 65 3a | 20 64 65 72 69 76 65 0a | simple:| derive.|
|00000900| 61 20 63 6c 61 73 73 20 | 61 6e 64 20 64 65 66 69 |a class |and defi|
|00000910| 6e 65 20 6d 65 74 68 6f | 64 73 20 63 61 6c 6c 65 |ne metho|ds calle|
|00000920| 64 20 73 74 61 72 74 5f | 74 61 67 28 29 2c 0a 65 |d start_|tag(),.e|
|00000930| 6e 64 5f 74 61 67 28 29 | 2c 20 6f 72 20 64 6f 5f |nd_tag()|, or do_|
|00000940| 74 61 67 28 29 2e 20 20 | 54 68 65 20 70 61 72 73 |tag(). |The pars|
|00000950| 65 72 20 77 69 6c 6c 0a | 63 61 6c 6c 20 74 68 65 |er will.|call the|
|00000960| 73 65 20 61 74 20 61 70 | 70 72 6f 70 72 69 61 74 |se at ap|propriat|
|00000970| 65 20 6d 6f 6d 65 6e 74 | 73 3a 20 73 74 61 72 74 |e moment|s: start|
|00000980| 5f 74 61 67 20 6f 72 0a | 64 6f 5f 74 61 67 20 69 |_tag or.|do_tag i|
|00000990| 73 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 20 61 6e |s called| when an|
|000009a0| 20 6f 70 65 6e 69 6e 67 | 20 74 61 67 20 6f 66 20 | opening| tag of |
|000009b0| 74 68 65 20 66 6f 72 6d | 0a 26 6c 74 3b 74 61 67 |the form|.&lt;tag|
|000009c0| 20 2e 2e 2e 26 67 74 3b | 20 69 73 20 65 6e 63 6f | ...&gt;| is enco|
|000009d0| 75 6e 74 65 72 65 64 3b | 20 65 6e 64 5f 74 61 67 |untered;| end_tag|
|000009e0| 20 69 73 20 63 61 6c 6c | 65 64 0a 77 68 65 6e 20 | is call|ed.when |
|000009f0| 61 20 63 6c 6f 73 69 6e | 67 20 74 61 67 20 6f 66 |a closin|g tag of|
|00000a00| 20 74 68 65 20 66 6f 72 | 6d 20 26 6c 74 3b 74 61 | the for|m &lt;ta|
|00000a10| 67 26 67 74 3b 20 69 73 | 20 65 6e 63 6f 75 6e 74 |g&gt; is| encount|
|00000a20| 65 72 65 64 2e 20 20 49 | 66 0a 61 6e 20 6f 70 65 |ered. I|f.an ope|
|00000a30| 6e 69 6e 67 20 74 61 67 | 20 72 65 71 75 69 72 65 |ning tag| require|
|00000a40| 73 20 61 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |s a corr|espondin|
|00000a50| 67 20 63 6c 6f 73 69 6e | 67 20 74 61 67 2c 20 6c |g closin|g tag, l|
|00000a60| 69 6b 65 20 26 6c 74 3b | 48 31 26 67 74 3b 0a 2e |ike &lt;|H1&gt;..|
|00000a70| 2e 2e 20 26 6c 74 3b 2f | 48 31 26 67 74 3b 2c 20 |.. &lt;/|H1&gt;, |
|00000a80| 74 68 65 20 63 6c 61 73 | 73 20 73 68 6f 75 6c 64 |the clas|s should|
|00000a90| 20 64 65 66 69 6e 65 20 | 74 68 65 20 73 74 61 72 | define |the star|
|00000aa0| 74 5f 74 61 67 0a 6d 65 | 74 68 6f 64 3b 20 69 66 |t_tag.me|thod; if|
|00000ab0| 20 61 20 74 61 67 20 72 | 65 71 75 69 72 65 73 20 | a tag r|equires |
|00000ac0| 6e 6f 20 63 6c 6f 73 69 | 6e 67 20 74 61 67 2c 20 |no closi|ng tag, |
|00000ad0| 6c 69 6b 65 20 26 6c 74 | 3b 50 26 67 74 3b 2c 20 |like &lt|;P&gt;, |
|00000ae0| 74 68 65 20 63 6c 61 73 | 73 0a 73 68 6f 75 6c 64 |the clas|s.should|
|00000af0| 20 64 65 66 69 6e 65 20 | 74 68 65 20 64 6f 5f 74 | define |the do_t|
|00000b00| 61 67 20 6d 65 74 68 6f | 64 2e 0a 0a 3c 50 3e 0a |ag metho|d...<P>.|
|00000b10| 3c 2f 4c 49 3e 0a 3c 2f | 55 4c 3e 0a 0a 3c 50 3e |</LI>.</|UL>..<P>|
|00000b20| 0a 54 68 65 20 6d 6f 64 | 75 6c 65 20 64 65 66 69 |.The mod|ule defi|
|00000b30| 6e 65 73 20 61 20 73 69 | 6e 67 6c 65 20 63 6c 61 |nes a si|ngle cla|
|00000b40| 73 73 3a 0a 0a 3c 50 3e | 0a 3c 42 52 3e 0a 3c 49 |ss:..<P>|.<BR>.<I|
|00000b50| 4d 47 0a 20 20 53 54 59 | 4c 45 3d 22 68 65 69 67 |MG. STY|LE="heig|
|00000b60| 68 74 3a 20 31 39 36 2e | 32 35 65 78 3b 20 76 65 |ht: 196.|25ex; ve|
|00000b70| 72 74 69 63 61 6c 2d 61 | 6c 69 67 6e 3a 20 2d 30 |rtical-a|lign: -0|
|00000b80| 2e 37 30 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.70ex; "| SRC="im|
|00000b90| 67 31 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g1.png".| ALT="\b|
|00000ba0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 48 |egin{fun|cdesc}{H|
|00000bb0| 54 4d 4c 50 61 72 73 65 | 72 7d 7b 66 6f 72 6d 61 |TMLParse|r}{forma|
|00000bc0| 74 74 65 72 7d 0a 54 68 | 69 73 20 69 73 20 74 68 |tter}.Th|is is th|
|00000bd0| 65 20 62 61 73 69 63 20 | 48 54 4d 4c 20 70 61 72 |e basic |HTML par|
|00000be0| 73 65 72 20 63 6c 61 73 | 73 2e 20 49 74 20 2e 2e |ser clas|s. It ..|
|00000bf0| 2e 0a 2e 2e 2e 6e 65 73 | 0a 68 61 6e 64 6c 65 72 |.....nes|.handler|
|00000c00| 73 20 66 6f 72 20 61 6c | 6c 20 48 54 4d 4c 20 32 |s for al|l HTML 2|
|00000c10| 2e 30 20 61 6e 64 20 6d | 61 6e 79 20 48 54 4d 4c |.0 and m|any HTML|
|00000c20| 20 33 2e 30 20 61 6e 64 | 20 33 2e 32 20 65 6c 65 | 3.0 and| 3.2 ele|
|00000c30| 6d 65 6e 74 73 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |ments..\|end{func|
|00000c40| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|00000c50| 3e 0a 49 6e 20 61 64 64 | 69 74 69 6f 6e 20 74 6f |>.In add|ition to|
|00000c60| 20 74 61 67 20 6d 65 74 | 68 6f 64 73 2c 20 74 68 | tag met|hods, th|
|00000c70| 65 20 48 54 4d 4c 50 61 | 72 73 65 72 20 63 6c 61 |e HTMLPa|rser cla|
|00000c80| 73 73 20 70 72 6f 76 69 | 64 65 73 20 73 6f 6d 65 |ss provi|des some|
|00000c90| 0a 61 64 64 69 74 69 6f | 6e 61 6c 20 6d 65 74 68 |.additio|nal meth|
|00000ca0| 6f 64 73 20 61 6e 64 20 | 69 6e 73 74 61 6e 63 65 |ods and |instance|
|00000cb0| 20 76 61 72 69 61 62 6c | 65 73 20 66 6f 72 20 75 | variabl|es for u|
|00000cc0| 73 65 20 77 69 74 68 69 | 6e 20 74 61 67 20 6d 65 |se withi|n tag me|
|00000cd0| 74 68 6f 64 73 2e 0a 0a | 3c 50 3e 0a 0a 3c 50 3e |thods...|<P>..<P>|
|00000ce0| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00000cf0| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 32 2e 31 37 |LE="heig|ht: 2.17|
|00000d00| 65 78 3b 20 76 65 72 74 | 69 63 61 6c 2d 61 6c 69 |ex; vert|ical-ali|
|00000d10| 67 6e 3a 20 31 37 36 2e | 35 34 65 78 3b 20 22 20 |gn: 176.|54ex; " |
|00000d20| 53 52 43 3d 22 69 6d 67 | 32 2e 70 6e 67 22 0a 20 |SRC="img|2.png". |
|00000d30| 41 4c 54 3d 22 5c 62 65 | 67 69 6e 7b 64 61 74 61 |ALT="\be|gin{data|
|00000d40| 64 65 73 63 7d 7b 66 6f | 72 6d 61 74 74 65 72 7d |desc}{fo|rmatter}|
|00000d50| 0a 54 68 69 73 20 69 73 | 20 74 68 65 20 66 6f 72 |.This is| the for|
|00000d60| 6d 61 74 74 65 72 20 69 | 6e 73 74 61 6e 63 65 20 |matter i|nstance |
|00000d70| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00000d80| 74 68 65 20 70 61 72 73 | 65 72 2e 0a 5c 65 6e 64 |the pars|er..\end|
|00000d90| 7b 64 61 74 61 64 65 73 | 63 7d 22 3e 0a 3c 42 52 |{datades|c}">.<BR|
|00000da0| 3e 0a 0a 3c 50 3e 0a 3c | 42 52 3e 0a 3c 49 4d 47 |>..<P>.<|BR>.<IMG|
|00000db0| 0a 20 20 53 54 59 4c 45 | 3d 22 68 65 69 67 68 74 |. STYLE|="height|
|00000dc0| 3a 20 32 2e 31 37 65 78 | 3b 20 76 65 72 74 69 63 |: 2.17ex|; vertic|
|00000dd0| 61 6c 2d 61 6c 69 67 6e | 3a 20 31 37 36 2e 35 35 |al-align|: 176.55|
|00000de0| 65 78 3b 20 22 20 53 52 | 43 3d 22 69 6d 67 33 2e |ex; " SR|C="img3.|
|00000df0| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00000e00| 6e 7b 64 61 74 61 64 65 | 73 63 7d 7b 6e 6f 66 69 |n{datade|sc}{nofi|
|00000e10| 6c 6c 7d 0a 42 6f 6f 6c | 65 61 6e 20 66 6c 61 67 |ll}.Bool|ean flag|
|00000e20| 20 77 68 69 63 68 20 73 | 68 6f 75 6c 64 20 62 65 | which s|hould be|
|00000e30| 20 74 72 75 65 20 77 68 | 65 6e 20 77 68 69 74 65 | true wh|en white|
|00000e40| 73 70 61 63 65 20 73 68 | 6f 75 6c 2e 2e 2e 0a 2e |space sh|oul.....|
|00000e50| 2e 2e 65 63 74 73 20 74 | 68 65 20 6f 70 65 72 61 |..ects t|he opera|
|00000e60| 74 69 6f 6e 20 6f 66 20 | 5c 63 6f 64 65 7b 68 61 |tion of |\code{ha|
|00000e70| 6e 64 6c 65 5f 64 61 74 | 61 28 29 7d 20 61 6e 64 |ndle_dat|a()} and|
|00000e80| 20 5c 63 6f 64 65 7b 73 | 61 76 65 5f 65 6e 64 28 | \code{s|ave_end(|
|00000e90| 29 7d 2e 0a 5c 65 6e 64 | 7b 64 61 74 61 64 65 73 |)}..\end|{datades|
|00000ea0| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|00000eb0| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|00000ec0| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 31 37 65 78 |="height|: 2.17ex|
|00000ed0| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00000ee0| 3a 20 31 37 36 2e 34 31 | 65 78 3b 20 22 20 53 52 |: 176.41|ex; " SR|
|00000ef0| 43 3d 22 69 6d 67 34 2e | 70 6e 67 22 0a 20 41 4c |C="img4.|png". AL|
|00000f00| 54 3d 22 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |T="\begi|n{funcde|
|00000f10| 73 63 7d 7b 61 6e 63 68 | 6f 72 5f 62 67 6e 7d 7b |sc}{anch|or_bgn}{|
|00000f20| 68 72 65 66 5c 2c 20 6e | 61 6d 65 5c 2c 20 74 79 |href\, n|ame\, ty|
|00000f30| 70 65 7d 0a 54 68 69 73 | 20 6d 65 74 68 6f 64 20 |pe}.This| method |
|00000f40| 69 73 20 63 61 6c 6c 65 | 64 20 61 74 20 74 68 65 |is calle|d at the|
|00000f50| 20 73 74 2e 2e 2e 0a 2e | 2e 2e 20 68 79 70 65 72 | st.....|.. hyper|
|00000f60| 6c 69 6e 6b 73 20 69 73 | 20 61 76 61 69 6c 61 62 |links is| availab|
|00000f70| 6c 65 20 61 73 20 74 68 | 65 20 64 61 74 61 20 61 |le as th|e data a|
|00000f80| 74 74 72 69 62 75 74 65 | 20 5c 63 6f 64 65 7b 61 |ttribute| \code{a|
|00000f90| 6e 63 68 6f 72 6c 69 73 | 74 7d 2e 0a 5c 65 6e 64 |nchorlis|t}..\end|
|00000fa0| 7b 66 75 6e 63 64 65 73 | 63 7d 22 3e 0a 3c 42 52 |{funcdes|c}">.<BR|
|00000fb0| 3e 0a 0a 3c 50 3e 0a 3c | 42 52 3e 0a 3c 49 4d 47 |>..<P>.<|BR>.<IMG|
|00000fc0| 0a 20 20 53 54 59 4c 45 | 3d 22 68 65 69 67 68 74 |. STYLE|="height|
|00000fd0| 3a 20 32 2e 31 37 65 78 | 3b 20 76 65 72 74 69 63 |: 2.17ex|; vertic|
|00000fe0| 61 6c 2d 61 6c 69 67 6e | 3a 20 31 37 36 2e 34 31 |al-align|: 176.41|
|00000ff0| 65 78 3b 20 22 20 53 52 | 43 3d 22 69 6d 67 35 2e |ex; " SR|C="img5.|
|00001000| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00001010| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 61 6e 63 68 |n{funcde|sc}{anch|
|00001020| 6f 72 5f 65 6e 64 7d 7b | 7d 0a 54 68 69 73 20 6d |or_end}{|}.This m|
|00001030| 65 74 68 6f 64 20 69 73 | 20 63 61 6c 6c 65 64 20 |ethod is| called |
|00001040| 61 74 20 74 68 65 20 65 | 6e 64 20 6f 66 20 61 6e |at the e|nd of an|
|00001050| 20 61 6e 63 68 6f 72 20 | 72 65 67 2e 2e 2e 0a 2e | anchor |reg.....|
|00001060| 2e 2e 69 6e 64 65 78 20 | 69 6e 74 6f 20 74 68 65 |..index |into the|
|00001070| 0a 6c 69 73 74 20 6f 66 | 20 68 79 70 65 72 6c 69 |.list of| hyperli|
|00001080| 6e 6b 73 20 63 72 65 61 | 74 65 64 20 62 79 20 5c |nks crea|ted by \|
|00001090| 63 6f 64 65 7b 61 6e 63 | 68 6f 72 5f 62 67 6e 28 |code{anc|hor_bgn(|
|000010a0| 29 7d 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |)}..\end|{funcdes|
|000010b0| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|000010c0| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|000010d0| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 31 37 65 78 |="height|: 2.17ex|
|000010e0| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|000010f0| 3a 20 31 37 36 2e 34 31 | 65 78 3b 20 22 20 53 52 |: 176.41|ex; " SR|
|00001100| 43 3d 22 69 6d 67 36 2e | 70 6e 67 22 0a 20 41 4c |C="img6.|png". AL|
|00001110| 54 3d 22 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |T="\begi|n{funcde|
|00001120| 73 63 7d 7b 68 61 6e 64 | 6c 65 5f 69 6d 61 67 65 |sc}{hand|le_image|
|00001130| 7d 7b 73 6f 75 72 63 65 | 5c 2c 20 61 6c 74 5c 6f |}{source|\, alt\o|
|00001140| 70 74 69 6f 6e 61 6c 7b | 5c 2c 20 69 73 6d 61 70 |ptional{|\, ismap|
|00001150| 5c 6f 70 74 69 6f 6e 61 | 6c 7b 5c 2c 20 61 6c 69 |\optiona|l{\, ali|
|00001160| 67 6e 5c 2e 2e 2e 0a 2e | 2e 2e 79 20 70 61 73 73 |gn\.....|..y pass|
|00001170| 65 73 20 74 68 65 20 5c | 63 6f 64 65 7b 61 6c 74 |es the \|code{alt|
|00001180| 7d 20 76 61 6c 75 65 20 | 74 6f 20 74 68 65 20 5c |} value |to the \|
|00001190| 63 6f 64 65 7b 68 61 6e | 64 6c 65 5f 64 61 74 61 |code{han|dle_data|
|000011a0| 28 29 7d 0a 6d 65 74 68 | 6f 64 2e 0a 5c 65 6e 64 |()}.meth|od..\end|
|000011b0| 7b 66 75 6e 63 64 65 73 | 63 7d 22 3e 0a 3c 42 52 |{funcdes|c}">.<BR|
|000011c0| 3e 0a 0a 3c 50 3e 0a 3c | 42 52 3e 0a 3c 49 4d 47 |>..<P>.<|BR>.<IMG|
|000011d0| 0a 20 20 53 54 59 4c 45 | 3d 22 68 65 69 67 68 74 |. STYLE|="height|
|000011e0| 3a 20 32 2e 31 37 65 78 | 3b 20 76 65 72 74 69 63 |: 2.17ex|; vertic|
|000011f0| 61 6c 2d 61 6c 69 67 6e | 3a 20 31 37 36 2e 34 31 |al-align|: 176.41|
|00001200| 65 78 3b 20 22 20 53 52 | 43 3d 22 69 6d 67 37 2e |ex; " SR|C="img7.|
|00001210| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00001220| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 73 61 76 65 |n{funcde|sc}{save|
|00001230| 5f 62 67 6e 7d 7b 7d 0a | 42 65 67 69 6e 73 20 73 |_bgn}{}.|Begins s|
|00001240| 61 76 69 6e 67 20 63 68 | 61 72 61 63 74 65 72 20 |aving ch|aracter |
|00001250| 64 61 74 61 20 69 6e 20 | 61 20 62 75 66 66 65 72 |data in |a buffer|
|00001260| 20 69 6e 73 74 65 61 64 | 20 6f 66 2e 2e 2e 0a 2e | instead| of.....|
|00001270| 2e 2e 74 68 65 20 5c 63 | 6f 64 65 7b 73 61 76 65 |..the \c|ode{save|
|00001280| 5f 62 67 6e 28 29 7d 20 | 2f 20 5c 63 6f 64 65 7b |_bgn()} |/ \code{|
|00001290| 73 61 76 65 5f 65 6e 64 | 28 29 7d 20 70 61 69 72 |save_end|()} pair|
|000012a0| 20 6d 61 79 20 6e 6f 74 | 20 62 65 0a 6e 65 73 74 | may not| be.nest|
|000012b0| 65 64 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ed..\end|{funcdes|
|000012c0| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|000012d0| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|000012e0| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 31 37 65 78 |="height|: 2.17ex|
|000012f0| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00001300| 3a 20 31 37 36 2e 34 31 | 65 78 3b 20 22 20 53 52 |: 176.41|ex; " SR|
|00001310| 43 3d 22 69 6d 67 38 2e | 70 6e 67 22 0a 20 41 4c |C="img8.|png". AL|
|00001320| 54 3d 22 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |T="\begi|n{funcde|
|00001330| 73 63 7d 7b 73 61 76 65 | 5f 65 6e 64 7d 7b 7d 0a |sc}{save|_end}{}.|
|00001340| 45 6e 64 73 20 62 75 66 | 66 65 72 69 6e 67 20 63 |Ends buf|fering c|
|00001350| 68 61 72 61 63 74 65 72 | 20 64 61 74 61 20 61 6e |haracter| data an|
|00001360| 64 20 72 65 74 75 72 6e | 73 20 61 6c 6c 20 64 61 |d return|s all da|
|00001370| 74 61 20 2e 2e 2e 0a 2e | 2e 2e 61 6c 6c 20 74 6f |ta .....|..all to|
|00001380| 20 5c 63 6f 64 65 7b 73 | 61 76 65 5f 62 67 6e 28 | \code{s|ave_bgn(|
|00001390| 29 7d 20 77 69 6c 6c 20 | 72 61 69 73 65 20 61 0a |)} will |raise a.|
|000013a0| 5c 63 6f 64 65 7b 54 79 | 70 65 45 72 72 6f 72 7d |\code{Ty|peError}|
|000013b0| 20 65 78 63 65 70 74 69 | 6f 6e 2e 0a 5c 65 6e 64 | excepti|on..\end|
|000013c0| 7b 66 75 6e 63 64 65 73 | 63 7d 22 3e 0a 3c 42 52 |{funcdes|c}">.<BR|
|000013d0| 3e 0a 3c 48 52 3e 0a 0a | 3c 2f 42 4f 44 59 3e 0a |>.<HR>..|</BODY>.|
|000013e0| 3c 2f 48 54 4d 4c 3e 0a | |</HTML>.| |
+--------+-------------------------+-------------------------+--------+--------+