File: sgml_pl.html

package info (click to toggle)
perlsgml 1996Oct09-6
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,452 kB
  • ctags: 792
  • sloc: perl: 4,639; makefile: 167
file content (87 lines) | stat: -rw-r--r-- 2,671 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<html>
<head>
<title>sgml.pl 1.0.0</title>
</head>
<body>

<!-- =================================================================== -->
<hr>
<h1>sgml.pl</h1>
<p><code>sgml.pl</code> is a Perl library that parses an SGML
document instance.
</p>

<!-- =================================================================== -->
<hr>
<h2><a name="usage">Usage</a></h2>
<p>If installed correctly, the following Perl statement can be used to
access the library routines:
</p>
<pre>
    require "sgml.pl";
</pre>

<!-- =================================================================== -->
<hr>
<h2><a name="routines">Routines</a></h2>
<h3>SGMLread_sgml</h3>
<p><code>&amp;SGMLread_sgml(</code><var>FILEHANDLE</var><code>);</code>
</p>
<p><code>SGMLread_sgml</code> reads SGML markup.  Callbacks are called
when certain events occur to do any processing on the data.  The
callbacks should be set before the call to <code>SGMLread_sgml</code>.
The following lists the events and the callback invoked:
</p>
<dl>
<dt>An open tag</dt>
<dd><code>&amp;$sgml'OpenTagFunc($gi, $attribute_list);</code></dd>
<dt>An end tag</dt>
<dd><code>&amp;$sgml'EndTagFunc($gi);</code></dd>
<dt>A comment</dt>
<dd><code>&amp;$sgml'CommentFunc(*comment_text);</code></dd>
<dt>Processing instruction</dt>
<dd><code>&amp;$sgml'ProcInsFunc(*pi_text);</code></dd>
<dt>Character data</dt>
<dd><code>&amp;$sgml'CdataFunc(*cdata);</code></dd>
</dl>

<h4>Notes</h4>
<ul>
<li><p><code>SGMLread_sgml</code> is not intended to parse a DTD, or an
SGML declaration statement, '<code>&lt;!SGML ...&gt;</code>'.  It is
designed to parse SGML instances.  If a "<code>&lt;!</code>" sequence
is encountered (and not part of a comment declaration,
<code>SGMLread_sgml</code> tries to ignore the declaration.
</p></li>
<li><p>Marked sections are not recognized.
</p></li>
<li><p>The <code>$sgml'CdataFunc</code> may be called consective times for
a contiguous character data segment.
</p></li>
</ul>

<!-- =================================================================== -->
<!--	@(#)  avail.mod 1.1 96/09/30 @(#)
  -->
<hr>
<h2><a name="availability">Availability</a></h2>
<p>This program is part of the <em>perlSGML</em> package; see
&lt;URL:<a href="http://www.oac.uci.edu/indiv/ehood/perlSGML.html"
>http://www.oac.uci.edu/indiv/ehood/perlSGML.html</a>&gt;
</p>

<!--	@(#)  author.mod 1.1 96/09/30 @(#)
  -->
<hr>
<h2><a name="author">Author</a></h2>
<address>
<a href="http://www.oac.uci.edu/indiv/ehood/">Earl Hood</a>
&lt;<a href="mailto:ehood@medusa.acs.uci.edu"
>ehood@medusa.acs.uci.edu</a>&gt;<br>
</address>


<!-- =================================================================== -->
<hr>
</body>
</html>