OSPAM(1)

πŸ“¦
version 1.5.2 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

πŸ’– OSPAM(1) πŸ’–

okay bestie, pull up a chair, we're reading the ospam(1) page from the OpenJade Reference manual and honestly? it's giving iconic markup-stream-editor energy. let's go πŸ¦‹


✨ NAME ✨

ospam β€” an SGML/XML markup stream editor 🌸


✨ SYNOPSIS ✨

ospam [-CeghilprRvx] [-alinktype] [-Aarchitecture] [-bbctf]
      [-ccatalog_file] [-Ddirectory] [-ffile] [-mmarkup_option]
      [-oentity_name] [-wwarning_type] [sysid...]

✨ DESCRIPTION ✨

so ospam stands for OpenSP Add Markup, and no cap, it's an SGML markup stream editor built on top of the OpenSP parser. 🫢

what it does: it parses the SGML document that lives in sysid, then copies to standard output the portion of the document entity that contains the document instance β€” and while it's doing that, it adds or changes markup exactly how your -m options told it to. πŸ’…

  • wanna pull the SGML declaration and prolog into the output too? that's the -p option's whole job.
  • wanna output some other entities instead? hi, -o option, we love you.
  • wanna expand entity references? -x has entered the chat. ✨
this thing is Part of an SGML System Conforming to International Standard ISO 8879 β€” Standard Generalized Markup Language. it's also an SGML Extended Facilities system conforming to Annex A of Internation Standard ISO/IEC 10744 β€” Hypermedia/Time-based Structuring Language. (that's what the page says, word for word, we don't editorialize on the standards body's spelling πŸ’€)

the following options are available, and yes we're doing all of them:


✨ OPTIONS ✨

  • -aname, --activate=name β€” make doctype or linktype name active. ✨
  • -Aarchitecture, --architecture=architecture β€” parse with respect to architecture architecture.
  • -bbctf, --bctf=bctf β€” use bctf for output.
  • -csysid, --catalog=sysid β€” use the catalog entry file sysid.
  • -C, --catalogs β€” this has the same effect as in onsgmls(1). (iykyk πŸ’…)
  • -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. so helpful of it πŸ₯Ί
  • -Emax_errors, --max-errors=max_errors β€” exit after max_errors errors are encountered. (yes bestie, it WILL give up on you 😭)
  • -ffile, --error-file=file β€” redirect errors to file. mainly useful with shells that don't support redirection of stderr. lowkey a lifesaver in those situations.
  • -g, --open-elements β€” show the generic identifiers of open elements in error messages.
  • -h, --hoist-omitted-tags β€” hoist omitted tags out from the start of internal entities. here's the deal: if the text at the beginning of an internal entity causes a tag to be implied, that tag will usually be treated as being in that internal entity β€” but this option instead makes it be treated as being in the entity that referenced the internal entity. it only makes a difference in conjunction with -momittag or -x -x. 🧚
  • --help β€” display a help text and exit. simple. iconic.
  • -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:
    • omittag β€” add 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.
    • shortref β€” replace short references by named entity references.
    • net β€” change null end-tags into unminimized end-tags, and change net-enabling start-tags into unminimized start-tags.
    • emptytag β€” change empty tags into unminimized tags.
    • unclosed β€” change unclosed tags into unminimized tags.
    • attname β€” add omitted attribute names and vis.
    • attvalue β€” add literal delimiters omitted from attribute values.
    • attspec β€” add omitted attribute specifications.
    • current β€” add omitted attribute specifications for current attributes. this option is implied by the attspec option. (so attspec is basically dragging current along to the party πŸ’…)
    • shorttag β€” equivalent to combination of net, emptytag, unclosed, attname, attvalue and attspec options.
    • rank β€” add omitted rank suffixes.
    • reserved β€” put reserved names in upper-case.
    • ms β€” 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. 😌
    • multiple -m options are allowed. stack 'em, bestie. πŸ”₯
  • -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. raw is a vibe, fr fr.
  • -R, --restricted β€” this has 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. (double -x? we stan a power user 🌈)

😭 BUGS 😭

bestie. we gotta talk. 🫢

  • omitted tags are added at the point where they are implied by the SGML parser (except as modified by the -h option); this is often not quite where they are wanted. πŸ’€
  • the case of general delimiters is not preserved.
  • 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.
  • 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. πŸ₯Ί

🌸 SEE ALSO 🌸

onsgmls(1), ospent(1), onsgmlnorm(1), osx(1)


πŸ’… AUTHORS πŸ’…

  • James Clark β€” Author.
  • Ian Castle <ian.castle@openjade.org> β€” Author.

this page is from OpenJade, dated November 2002, and it's the OSPAM(1) page of the Reference manual. periodt. πŸ’–

okay that's the whole page, you ate that, go forth and edit your markup streams queen πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from