actual/packages/node-libofx/OpenSP-1.5.2/doc/spam.htm

257 lines
7.1 KiB
HTML
Raw Normal View History

2022-04-29 02:44:38 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
<HTML>
<HEAD>
<TITLE>OSPAM</TITLE>
</HEAD>
<BODY>
<H1>OSPAM</H1>
<H4>
An SGML System Conforming to International Standard ISO 8879 --
Standard Generalized Markup Language
</H4>
<H4>
An SGML Extended Facilities system conforming to
Annex A of International Standard ISO/IEC 10744 --
Hypermedia/Time-based Structuring Language
</H4>
<H2>
SYNOPSIS
</H2>
<P>
<CODE>ospam</CODE> [ <CODE>option...</CODE> ] <CODE><VAR>sysid...</VAR></CODE>
<H2>DESCRIPTION</H2>
<P>
Ospam (SP Add Markup) is an SGML markup stream editor implemented using the
OpenSP parser. Ospam parses the SGML document contained in
<CODE><VAR>sysid...</VAR></CODE> and copies to the standard output the portion
of the document entity containing the document instance, adding or changing
markup as specified by the <CODE>-m</CODE> options. The <CODE>-p</CODE> option
can be used to include the SGML declaration and prolog in the output. The
<CODE>-o</CODE> option can be used to output other entities. The
<CODE>-x</CODE> option can be used to expand entity references.
<H2>OPTIONS</H2>
<P>
The following options are available:
<DL>
<DT>
<CODE>-c<VAR>sysid</VAR></CODE>,
<CODE>--catalog=<VAR>sysid</VAR></CODE>,
<DD>
Use the catalog entry file <CODE><VAR>sysid</VAR></CODE>.
<DT>
<CODE>-C</CODE>,
<CODE>--catalogs</CODE>
<DD>
This has the same effect as in <A HREF="nsgmls.htm#optC">onsgmls</A>.
<DT>
<CODE>-D<VAR>directory</VAR></CODE>,
<CODE>--directory=<VAR>directory</VAR></CODE>
<DD>
Search <CODE><VAR>directory</VAR></CODE> for files specified in system
identifiers. This has the same effect as in
<A HREF="nsgmls.htm#optD">onsgmls</A>.
<DT>
<CODE>-e</CODE>,
<CODE>--open-entities</CODE>
<DD>
Describe open entities in error messages.
<DT>
<CODE>-f<VAR>file</VAR></CODE>,
<CODE>--error-file=<VAR>file</VAR></CODE>
<DD>
Redirect errors to <CODE><VAR>file</VAR></CODE>.
This is useful mainly with shells that do not support redirection
of stderr.
<DT>
<CODE>--help</CODE>
<DD>Show a help message and exit.
<DT>
<CODE>-h</CODE>,
<CODE>--hoist-omitted-tags</CODE>
<DD>
Hoist omitted tags out from the start of internal entities.
If the text at the beginning of an internal entity causes
a tag to be implied, the tag will usually be treated as being in that
internal entity; this option will instead cause it to be treated as
being in the entity that referenced the internal entity.
This option makes a difference in conjunction with
<CODE>-momittag</CODE>
or
<CODE>-x -x</CODE>.
<DT>
<CODE>-i<VAR>name</VAR></CODE>,
<CODE>--include=<VAR>name</VAR></CODE>
<DD>
This has the same effect as in <A HREF="nsgmls.htm#opti">onsgmls</A>.
<DT>
<CODE>-l</CODE>,
<CODE>--lowercase</CODE>
<DD>
Prefer lower-case.
Added names that were subject to upper-case substitution
will be converted to lower-case.
<DT>
<CODE>-m<VAR>option</VAR></CODE>,
<CODE>--markup-option=<VAR>option</VAR></CODE>
<DD>
Change the markup in the output according to the value
of <CODE><VAR>option</VAR></CODE> as follows:
<DL>
<DT>
<CODE>omittag</CODE>
<DD>
Add tags that were omitted using omitted tag minimization.
End tags that were omitted because the element has
a declared content of <SAMP>EMPTY</SAMP>
or an explicit content reference
will not be added.
<DT>
<CODE>shortref</CODE>
<DD>
Replace short references by named entity references.
<DT>
<CODE>net</CODE>
<DD>
Change null end-tags
into unminimized end-tags,
and change net-enabling start-tags
into unminimized start-tags.
<DT>
<CODE>emptytag</CODE>
<DD>
Change empty tags into unminimized tags.
<DT>
<CODE>unclosed</CODE>
<DD>
Change unclosed tags into unminimized tags.
<DT>
<CODE>attname</CODE>
<DD>
Add omitted attribute names and
<CODE>vi</CODE>s.
<DT>
<CODE>attvalue</CODE>
<DD>
Add literal delimiters omitted from attribute values.
<DT>
<CODE>attspec</CODE>
<DD>
Add omitted attribute specifications.
<DT>
<CODE>current</CODE>
<DD>
Add omitted attribute specifications for current attributes.
This option is implied by the
<CODE>attspec</CODE>
option.
<DT>
<CODE>shorttag</CODE>
<DD>
Equivalent to combination of
<CODE>net</CODE>,
<CODE>emptytag</CODE>,
<CODE>unclosed</CODE>,
<CODE>attname</CODE>,
<CODE>attvalue</CODE>
and
<CODE>attspec</CODE>
options.
<DT>
<CODE>rank</CODE>
<DD>
Add omitted rank suffixes.
<DT>
<CODE>reserved</CODE>
<DD>
Put reserved names in upper-case.
<DT>
<CODE>ms</CODE>
<DD>
Remove marked section declarations whose effective status
is IGNORE, and replace each marked section declaration
whose effective status is INCLUDE by its marked section.
In the document instance, empty comments will be added
before or after the marked section declaration to ensure
that ignored record ends remain ignored.
</DL>
<P>
Multiple
<CODE>-m</CODE>
options are allowed.
<DT>
<CODE>-o<VAR>name</VAR></CODE>,
<CODE>--output-entity=<VAR>name</VAR></CODE>
<DD>
Output the general entity <CODE><VAR>name</VAR></CODE> instead of
the document entity. The output will correspond to the first time
that the entity is referenced in content.
<DT>
<CODE>-p</CODE>,
<CODE>-output-prolog</CODE>
<DD>
Output the part of the document entity containing the SGML declaration
(if it was explicitly present in the document entity)
and the prolog before anything else.
If this option is specified two or more times,
then all entity references occurring between declarations
in the prolog will be expanded;
this includes the implicit reference to the entity
containing the external subset of the DTD, if there is one.
Note that the SGML declaration will not be included if it was
specified by an SGMLDECL entry in a catalog.
<DT>
<CODE>-r</CODE>,
<CODE>--raw</CODE>
<DD>
Don't perform any conversion on RSs and REs when outputting the entity.
The entity would typically have the storage manager attribute
<CODE>records=asis</CODE>.
<DT>
<CODE>-R</CODE>,
<CODE>--restricted</CODE>
<DD>
This has the same effect as in <A HREF="nsgmls.htm#optR">onsgmls</A>.
<DT>
<CODE>-v</CODE>,
<CODE>--version</CODE>
<DD>
Print the version number.
<DT>
<CODE>-w<VAR>type</VAR></CODE>,
<CODE>--warning=<VAR>type</VAR></CODE>
<DD>
Control warnings and errors according to
<CODE><VAR>type</VAR></CODE>.
This has the same effect as in <A HREF="nsgmls.htm#optw">onsgmls</A>.
<DT>
<CODE>-x</CODE>,
<CODE>--expand-references</CODE>
<DD>
Expand references to entities that are changed.
If this option is specified two or more times,
then all references to entities that contain tags
will be expanded.
</DL>
<H2>BUGS</H2>
<P>
Omitted tags are added at the point where they are
implied by the SGML parser (except as modified
by the
<CODE>-h</CODE>
option); this is often not quite where they are wanted.
<P>
The case of general delimiters is not preserved.
<P>
Incorrect results may be produced if a variant concrete syntax is used
which is such that there are delimiters in markup to be added that have a
prefix that is a proper suffix of some other delimiter.
<P>
If an entity reference in a default value uses the default entity and
an entity with that name is subsequently defined and that default
value is added to the document instance, then the resulting document
may not be equivalent to the original document.
Ospam will give a warning when the first two conditions are met.
</BODY>
</HTML>