home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
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 74 65 78 2e 63 | 73 73 22 3e 0a 0a 3c 4c |F="tex.c|ss">..<L|
|000001b0| 49 4e 4b 20 52 45 4c 3d | 22 70 72 65 76 69 6f 75 |INK REL=|"previou|
|000001c0| 73 22 20 48 52 45 46 3d | 22 74 65 78 5f 6d 6e 2e |s" HREF=|"tex_mn.|
|000001d0| 68 74 6d 6c 22 3e 0a 3c | 4c 49 4e 4b 20 52 45 4c |html">.<|LINK REL|
|000001e0| 3d 22 75 70 22 20 48 52 | 45 46 3d 22 74 65 78 5f |="up" HR|EF="tex_|
|000001f0| 6d 6e 2e 68 74 6d 6c 22 | 3e 0a 3c 2f 48 45 41 44 |mn.html"|>.</HEAD|
|00000200| 3e 0a 20 0a 3c 42 4f 44 | 59 20 62 67 63 6f 6c 6f |>. .<BOD|Y bgcolo|
|00000210| 72 3d 22 23 66 66 66 66 | 66 66 22 20 74 65 78 74 |r="#ffff|ff" text|
|00000220| 3d 22 23 30 30 30 30 30 | 30 22 20 6c 69 6e 6b 3d |="#00000|0" link=|
|00000230| 22 23 39 39 34 34 45 45 | 22 20 76 6c 69 6e 6b 3d |"#9944EE|" vlink=|
|00000240| 22 23 30 30 30 30 66 66 | 22 20 61 6c 69 6e 6b 3d |"#0000ff|" alink=|
|00000250| 22 23 30 30 66 66 30 30 | 22 3e 0a 0a 3c 48 31 3e |"#00ff00|">..<H1>|
|00000260| 3c 41 20 49 44 3d 22 53 | 45 43 54 49 4f 4e 30 30 |<A ID="S|ECTION00|
|00000270| 30 31 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |01000000|00000000|
|00000280| 30 30 22 3e 0a 53 74 61 | 6e 64 61 72 64 20 4d 6f |00">.Sta|ndard Mo|
|00000290| 64 75 6c 65 20 68 74 6d | 6c 6c 69 62 3c 2f 41 3e |dule htm|llib</A>|
|000002a0| 0a 3c 2f 48 31 3e 0a 68 | 74 6d 6c 6c 69 62 0a 3c |.</H1>.h|tmllib.<|
|000002b0| 41 20 49 44 3d 22 33 22 | 3e 3c 2f 41 3e 0a 3c 41 |A ID="3"|></A>.<A|
|000002c0| 20 49 44 3d 22 34 22 3e | 3c 2f 41 3e 0a 0a 3c 50 | ID="4">|</A>..<P|
|000002d0| 3e 0a 0a 3c 50 3e 0a 54 | 68 69 73 20 6d 6f 64 75 |>..<P>.T|his modu|
|000002e0| 6c 65 20 64 65 66 69 6e | 65 73 20 61 20 63 6c 61 |le defin|es a cla|
|000002f0| 73 73 20 77 68 69 63 68 | 20 63 61 6e 20 73 65 72 |ss which| can ser|
|00000300| 76 65 20 61 73 20 61 20 | 62 61 73 65 20 66 6f 72 |ve as a |base for|
|00000310| 20 70 61 72 73 69 6e 67 | 20 74 65 78 74 0a 66 69 | parsing| text.fi|
|00000320| 6c 65 73 20 66 6f 72 6d | 61 74 74 65 64 20 69 6e |les form|atted in|
|00000330| 20 74 68 65 20 48 79 70 | 65 72 54 65 78 74 20 4d | the Hyp|erText M|
|00000340| 61 72 6b 2d 75 70 20 4c | 61 6e 67 75 61 67 65 20 |ark-up L|anguage |
|00000350| 28 48 54 4d 4c 29 2e 20 | 20 54 68 65 20 63 6c 61 |(HTML). | The cla|
|00000360| 73 73 0a 69 73 20 6e 6f | 74 20 64 69 72 65 63 74 |ss.is no|t direct|
|00000370| 6c 79 20 63 6f 6e 63 65 | 72 6e 65 64 20 77 69 74 |ly conce|rned wit|
|00000380| 68 20 49 2f 4f 20 26 6d | 64 61 73 68 3b 20 69 74 |h I/O &m|dash; it|
|00000390| 20 6d 75 73 74 20 62 65 | 20 70 72 6f 76 69 64 65 | must be| provide|
|000003a0| 64 20 77 69 74 68 20 69 | 6e 70 75 74 0a 69 6e 20 |d with i|nput.in |
|000003b0| 73 74 72 69 6e 67 20 66 | 6f 72 6d 20 76 69 61 20 |string f|orm via |
|000003c0| 61 20 6d 65 74 68 6f 64 | 2c 20 61 6e 64 20 6d 61 |a method|, and ma|
|000003d0| 6b 65 73 20 63 61 6c 6c | 73 20 74 6f 20 6d 65 74 |kes call|s to met|
|000003e0| 68 6f 64 73 20 6f 66 20 | 61 0a 60 60 66 6f 72 6d |hods of |a.``form|
|000003f0| 61 74 74 65 72 27 27 20 | 6f 62 6a 65 63 74 20 69 |atter'' |object i|
|00000400| 6e 20 6f 72 64 65 72 20 | 74 6f 20 70 72 6f 64 75 |n order |to produ|
|00000410| 63 65 20 6f 75 74 70 75 | 74 2e 20 20 54 68 65 0a |ce outpu|t. The.|
|00000420| 48 54 4d 4c 50 61 72 73 | 65 72 20 63 6c 61 73 73 |HTMLPars|er class|
|00000430| 20 69 73 20 64 65 73 69 | 67 6e 65 64 20 74 6f 20 | is desi|gned to |
|00000440| 62 65 20 75 73 65 64 20 | 61 73 20 61 20 62 61 73 |be used |as a bas|
|00000450| 65 20 63 6c 61 73 73 20 | 66 6f 72 0a 6f 74 68 65 |e class |for.othe|
|00000460| 72 20 63 6c 61 73 73 65 | 73 20 69 6e 20 6f 72 64 |r classe|s in ord|
|00000470| 65 72 20 74 6f 20 61 64 | 64 20 66 75 6e 63 74 69 |er to ad|d functi|
|00000480| 6f 6e 61 6c 69 74 79 2c | 20 61 6e 64 20 61 6c 6c |onality,| and all|
|00000490| 6f 77 73 20 6d 6f 73 74 | 20 6f 66 20 69 74 73 0a |ows most| of its.|
|000004a0| 6d 65 74 68 6f 64 73 20 | 74 6f 20 62 65 20 65 78 |methods |to be ex|
|000004b0| 74 65 6e 64 65 64 20 6f | 72 20 6f 76 65 72 72 69 |tended o|r overri|
|000004c0| 64 64 65 6e 2e 20 20 49 | 6e 20 74 75 72 6e 2c 20 |dden. I|n turn, |
|000004d0| 74 68 69 73 20 63 6c 61 | 73 73 20 69 73 20 64 65 |this cla|ss is de|
|000004e0| 72 69 76 65 64 0a 66 72 | 6f 6d 20 61 6e 64 20 65 |rived.fr|om and e|
|000004f0| 78 74 65 6e 64 73 20 74 | 68 65 20 53 47 4d 4c 50 |xtends t|he SGMLP|
|00000500| 61 72 73 65 72 20 63 6c | 61 73 73 20 64 65 66 69 |arser cl|ass defi|
|00000510| 6e 65 64 20 69 6e 20 6d | 6f 64 75 6c 65 0a 73 67 |ned in m|odule.sg|
|00000520| 6d 6c 6c 69 62 2e 20 20 | 54 77 6f 20 69 6d 70 6c |mllib. |Two impl|
|00000530| 65 6d 65 6e 74 61 74 69 | 6f 6e 73 20 6f 66 20 66 |ementati|ons of f|
|00000540| 6f 72 6d 61 74 74 65 72 | 20 6f 62 6a 65 63 74 73 |ormatter| objects|
|00000550| 20 61 72 65 0a 70 72 6f | 76 69 64 65 64 20 69 6e | are.pro|vided in|
|00000560| 20 74 68 65 20 66 6f 72 | 6d 61 74 74 65 72 20 6d | the for|matter m|
|00000570| 6f 64 75 6c 65 3b 20 72 | 65 66 65 72 20 74 6f 20 |odule; r|efer to |
|00000580| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|00000590| 6e 0a 66 6f 72 20 74 68 | 61 74 20 6d 6f 64 75 6c |n.for th|at modul|
|000005a0| 65 20 66 6f 72 20 69 6e | 66 6f 72 6d 61 74 69 6f |e for in|formatio|
|000005b0| 6e 20 6f 6e 20 74 68 65 | 20 66 6f 72 6d 61 74 74 |n on the| formatt|
|000005c0| 65 72 20 69 6e 74 65 72 | 66 61 63 65 2e 0a 3c 41 |er inter|face..<A|
|000005d0| 20 49 44 3d 22 31 31 22 | 3e 3c 2f 41 3e 0a 73 67 | ID="11"|></A>.sg|
|000005e0| 6d 6c 6c 69 62 0a 53 47 | 4d 4c 50 61 72 73 65 72 |mllib.SG|MLParser|
|000005f0| 0a 3c 41 20 49 44 3d 22 | 31 34 22 3e 3c 2f 41 3e |.<A ID="|14"></A>|
|00000600| 0a 66 6f 72 6d 61 74 74 | 65 72 0a 0a 3c 50 3e 0a |.formatt|er..<P>.|
|00000610| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |The foll|owing is|
|00000620| 20 61 20 73 75 6d 6d 61 | 72 79 20 6f 66 20 74 68 | a summa|ry of th|
|00000630| 65 20 69 6e 74 65 72 66 | 61 63 65 20 64 65 66 69 |e interf|ace defi|
|00000640| 6e 65 64 20 62 79 0a 73 | 67 6d 6c 6c 69 62 2e 53 |ned by.s|gmllib.S|
|00000650| 47 4d 4c 50 61 72 73 65 | 72 3a 0a 0a 3c 50 3e 0a |GMLParse|r:..<P>.|
|00000660| 0a 3c 55 4c 3e 0a 3c 4c | 49 3e 54 68 65 20 69 6e |.<UL>.<L|I>The in|
|00000670| 74 65 72 66 61 63 65 20 | 74 6f 20 66 65 65 64 20 |terface |to feed |
|00000680| 64 61 74 61 20 74 6f 20 | 61 6e 20 69 6e 73 74 61 |data to |an insta|
|00000690| 6e 63 65 20 69 73 20 74 | 68 72 6f 75 67 68 20 74 |nce is t|hrough t|
|000006a0| 68 65 20 66 65 65 64 28 | 29 0a 6d 65 74 68 6f 64 |he feed(|).method|
|000006b0| 2c 20 77 68 69 63 68 20 | 74 61 6b 65 73 20 61 20 |, which |takes a |
|000006c0| 73 74 72 69 6e 67 20 61 | 72 67 75 6d 65 6e 74 2e |string a|rgument.|
|000006d0| 20 20 54 68 69 73 20 63 | 61 6e 20 62 65 20 63 61 | This c|an be ca|
|000006e0| 6c 6c 65 64 20 77 69 74 | 68 20 61 73 0a 6c 69 74 |lled wit|h as.lit|
|000006f0| 74 6c 65 20 6f 72 20 61 | 73 20 6d 75 63 68 20 74 |tle or a|s much t|
|00000700| 65 78 74 20 61 74 20 61 | 20 74 69 6d 65 20 61 73 |ext at a| time as|
|00000710| 20 64 65 73 69 72 65 64 | 3b 20 70 2e 66 65 65 64 | desired|; p.feed|
|00000720| 28 61 29 3b 0a 70 2e 66 | 65 65 64 28 62 29 20 68 |(a);.p.f|eed(b) h|
|00000730| 61 73 20 74 68 65 20 73 | 61 6d 65 20 65 66 66 65 |as the s|ame effe|
|00000740| 63 74 20 61 73 20 70 2e | 66 65 65 64 28 61 2b 62 |ct as p.|feed(a+b|
|00000750| 29 2e 20 20 57 68 65 6e | 20 74 68 65 20 64 61 74 |). When| the dat|
|00000760| 61 0a 63 6f 6e 74 61 69 | 6e 73 20 63 6f 6d 70 6c |a.contai|ns compl|
|00000770| 65 74 65 20 48 54 4d 4c | 20 74 61 67 73 2c 20 74 |ete HTML| tags, t|
|00000780| 68 65 73 65 20 61 72 65 | 20 70 72 6f 63 65 73 73 |hese are| process|
|00000790| 65 64 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 3b 0a |ed immed|iately;.|
|000007a0| 69 6e 63 6f 6d 70 6c 65 | 74 65 20 65 6c 65 6d 65 |incomple|te eleme|
|000007b0| 6e 74 73 20 61 72 65 20 | 73 61 76 65 64 20 69 6e |nts are |saved in|
|000007c0| 20 61 20 62 75 66 66 65 | 72 2e 20 20 54 6f 20 66 | a buffe|r. To f|
|000007d0| 6f 72 63 65 20 70 72 6f | 63 65 73 73 69 6e 67 20 |orce pro|cessing |
|000007e0| 6f 66 20 61 6c 6c 0a 75 | 6e 70 72 6f 63 65 73 73 |of all.u|nprocess|
|000007f0| 65 64 20 64 61 74 61 2c | 20 63 61 6c 6c 20 74 68 |ed data,| call th|
|00000800| 65 20 63 6c 6f 73 65 28 | 29 20 6d 65 74 68 6f 64 |e close(|) method|
|00000810| 2e 0a 0a 3c 50 3e 0a 46 | 6f 72 20 65 78 61 6d 70 |...<P>.F|or examp|
|00000820| 6c 65 2c 20 74 6f 20 70 | 61 72 73 65 20 74 68 65 |le, to p|arse the|
|00000830| 20 65 6e 74 69 72 65 20 | 63 6f 6e 74 65 6e 74 73 | entire |contents|
|00000840| 20 6f 66 20 61 20 66 69 | 6c 65 2c 20 75 73 65 3a | of a fi|le, use:|
|00000850| 0a 3c 50 52 45 3e 0a 70 | 61 72 73 65 72 2e 66 65 |.<PRE>.p|arser.fe|
|00000860| 65 64 28 6f 70 65 6e 28 | 27 6d 79 66 69 6c 65 2e |ed(open(|'myfile.|
|00000870| 68 74 6d 6c 27 29 2e 72 | 65 61 64 28 29 29 0a 70 |html').r|ead()).p|
|00000880| 61 72 73 65 72 2e 63 6c | 6f 73 65 28 29 0a 3c 2f |arser.cl|ose().</|
|00000890| 50 52 45 3e 0a 0a 3c 50 | 3e 0a 3c 2f 4c 49 3e 0a |PRE>..<P|>.</LI>.|
|000008a0| 3c 4c 49 3e 54 68 65 20 | 69 6e 74 65 72 66 61 63 |<LI>The |interfac|
|000008b0| 65 20 74 6f 20 64 65 66 | 69 6e 65 20 73 65 6d 61 |e to def|ine sema|
|000008c0| 6e 74 69 63 73 20 66 6f | 72 20 48 54 4d 4c 20 74 |ntics fo|r HTML t|
|000008d0| 61 67 73 20 69 73 20 76 | 65 72 79 20 73 69 6d 70 |ags is v|ery simp|
|000008e0| 6c 65 3a 20 64 65 72 69 | 76 65 0a 61 20 63 6c 61 |le: deri|ve.a cla|
|000008f0| 73 73 20 61 6e 64 20 64 | 65 66 69 6e 65 20 6d 65 |ss and d|efine me|
|00000900| 74 68 6f 64 73 20 63 61 | 6c 6c 65 64 20 73 74 61 |thods ca|lled sta|
|00000910| 72 74 5f 74 61 67 28 29 | 2c 0a 65 6e 64 5f 74 61 |rt_tag()|,.end_ta|
|00000920| 67 28 29 2c 20 6f 72 20 | 64 6f 5f 74 61 67 28 29 |g(), or |do_tag()|
|00000930| 2e 20 20 54 68 65 20 70 | 61 72 73 65 72 20 77 69 |. The p|arser wi|
|00000940| 6c 6c 0a 63 61 6c 6c 20 | 74 68 65 73 65 20 61 74 |ll.call |these at|
|00000950| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 6d 6f 6d | appropr|iate mom|
|00000960| 65 6e 74 73 3a 20 73 74 | 61 72 74 5f 74 61 67 20 |ents: st|art_tag |
|00000970| 6f 72 0a 64 6f 5f 74 61 | 67 20 69 73 20 63 61 6c |or.do_ta|g is cal|
|00000980| 6c 65 64 20 77 68 65 6e | 20 61 6e 20 6f 70 65 6e |led when| an open|
|00000990| 69 6e 67 20 74 61 67 20 | 6f 66 20 74 68 65 20 66 |ing tag |of the f|
|000009a0| 6f 72 6d 0a 26 6c 74 3b | 74 61 67 20 2e 2e 2e 26 |orm.<|tag ...&|
|000009b0| 67 74 3b 20 69 73 20 65 | 6e 63 6f 75 6e 74 65 72 |gt; is e|ncounter|
|000009c0| 65 64 3b 20 65 6e 64 5f | 74 61 67 20 69 73 20 63 |ed; end_|tag is c|
|000009d0| 61 6c 6c 65 64 0a 77 68 | 65 6e 20 61 20 63 6c 6f |alled.wh|en a clo|
|000009e0| 73 69 6e 67 20 74 61 67 | 20 6f 66 20 74 68 65 20 |sing tag| of the |
|000009f0| 66 6f 72 6d 20 26 6c 74 | 3b 74 61 67 26 67 74 3b |form <|;tag>|
|00000a00| 20 69 73 20 65 6e 63 6f | 75 6e 74 65 72 65 64 2e | is enco|untered.|
|00000a10| 20 20 49 66 0a 61 6e 20 | 6f 70 65 6e 69 6e 67 20 | If.an |opening |
|00000a20| 74 61 67 20 72 65 71 75 | 69 72 65 73 20 61 20 63 |tag requ|ires a c|
|00000a30| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 63 6c 6f |orrespon|ding clo|
|00000a40| 73 69 6e 67 20 74 61 67 | 2c 20 6c 69 6b 65 20 26 |sing tag|, like &|
|00000a50| 6c 74 3b 48 31 26 67 74 | 3b 0a 2e 2e 2e 20 26 6c |lt;H1>|;.... &l|
|00000a60| 74 3b 2f 48 31 26 67 74 | 3b 2c 20 74 68 65 20 63 |t;/H1>|;, the c|
|00000a70| 6c 61 73 73 20 73 68 6f | 75 6c 64 20 64 65 66 69 |lass sho|uld defi|
|00000a80| 6e 65 20 74 68 65 20 73 | 74 61 72 74 5f 74 61 67 |ne the s|tart_tag|
|00000a90| 0a 6d 65 74 68 6f 64 3b | 20 69 66 20 61 20 74 61 |.method;| if a ta|
|00000aa0| 67 20 72 65 71 75 69 72 | 65 73 20 6e 6f 20 63 6c |g requir|es no cl|
|00000ab0| 6f 73 69 6e 67 20 74 61 | 67 2c 20 6c 69 6b 65 20 |osing ta|g, like |
|00000ac0| 26 6c 74 3b 50 26 67 74 | 3b 2c 20 74 68 65 20 63 |<P>|;, the c|
|00000ad0| 6c 61 73 73 0a 73 68 6f | 75 6c 64 20 64 65 66 69 |lass.sho|uld defi|
|00000ae0| 6e 65 20 74 68 65 20 64 | 6f 5f 74 61 67 20 6d 65 |ne the d|o_tag me|
|00000af0| 74 68 6f 64 2e 0a 0a 3c | 50 3e 0a 3c 2f 4c 49 3e |thod...<|P>.</LI>|
|00000b00| 0a 3c 2f 55 4c 3e 0a 0a | 3c 50 3e 0a 54 68 65 20 |.</UL>..|<P>.The |
|00000b10| 6d 6f 64 75 6c 65 20 64 | 65 66 69 6e 65 73 20 61 |module d|efines a|
|00000b20| 20 73 69 6e 67 6c 65 20 | 63 6c 61 73 73 3a 0a 0a | single |class:..|
|00000b30| 3c 50 3e 0a 3c 42 52 3e | 0a 3c 49 4d 47 0a 20 20 |<P>.<BR>|.<IMG. |
|00000b40| 53 54 59 4c 45 3d 22 68 | 65 69 67 68 74 3a 20 31 |STYLE="h|eight: 1|
|00000b50| 39 36 2e 32 35 65 78 3b | 20 76 65 72 74 69 63 61 |96.25ex;| vertica|
|00000b60| 6c 2d 61 6c 69 67 6e 3a | 20 2d 30 2e 37 30 65 78 |l-align:| -0.70ex|
|00000b70| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 31 2e 70 6e |; " SRC=|"img1.pn|
|00000b80| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00000b90| 66 75 6e 63 64 65 73 63 | 7d 7b 48 54 4d 4c 50 61 |funcdesc|}{HTMLPa|
|00000ba0| 72 73 65 72 7d 7b 66 6f | 72 6d 61 74 74 65 72 7d |rser}{fo|rmatter}|
|00000bb0| 0a 54 68 69 73 20 69 73 | 20 74 68 65 20 62 61 73 |.This is| the bas|
|00000bc0| 69 63 20 48 54 4d 4c 20 | 70 61 72 73 65 72 20 63 |ic HTML |parser c|
|00000bd0| 6c 61 73 73 2e 20 49 74 | 20 2e 2e 2e 0a 2e 2e 2e |lass. It| .......|
|00000be0| 6e 65 73 0a 68 61 6e 64 | 6c 65 72 73 20 66 6f 72 |nes.hand|lers for|
|00000bf0| 20 61 6c 6c 20 48 54 4d | 4c 20 32 2e 30 20 61 6e | all HTM|L 2.0 an|
|00000c00| 64 20 6d 61 6e 79 20 48 | 54 4d 4c 20 33 2e 30 20 |d many H|TML 3.0 |
|00000c10| 61 6e 64 20 33 2e 32 20 | 65 6c 65 6d 65 6e 74 73 |and 3.2 |elements|
|00000c20| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00000c30| 22 3e 0a 3c 42 52 3e 0a | 0a 3c 50 3e 0a 49 6e 20 |">.<BR>.|.<P>.In |
|00000c40| 61 64 64 69 74 69 6f 6e | 20 74 6f 20 74 61 67 20 |addition| to tag |
|00000c50| 6d 65 74 68 6f 64 73 2c | 20 74 68 65 20 48 54 4d |methods,| the HTM|
|00000c60| 4c 50 61 72 73 65 72 20 | 63 6c 61 73 73 20 70 72 |LParser |class pr|
|00000c70| 6f 76 69 64 65 73 20 73 | 6f 6d 65 0a 61 64 64 69 |ovides s|ome.addi|
|00000c80| 74 69 6f 6e 61 6c 20 6d | 65 74 68 6f 64 73 20 61 |tional m|ethods a|
|00000c90| 6e 64 20 69 6e 73 74 61 | 6e 63 65 20 76 61 72 69 |nd insta|nce vari|
|00000ca0| 61 62 6c 65 73 20 66 6f | 72 20 75 73 65 20 77 69 |ables fo|r use wi|
|00000cb0| 74 68 69 6e 20 74 61 67 | 20 6d 65 74 68 6f 64 73 |thin tag| methods|
|00000cc0| 2e 0a 0a 3c 50 3e 0a 0a | 3c 50 3e 0a 3c 42 52 3e |...<P>..|<P>.<BR>|
|00000cd0| 0a 3c 49 4d 47 0a 20 20 | 53 54 59 4c 45 3d 22 68 |.<IMG. |STYLE="h|
|00000ce0| 65 69 67 68 74 3a 20 32 | 2e 31 37 65 78 3b 20 76 |eight: 2|.17ex; v|
|00000cf0| 65 72 74 69 63 61 6c 2d | 61 6c 69 67 6e 3a 20 31 |ertical-|align: 1|
|00000d00| 37 36 2e 35 34 65 78 3b | 20 22 20 53 52 43 3d 22 |76.54ex;| " SRC="|
|00000d10| 69 6d 67 32 2e 70 6e 67 | 22 0a 20 41 4c 54 3d 22 |img2.png|". ALT="|
|00000d20| 5c 62 65 67 69 6e 7b 64 | 61 74 61 64 65 73 63 7d |\begin{d|atadesc}|
|00000d30| 7b 66 6f 72 6d 61 74 74 | 65 72 7d 0a 54 68 69 73 |{formatt|er}.This|
|00000d40| 20 69 73 20 74 68 65 20 | 66 6f 72 6d 61 74 74 65 | is the |formatte|
|00000d50| 72 20 69 6e 73 74 61 6e | 63 65 20 61 73 73 6f 63 |r instan|ce assoc|
|00000d60| 69 61 74 65 64 20 77 69 | 74 68 20 74 68 65 20 70 |iated wi|th the p|
|00000d70| 61 72 73 65 72 2e 0a 5c | 65 6e 64 7b 64 61 74 61 |arser..\|end{data|
|00000d80| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|00000d90| 3e 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |>.<BR>.<|IMG. ST|
|00000da0| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 32 2e 31 |YLE="hei|ght: 2.1|
|00000db0| 37 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |7ex; ver|tical-al|
|00000dc0| 69 67 6e 3a 20 31 37 36 | 2e 35 35 65 78 3b 20 22 |ign: 176|.55ex; "|
|00000dd0| 20 53 52 43 3d 22 69 6d | 67 33 2e 70 6e 67 22 0a | SRC="im|g3.png".|
|00000de0| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 64 61 74 | ALT="\b|egin{dat|
|00000df0| 61 64 65 73 63 7d 7b 6e | 6f 66 69 6c 6c 7d 0a 42 |adesc}{n|ofill}.B|
|00000e00| 6f 6f 6c 65 61 6e 20 66 | 6c 61 67 20 77 68 69 63 |oolean f|lag whic|
|00000e10| 68 20 73 68 6f 75 6c 64 | 20 62 65 20 74 72 75 65 |h should| be true|
|00000e20| 20 77 68 65 6e 20 77 68 | 69 74 65 73 70 61 63 65 | when wh|itespace|
|00000e30| 20 73 68 6f 75 6c 2e 2e | 2e 0a 2e 2e 2e 65 63 74 | shoul..|.....ect|
|00000e40| 73 20 74 68 65 20 6f 70 | 65 72 61 74 69 6f 6e 20 |s the op|eration |
|00000e50| 6f 66 20 5c 63 6f 64 65 | 7b 68 61 6e 64 6c 65 5f |of \code|{handle_|
|00000e60| 64 61 74 61 28 29 7d 20 | 61 6e 64 20 5c 63 6f 64 |data()} |and \cod|
|00000e70| 65 7b 73 61 76 65 5f 65 | 6e 64 28 29 7d 2e 0a 5c |e{save_e|nd()}..\|
|00000e80| 65 6e 64 7b 64 61 74 61 | 64 65 73 63 7d 22 3e 0a |end{data|desc}">.|
|00000e90| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|00000ea0| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000eb0| 67 68 74 3a 20 32 2e 31 | 37 65 78 3b 20 76 65 72 |ght: 2.1|7ex; ver|
|00000ec0| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00000ed0| 2e 34 31 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.41ex; "| SRC="im|
|00000ee0| 67 34 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g4.png".| ALT="\b|
|00000ef0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 61 |egin{fun|cdesc}{a|
|00000f00| 6e 63 68 6f 72 5f 62 67 | 6e 7d 7b 68 72 65 66 5c |nchor_bg|n}{href\|
|00000f10| 2c 20 6e 61 6d 65 5c 2c | 20 74 79 70 65 7d 0a 54 |, name\,| type}.T|
|00000f20| 68 69 73 20 6d 65 74 68 | 6f 64 20 69 73 20 63 61 |his meth|od is ca|
|00000f30| 6c 6c 65 64 20 61 74 20 | 74 68 65 20 73 74 2e 2e |lled at |the st..|
|00000f40| 2e 0a 2e 2e 2e 20 68 79 | 70 65 72 6c 69 6e 6b 73 |..... hy|perlinks|
|00000f50| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 20 61 73 | is avai|lable as|
|00000f60| 20 74 68 65 20 64 61 74 | 61 20 61 74 74 72 69 62 | the dat|a attrib|
|00000f70| 75 74 65 20 5c 63 6f 64 | 65 7b 61 6e 63 68 6f 72 |ute \cod|e{anchor|
|00000f80| 6c 69 73 74 7d 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |list}..\|end{func|
|00000f90| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|00000fa0| 3e 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |>.<BR>.<|IMG. ST|
|00000fb0| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 32 2e 31 |YLE="hei|ght: 2.1|
|00000fc0| 37 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |7ex; ver|tical-al|
|00000fd0| 69 67 6e 3a 20 31 37 36 | 2e 34 31 65 78 3b 20 22 |ign: 176|.41ex; "|
|00000fe0| 20 53 52 43 3d 22 69 6d | 67 35 2e 70 6e 67 22 0a | SRC="im|g5.png".|
|00000ff0| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 66 75 6e | ALT="\b|egin{fun|
|00001000| 63 64 65 73 63 7d 7b 61 | 6e 63 68 6f 72 5f 65 6e |cdesc}{a|nchor_en|
|00001010| 64 7d 7b 7d 0a 54 68 69 | 73 20 6d 65 74 68 6f 64 |d}{}.Thi|s method|
|00001020| 20 69 73 20 63 61 6c 6c | 65 64 20 61 74 20 74 68 | is call|ed at th|
|00001030| 65 20 65 6e 64 20 6f 66 | 20 61 6e 20 61 6e 63 68 |e end of| an anch|
|00001040| 6f 72 20 72 65 67 2e 2e | 2e 0a 2e 2e 2e 69 6e 64 |or reg..|.....ind|
|00001050| 65 78 20 69 6e 74 6f 20 | 74 68 65 0a 6c 69 73 74 |ex into |the.list|
|00001060| 20 6f 66 20 68 79 70 65 | 72 6c 69 6e 6b 73 20 63 | of hype|rlinks c|
|00001070| 72 65 61 74 65 64 20 62 | 79 20 5c 63 6f 64 65 7b |reated b|y \code{|
|00001080| 61 6e 63 68 6f 72 5f 62 | 67 6e 28 29 7d 2e 0a 5c |anchor_b|gn()}..\|
|00001090| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 22 3e 0a |end{func|desc}">.|
|000010a0| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|000010b0| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|000010c0| 67 68 74 3a 20 32 2e 31 | 37 65 78 3b 20 76 65 72 |ght: 2.1|7ex; ver|
|000010d0| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|000010e0| 2e 34 31 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.41ex; "| SRC="im|
|000010f0| 67 36 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g6.png".| ALT="\b|
|00001100| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 68 |egin{fun|cdesc}{h|
|00001110| 61 6e 64 6c 65 5f 69 6d | 61 67 65 7d 7b 73 6f 75 |andle_im|age}{sou|
|00001120| 72 63 65 5c 2c 20 61 6c | 74 5c 6f 70 74 69 6f 6e |rce\, al|t\option|
|00001130| 61 6c 7b 5c 2c 20 69 73 | 6d 61 70 5c 6f 70 74 69 |al{\, is|map\opti|
|00001140| 6f 6e 61 6c 7b 5c 2c 20 | 61 6c 69 67 6e 5c 2e 2e |onal{\, |align\..|
|00001150| 2e 0a 2e 2e 2e 79 20 70 | 61 73 73 65 73 20 74 68 |.....y p|asses th|
|00001160| 65 20 5c 63 6f 64 65 7b | 61 6c 74 7d 20 76 61 6c |e \code{|alt} val|
|00001170| 75 65 20 74 6f 20 74 68 | 65 20 5c 63 6f 64 65 7b |ue to th|e \code{|
|00001180| 68 61 6e 64 6c 65 5f 64 | 61 74 61 28 29 7d 0a 6d |handle_d|ata()}.m|
|00001190| 65 74 68 6f 64 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |ethod..\|end{func|
|000011a0| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|000011b0| 3e 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |>.<BR>.<|IMG. ST|
|000011c0| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 32 2e 31 |YLE="hei|ght: 2.1|
|000011d0| 37 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |7ex; ver|tical-al|
|000011e0| 69 67 6e 3a 20 31 37 36 | 2e 34 31 65 78 3b 20 22 |ign: 176|.41ex; "|
|000011f0| 20 53 52 43 3d 22 69 6d | 67 37 2e 70 6e 67 22 0a | SRC="im|g7.png".|
|00001200| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 66 75 6e | ALT="\b|egin{fun|
|00001210| 63 64 65 73 63 7d 7b 73 | 61 76 65 5f 62 67 6e 7d |cdesc}{s|ave_bgn}|
|00001220| 7b 7d 0a 42 65 67 69 6e | 73 20 73 61 76 69 6e 67 |{}.Begin|s saving|
|00001230| 20 63 68 61 72 61 63 74 | 65 72 20 64 61 74 61 20 | charact|er data |
|00001240| 69 6e 20 61 20 62 75 66 | 66 65 72 20 69 6e 73 74 |in a buf|fer inst|
|00001250| 65 61 64 20 6f 66 2e 2e | 2e 0a 2e 2e 2e 74 68 65 |ead of..|.....the|
|00001260| 20 5c 63 6f 64 65 7b 73 | 61 76 65 5f 62 67 6e 28 | \code{s|ave_bgn(|
|00001270| 29 7d 20 2f 20 5c 63 6f | 64 65 7b 73 61 76 65 5f |)} / \co|de{save_|
|00001280| 65 6e 64 28 29 7d 20 70 | 61 69 72 20 6d 61 79 20 |end()} p|air may |
|00001290| 6e 6f 74 20 62 65 0a 6e | 65 73 74 65 64 2e 0a 5c |not be.n|ested..\|
|000012a0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 22 3e 0a |end{func|desc}">.|
|000012b0| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|000012c0| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|000012d0| 67 68 74 3a 20 32 2e 31 | 37 65 78 3b 20 76 65 72 |ght: 2.1|7ex; ver|
|000012e0| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|000012f0| 2e 34 31 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.41ex; "| SRC="im|
|00001300| 67 38 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g8.png".| ALT="\b|
|00001310| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 73 |egin{fun|cdesc}{s|
|00001320| 61 76 65 5f 65 6e 64 7d | 7b 7d 0a 45 6e 64 73 20 |ave_end}|{}.Ends |
|00001330| 62 75 66 66 65 72 69 6e | 67 20 63 68 61 72 61 63 |bufferin|g charac|
|00001340| 74 65 72 20 64 61 74 61 | 20 61 6e 64 20 72 65 74 |ter data| and ret|
|00001350| 75 72 6e 73 20 61 6c 6c | 20 64 61 74 61 20 2e 2e |urns all| data ..|
|00001360| 2e 0a 2e 2e 2e 61 6c 6c | 20 74 6f 20 5c 63 6f 64 |.....all| to \cod|
|00001370| 65 7b 73 61 76 65 5f 62 | 67 6e 28 29 7d 20 77 69 |e{save_b|gn()} wi|
|00001380| 6c 6c 20 72 61 69 73 65 | 20 61 0a 5c 63 6f 64 65 |ll raise| a.\code|
|00001390| 7b 54 79 70 65 45 72 72 | 6f 72 7d 20 65 78 63 65 |{TypeErr|or} exce|
|000013a0| 70 74 69 6f 6e 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |ption..\|end{func|
|000013b0| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 3c 48 52 |desc}">.|<BR>.<HR|
|000013c0| 3e 0a 0a 3c 2f 42 4f 44 | 59 3e 0a 3c 2f 48 54 4d |>..</BOD|Y>.</HTM|
|000013d0| 4c 3e 0a | |L>. | |
+--------+-------------------------+-------------------------+--------+--------+