OSX(1)

πŸ“¦ version 1.5.2, in opensuse-leap 16.0

πŸ’… 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 default osx uses UTF-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 in onsgmls(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 in onsgmls(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 of stderr. a whole workaround moment.
  • -g, --open-elements β€” describe open elements in error messages. same energy as -e but 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 in onsgmls(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 in onsgmls(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 in onsgmls(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. usually osx uses 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. osx will 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 the amp, lt and gt entities. 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 cause osx to write a file outside (above) the output directory, exit (by default osx will 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. πŸ‘‘



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