perlSGML.1997Sep

 view release on metacpan or  search on metacpan

doc/sgml.pl.sgml  view on Meta::CPAN

<!-- =================================================================== -->
<!--	@(#)  sgml.pl.sgml 1.3 96/10/07 @(#)
  -->
<!-- =================================================================== -->

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN" [
    <!ENTITY % perlSGML PUBLIC "-//EWH//ENTITIES perlSGML Modules//EN" >
    %perlSGML;
]>
<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;
&author;

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



( run in 0.683 second using v1.01-cache-2.11-cpan-5837b0d9d2c )