Links: Next Previous Up Top

# What is `sgmlspl`?

`sgmlspl` is a sample application distributed with the `SGMLS.pm` `perl5` class library -- you can use it to convert SGML documents to other formats by providing a specification file detailing exactly how you want to handle each element, external data entity, subdocument entity, CDATA string, record end, SDATA string, and processing instruction. `sgmlspl` also uses the `SGMLS::Output` library (included in this distribution) to allow you to redirect or capture output.

To use `sgmlspl`, you simply prepare a specification file containing regular `perl5` code. If your SGML document were named `doc.sgml`, your `sgmlspl` specification file were named, `spec.pl`, and the name of your new file were `doc.latex`, then you could use the following command in a Unix shell to convert your SGML document:

    sgmls doc.sgml | sgmlspl spec.pl > doc.latex

`sgmlspl` will pass any additional arguments on to the specification file, which can process them in the regular `perl5` fashion. The specification files used to convert this manual -- `tolatex.pl` and `tohtml.pl` -- are available with the `SGMLS.pm` distribution.

Links: Next Previous Up Top