spam1
An sgml/xml markup stream editor
Part of ospam(1).
Usage
ospam [-CeghilprRvx]
[-alinktype]
[-Aarchitecture]
[-bbctf]
[-ccatalog_file]
[-Ddirectory]
[-ffile]
[-mmarkup_option]
[-oentity_name]
[-wwarning_type]
[sysid ...]
Overview
ospam (OpenSP Add Markup) is an SGML markup stream editor implemented using the OpenSP parser. ospam parses the SGML document contained in sysid and copies to the standard output the portion of the document entity containing the document instance, adding or changing markup as specified by the -m options. The -p option can be used to include the SGML declaration and prolog in the output. The -o option can be used to output other entities. The -x option can be used to expand entity references.
Part of an SGML System Conforming to International Standard ISO 8879 -- Standard Generalized Markup Language. An SGML Extended Facilities system conforming to Annex A of Internation Standard ISO/IEC 10744 -- Hypermedia/Time-based Structuring Language.
The following options are available:
-
-aname, --activate=name -
Make doctype or linktype name active.
-
-Aarchitecture, --architecture=architecture -
Parse with respect to architecture architecture.
-
-bbctf, --bctf=bctf -
Use bctf bctf for output.
-
-csysid, --catalog=sysid -
Use the catalog entry file sysid.
-
-C, --catalogs -
This has the same effect as in
onsgmls(1).
-
-Ddirectory, --directory=directory -
Search directory for files specified in system identifiers. This has the same effect as in
onsgmls(1).
-
-e, --open-entities -
Describe open entities in error messages.
-
-Emax_errors, --max-errors=max_errors -
Exit after max_errors errors are encountered.
-
-ffile, --error-file=file -
Redirect errors to file. This is useful mainly with shells that do not support redirection of stderr.
-
-h, --hoist-omitted-tags -
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
-momittagor-x-x.
-
--help -
Display a help text and exit.
-
-iname, --include=name -
This has the same effect as in
onsgmls(1).
-
-l, --lowercase -
Prefer lower-case. Added names that were subject to upper-case substitution will be converted to lower-case.
-
-mmarkup_option, --markup-option=markup_option -
Change the markup in the output according to the value of markup_option as follows:
omittagAdd tags that were omitted using omitted tag minimization. End tags that were omitted because the element has a declared content of EMPTY or an explicit content reference will not be added.shortrefReplace short references by named entity references.netChange null end-tags into unminimized end-tags, and change net-enabling start-tags into unminimized start-tags.emptytagChange empty tags into unminimized tags.unclosedChange unclosed tags into unminimized tags.attnameAdd omitted attribute names and vis.attvalueAdd literal delimiters omitted from attribute values.attspecAdd omitted attribute specifications.currentAdd omitted attribute specifications for current attributes. This option is implied by the attspec option.shorttagEquivalent to combination of net, emptytag, unclosed, attname, attvalue and attspec options.rankAdd omitted rank suffixes.reservedPut reserved names in upper-case.msRemove 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.Multiple -m options are allowed.
-
-n, --error-numbers -
Show error numbers in error messages.
-
-oname, --output-entity=name -
Output the general entity name instead of the document entity. The output will correspond to the first time that the entity is referenced in content.
-
-p, --output-prolog -
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.
-
-r, --raw -
Don't perform any conversion on RSs and REs when outputting the entity. The entity would typically have the storage manager attribute records=asis.
-
-R, --restricted -
This as the same effect as in
onsgmls(1)
-
-v, --version -
Print the version number.
-
-wtype, --warning=type -
Control warnings and errors according to type. This has the same effect as in
onsgmls(1).
-
-x, --expand-references -
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.
History
- Arch Linux 2026-11-01: the text shown here
- Debian 8 (Jessie) to Debian 2.0 (Hamm)
--activate since Arch Linux 2026-11-01;
--architecture since Arch Linux 2026-11-01;
--bctf since Arch Linux 2026-11-01;
--catalog since Arch Linux 2026-11-01;
--catalogs since Arch Linux 2026-11-01;
--directory since Arch Linux 2026-11-01;
--error-file since Arch Linux 2026-11-01;
--error-numbers since Arch Linux 2026-11-01;
--expand-references since Arch Linux 2026-11-01;
--help since Arch Linux 2026-11-01;
--hoist-omitted-tags since Arch Linux 2026-11-01;
--include since Arch Linux 2026-11-01;
--lowercase since Arch Linux 2026-11-01;
--markup-option since Arch Linux 2026-11-01;
--max-errors since Arch Linux 2026-11-01;
--open-entities since Arch Linux 2026-11-01;
--output-entity since Arch Linux 2026-11-01;
--output-prolog since Arch Linux 2026-11-01;
--raw since Arch Linux 2026-11-01;
--restricted since Arch Linux 2026-11-01;
--version since Arch Linux 2026-11-01;
--warning since Arch Linux 2026-11-01;
-A since Arch Linux 2026-11-01;
-C since Arch Linux 2026-11-01;
-E since Arch Linux 2026-11-01;
-R since Arch Linux 2026-11-01;
-a since Arch Linux 2026-11-01;
-b since Arch Linux 2026-11-01;
-n since Arch Linux 2026-11-01.