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>&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>&$sgml'OpenTagFunc($gi, $attribute_list);</code></dd>
<dt>An end tag</dt>
<dd><code>&$sgml'EndTagFunc($gi);</code></dd>
<dt>A comment</dt>
<dd><code>&$sgml'CommentFunc(*comment_text);</code></dd>
<dt>Processing instruction</dt>
<dd><code>&$sgml'ProcInsFunc(*pi_text);</code></dd>
<dt>Character data</dt>
<dd><code>&$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><!SGML ...></code>'. It is
designed to parse SGML instances. If a "<code><!</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
<URL:<a href="file:/usr/doc/perlsgml/perlSGML.html"
>file:/usr/doc/perlsgml/perlSGML.html</a>>
</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/hood">Earl Hood</a>
<<a href="mailto:ehood@medusa.acs.uci.edu"
>ehood@medusa.acs.uci.edu</a>><br>
</address>
<!-- =================================================================== -->
<hr>
</body>
</html>
|