OSPAM(1)
π 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
-poption's whole job. - wanna output some other entities instead? hi,
-ooption, we love you. - wanna expand entity references?
-xhas 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 inonsgmls(1). (iykyk π )-Ddirectory,--directory=directoryβ search directory for files specified in system identifiers. this has the same effect as inonsgmls(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 ofstderr. 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-momittagor-x -x. π§--helpβ display a help text and exit. simple. iconic.-iname,--include=nameβ this has the same effect as inonsgmls(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 ofEMPTYor 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 theattspecoption. (soattspecis basically draggingcurrentalong to the party π )shorttagβ equivalent to combination ofnet,emptytag,unclosed,attname,attvalueandattspecoptions.rankβ add omitted rank suffixes.reservedβ put reserved names in upper-case.msβ remove marked section declarations whose effective status isIGNORE, and replace each marked section declaration whose effective status isINCLUDEby 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
-moptions 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 anSGMLDECLentry 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 attributerecords=asis. raw is a vibe, fr fr.-R,--restrictedβ this has the same effect as inonsgmls(1).-v,--versionβ print the version number. π-wtype,--warning=typeβ control warnings and errors according to type. this has the same effect as inonsgmls(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
-hoption); 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.
ospamwill 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.
π COPYRIGHT π
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
- centos-stream 10: opensp 1.5.2-48.el10 Β· X11
- centos-stream 9: opensp 1.5.2-38.el9 Β· MIT
- centos-stream 9: opensp 1.5.2-38.el9 Β· MIT
- fedora 43: opensp 1.5.2-49.fc43 Β· X11
- fedora 43: opensp 1.5.2-49.fc43 Β· X11
- fedora 44: opensp 1.5.2-50.fc44 Β· X11
- fedora 44: opensp 1.5.2-50.fc44 Β· X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms