OSX(1)
π OSX(1) π β the SGML β XML glow-up, explained by your favorite Unix bestie π¦
π NAME π
osx β an SGML to XML converter. that's the whole vibe, no cap. β¨
πΈ SYNOPSIS πΈ
osx [-CeghnRvx] [-aname] [-Aarchitecture] [-bencoding] [-ccatalog_file]
[-ddirectory] [-Ddirectory] [-iname] [-ffile] [-ldtd_file]
[-wwarning_type] [-xxml_output_option...] [sysid...]
π DESCRIPTION π
okay so bestie, osx converts SGML to XML. it parses and validates the SGML document contained in
β¦and yes, that sentence genuinely just ends there in the source. not me leaving you on read π it's giving mystery, it's giving cliffhanger, it's giving the sysid goes here probably. moving on!
then it writes an equivalent XML document to the standard output. π«Ά and β super important β osx will warn about SGML constructs which have no XML equivalent. it will literally tell you "bestie that fit does not translate" and honestly? we love a converter with opinions. π
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 International Standard ISO/IEC 10744 -- Hypermedia/Time-based Structuring Language.
like, that's the pedigree. it's an icon, it's a legend, it's ISO-certified. π
β¨ OPTIONS β¨
The following options are available, and we are going through every single one, because we don't skip. π
-aname,--activate=nameβ make doctype or linkname name active. go girl, activate. π«-Aname,--architecture=nameβ parse with respect to architecture name. architectural realness. ποΈ-bencoding,--encoding=encodingβ use the BCTF encoding for output. by defaultosxusesUTF-8. (so if you say nothing, it's UTF-8 o'clock, periodt.) π-csysid,--catalog=sysidβ map public identifiers and entity names to system identifiers using the catalog entry file whose system identifier is sysid. catalog said "I'll find it for you", and honestly, iconic behaviour. π-C,--catalogsβ this has the same effect as inonsgmls(1). (iykyk π«Ά)-ddirectory,--entity_output_location=directoryβ place output files in directory. put them away, put them away. ποΈ-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. spill the tea about what's still open. β-Emax_errors,--max-errors=max_errorsβ give up after max_errors errors. we all have a limit, bestie. π-ffile,--error-file=fileβ redirect errors to file. this is useful mainly with shells that do not support redirection ofstderr. a whole workaround moment.-g,--open-elementsβ describe open elements in error messages. same energy as-ebut for elements. π«Ά-h,--helpβ display a help text and exit. the "hey bestie what's going on" button. π-iname,--include=nameβ this has the same effect as inonsgmls(1).-ldtd-file,--dtd_location=dtd-fileβ specify that the resulting XML file should conform to the DTD in dtd-file. (note: the synopsis spells it-ldtd_file, the option list spells it-ldtd-fileβ both are exactly as written, don't come for me π)-n,--error-numbersβ show error numbers in error messages. receipts with reference numbers. π§Ύ--referencesβ show references in error messages.-R,--restrictedβ this has the same effect as inonsgmls(1).-v,--versionβ print the version number and exit. main character announcement. π-wtype,--warning=typeβ control warnings and errors according to type. this has the same effect as inonsgmls(1).-xxml_output_option,--xml-output-option=xml_output_optionβ control the XML output according to the value of xml_output_option, as follows:no-nl-in-tagβ don't use newlines inside start-tags. usuallyosxuses newlines inside start-tags so as to reduce the probability of excessively long lines. (short king behaviour)idβ output attribute declarations for ID attributes.notationβ output declarations for notations.ndataβ output declarations for external data entities. XML requires these to be NDATA.osxwill warn about CDATA and SDATA external data entities and output them as NDATA entities. it said "adapting, not abandoning". πcdataβ use XML CDATA sections for CDATA marked sections and for elements with a declared content of CDATA.commentβ output comment declarations. comment declarations in the DTD will not be output. (the DTD comments are on do-not-disturb π«)lowerβ prefer lower case. names that were subjected to upper-case substitution by SGML will be folded to lower case. this does not include reserved names; XML requires these to be in upper-case. so like, chill lowercase vibes, but reserved names stay LOUD. π£pi-escapeβ escape&<>in the contents of processing instructions using theamp,ltandgtentities. this allows processing instructions to contain the string>?, but requires that applications handle the escapes. trade-off queen. βοΈemptyβ use the<e/>syntax for element types e declared as EMPTY.attlistβ output an ATTLIST declaration for every element specifying the type of all attributes. the default will always be#IMPLIED. every element gets an outfit breakdown. πreport-input-sourcesβ output a processing instruction to report when an input source other than the main file is opened or closed in the instance. do not report any input source changes in the DTD.report-entitiesβ output a processing instruction to report when an external entity reference has been resolved in the instance. do not report any entity resolutions in the DTD.no-expand-externalβ preserve external entities, write a declaration driver file named"extEntities.dtf", and include that file in the instance's internal subset.no-expand-internalβ preserve internal entities, write a declaration driver file named"intEntities.dtf", and include that file in the instance's internal subset.no-external-declβ do not include the external entities declaration driver file in the instance's internal subset.no-internal-declβ do not include the internal entities declaration driver file in the instance's internal subset.no-output-outside-outdirβ when preserving external entities, do not write output files outside the specified output directory ("."by default). in other words, if an external entity's system identifier includes enough instances of".."to causeosxto write a file outside (above) the output directory, exit (by defaultosxwill issue a warning but will write the file and continue. π¨ (and yes, that parenthesis never closes in the source. we love her anyway.)no-overwriteβ when preserving internal or external entities, multiple output files will be written. if this option is specified, do not overwrite existing files; instead, attempt to append a number to the end of the original filename to create a unique filename. exit with an error if too many (100) such files already exist. one hundred is the limit, and that's that. π―preserve-caseβ preserve casing as specified in the DTD for element names; attribute names; attribute values which are token lists.sdata-as-pisβ when translating SDATA entities (whether expanding them or providing a definition for them in the output's internal subset), express them as processing instructions instead of as general internal entities.
multiple -x options are allowed. stack them, layer them, accessorize. π
β¨
π SEE ALSO π
onsgmls(1), ospam(1), onsgmlnorm(1), ospent(1)
the whole friend group. go say hi. π«Ά
π AUTHORS π
- James Clark β Author.
- Ian Castle
<ian.castle@openjade.org>β Author.
two absolute legends. we stan. π
π COPYRIGHT π
and that's the whole page, bestie!! π¦ thanks for reading, you ate. this one came to you from OpenJade, dated November 2002, and it's filed under OSX(1) β mwah, take care of her, she's iconic. ππ
β¨
π¦ where this page comes from
- alpine 3.22: opensp-doc 1.5.2-r6 Β· ICU
- alpine 3.23: opensp-doc 1.5.2-r6 Β· ICU
- alpine 3.24: opensp-doc 1.5.2-r6 Β· ICU
- arch rolling: opensp 1.5.2-11 Β· MIT
- 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
- nixos 26.05: opensp 1.5.2
- nixpkgs unstable: opensp 1.5.2
- opensuse-leap 16.0: opensp-doc 1.5.2-160000.2.2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms