<refentry id="jw">
  <docinfo>
    <author>
      <firstname>Eric</firstname> <surname>Bischoff</surname>
      <affiliation>
        <address><email>ebisch@cybercable.tm.fr</email></address>
      </affiliation>
    </author>
  </docinfo>
  <refmeta>
    <refentrytitle>jw</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>
      
  <refnamediv>
    <refname>jw</refname>
    <refname>docbook2dvi</refname>
    <refname>docbook2html</refname>
    <refname>docbook2man</refname>
    <refname>docbook2pdf</refname>
    <refname>docbook2ps</refname>
    <refname>docbook2rtf</refname>
    <refname>docbook2tex</refname>
    <refname>docbook2texi</refname>
    <refname>docbook2txt</refname>
    <refpurpose>(Jade Wrapper) converts SGML files to other formats</refpurpose>
  </refnamediv>
      
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>jw</command>
      <arg rep="repeat" choice="opt">options <synopfragmentref linkend="options-jw"></synopfragmentref></arg>
      <arg choice="req"><replaceable>SGML-file</replaceable></arg>

      <synopfragment id="options-jw"><group>
        <arg><option>-f</option> <replaceable>frontend</replaceable></arg>
        <arg><option>--frontend</option> <replaceable>frontend</replaceable></arg><sbr>
        <arg><option>-b</option> <replaceable>backend</replaceable></arg>
        <arg><option>--backend</option> <replaceable>backend</replaceable></arg><sbr>
        <arg><option>-c</option> <replaceable>file</replaceable></arg>
        <arg><option>--cat</option> <replaceable>file</replaceable></arg><sbr>
        <arg><option>-n</option></arg>
        <arg><option>--nostd</option></arg><sbr>
        <arg><option>-d</option> <replaceable>file</replaceable></arg>
        <arg><option>--dsl</option> <replaceable>file</replaceable></arg><sbr>
        <arg><option>-l</option> <replaceable>file</replaceable></arg>
        <arg><option>--dcl</option> <replaceable>file</replaceable></arg><sbr>
        <arg><option>-s</option> <replaceable>path</replaceable></arg>
        <arg><option>--sgmlbase</option> <replaceable>path</replaceable></arg><sbr>
        <arg><option>-p</option> <replaceable>program</replaceable></arg>
        <arg><option>--parser</option> <replaceable>program</replaceable></arg><sbr>
        <arg><option>-o</option> <replaceable>directory</replaceable></arg>
        <arg><option>--output</option> <replaceable>directory</replaceable></arg><sbr>
        <arg><option>-u</option></arg>
        <arg><option>--nochunks</option></arg><sbr>
        <arg><option>-i</option> <replaceable>section</replaceable></arg>
        <arg><option>--include</option> <replaceable>section</replaceable></arg><sbr>
        <arg><option>-h</option></arg>
        <arg><option>--help</option></arg><sbr>
        <arg><option>-v</option></arg>
        <arg><option>--version</option></arg>
      </group></synopfragment>

    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para>The <application>jw</application> shell script allows to
    convert a DocBook file (or some other SGML-based format) to
    other formats (including HTML, RTF, PS and PDF) with
    an easy-to-understand syntax. It hides most of Jade's
    or OpenJade complexity and adds comfortable features.</para>

    <para>Other scripts like <application>docbook2html</application>,
    <application>docbook2rtf</application> or
    <application>docbook2ps</application> provide different ways of
    calling <application>jw</application> that might be easier to
    remember.</para>

    <para>For the moment, jw does not handle XML, but only SGML.</para>

    <para>This utility assumes that several other components are
    installed. The list includes:
    <itemizedlist>
      <listitem>
        <para>the ISO character entities for SGML</para>
      </listitem>
      <listitem>
        <para>James Clark's DSSSL engine, jade, or an equivalent parser
        like OpenJade</para>
      </listitem>
      <listitem>
        <para>the DocBook DTD from the OASIS consortium</para>
      </listitem>
      <listitem>
        <para>Norman Walsh's DocBook modular style sheets (or some other
        set of DSSSL style sheets)</para>
      </listitem>
      <listitem>
        <para>Sebastian Rahtz's jadetex set of TeX macros for jade
        (for backends intended to "printing" formats like PDF, RTF or
        PostScript)</para>
      </listitem>
      <listitem>
        <para>A perl interpreter (for backends that use perl)</para>
      </listitem>
      <listitem>
        <para>SGMLSpm from CPAN (for backends that use sgmls)</para>
      </listitem>
      <listitem>
        <para>Lynx HTML browser (for the <filename>txt</filename>
        backend)</para>
      </listitem>
    </itemizedlist>
    </para>

    <para>The jw script is basically called like this:</para>

    <screen>jw mydoc.sgml</screen> 

    <para>where <filename>mydoc.sgml</filename> is a SGML file.</para>

    <para>The command line above uses default options: it converts
    from DocBook (the default frontend) to HTML (the default backend),
    does not put the result in a subdirectory (unless specified
    otherwise in the style sheets), etc.</para>

    <para>In this example, the "mydoc" file name as well as the ".sgml"
    extension can be replaced by anything else. Current extensions
    for SGML DocBook files include ".sgml", ".sgm", ".docbook", and
    ".db". The processed file <filename>mydoc.sgml</filename> can
    be in any other directory than the current one.</para>

    <para>Here we have chosen to generate HTML output. In
    fact we can use any of the backends stored in the
    <filename>backends/</filename> subdirectory of the DocBook-utils
    distribution directory (usually you'll find those backends in
    <filename>/usr/share/sgml/dcobook/utils-0.2</filename>). Similarly,
    you can use any frontend defined in the
    <filename>frontends/</filename> subdirectory to convert from another
    input format.</para>

    <para>This sample command creates one or many HTML files with
    arbitrary file names in the current directory. This default behavior
    can be changed through command line options and/or customization
    style sheets.</para>

  </refsect1>

  <refsect1>
    <title>Options</title>

    <para>The following options apply to the conversion script:</para>

    <glosslist>
      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-f</option> <replaceable>frontend</replaceable></arg>
            <arg><option>--frontend</option> <replaceable>frontend</replaceable></arg>
          </group></cmdsynopsis>
	</glossterm>
	<glossdef>
          <para>Allows to specify another frontend than default <filename>docbook</filename>.
          The list of currently available frontends is:
          <variablelist>
            <varlistentry>
              <term><filename>docbook</filename></term>
              <listitem><para>Converts docbook with Norman Walsh's
              style sheets. This frontend searches in the
              subdirectories of the base SGML directory for a
              file named <filename>html/docbook.dsl</filename> or
              <filename>print/docbook.dsl</filename> (depending on the
              backend's type: html or print).</para></listitem>
            </varlistentry>
          </variablelist>
          </para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-b</option> <replaceable>backend</replaceable></arg>
            <arg><option>--backend</option> <replaceable>backend</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
	<glossdef>
          <para>Allows to specify another backend than default
          <filename>HTML</filename>. The list of currently available
          backends is:
          <variablelist>
            <varlistentry>
              <term><filename>dvi</filename></term>
              <listitem><para>Converts to DVI (DeVice Independant
              files) by calling <application>Jade</application> or
              <application>OpenJade</application>.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>html</filename></term>
              <listitem><para>Converts to HTML (HyperText Markup
              Language) by calling <application>Jade</application>
              or <application>OpenJade</application>.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>man</filename></term>
              <listitem><para>Converts a refentry to a Unix manual page
              by calling docbook2man. Does not work with other SGML
              document types than DocBook.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>pdf</filename></term>
              <listitem><para>Converts to PDF (Portable Document
              Format) by calling <application>Jade</application> or
              <application>OpenJade</application>.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>ps</filename></term>
              <listitem><para>Converts to PostScript by
              calling <application>Jade</application> or
              <application>OpenJade</application>.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>rtf</filename></term>
              <listitem><para>Converts to RTF (Rich Text Format)
              by calling <application>Jade</application> or
              <application>OpenJade</application>. The resulting file can
              then be inported into <application>MS Word</application>
              or one of its Linux replacement programs.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>tex</filename></term>
              <listitem><para>Converts to TeX by calling <application>Jade</application> or
              <application>OpenJade</application>.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>texi</filename></term>
              <listitem><para>Converts to GNU TeXinfo pages by calling
              docbook2texi. Does not work with other SGML document types
              than DocBook.</para></listitem>
            </varlistentry>
            <varlistentry>
              <term><filename>txt</filename></term>
              <listitem><para>Converts to a bare text file
              by calling <application>Jade</application>
              or <application>OpenJade</application>, then
              <application>Lynx</application>.</para></listitem>
            </varlistentry>
          </variablelist>
          </para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-c</option> <replaceable>file</replaceable></arg>
            <arg><option>--cat</option> <replaceable>file</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Allows to use an extra SGML Open Catalog that will list
          other files like customization style sheets, adaptations to the
          DocBook Document Type Definition, special character entities,
          etc. This catalog is added to the list of catalogs determined
          by the script (see option <option>--nostd</option> below)</para>
        </glossdef>	  
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-n</option></arg>
            <arg><option>--nostd</option></arg>
          </group></cmdsynopsis>
	</glossterm>
        <glossdef>
	  <para>Do not use the standard SGML Open Catalogs. Normally,
	  the standard catalogs list is determined like this:
          <itemizedlist>
            <listitem>
              <para>if the centralized catalog exists, then
              use it. The centralized catalog is a list of all
              catalogs that might be necessary that usually
              resides in <filename>/etc/sgml</filename>. Its
              name is provided by the frontend, for example
              the <filename>docbook</filename> frontend returns
              <filename>/etc/sgml/sgml-docbook.cat</filename>.</para>
            </listitem>
            <listitem>
              <para>Otherwise, take all the files
              named <filename>catalog</filename> from the
              subdirectories of the SGML base directory (usually
              <filename>/usr/share/sgml</filename>).</para>
            </listitem>
	  </itemizedlist>
	  This option is useful in conjunction with the
	  <option>--cat</option> option to use only the catalogs that
	  are specified on the command line.</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-d</option> <replaceable>file</replaceable></arg>
            <arg><option>--dsl</option> <replaceable>file</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Allows to use a customized style sheet instead
          of the default one. The file name of the default style
          sheet is determined by the frontend, for example the
          <filename>docbook</filename> frontend returns Norman
          Walsh's <filename>html/docbook.dsl</filename> (or
          <filename>print/docbook.dsl</filename>) found somewhere below
          the SGML base directory.</para>
          <para>If the replacement style sheet is common for both HTML
          and printout conversion, one can use #html or #print selector
          to specify which part of the common file is to be used,
          or whichever target is defined.</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-l</option> <replaceable>file</replaceable></arg>
            <arg><option>--dcl</option> <replaceable>file</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Allows to use a customized SGML declaration instead
          of the default one. The file name of the default SGML
          declaration is not set for SGML files, and is set to
	  <filename>xml.dcl</filename> in the SGML base directory
	  for XML files.</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-s</option> <replaceable>path</replaceable></arg>
            <arg><option>--sgmlbase</option> <replaceable>path</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Allows to use another location for the SGML base
          directory. This is the directory below which all SGML DTDs,
          style sheets, entities, etc are installed. The default value
          is <filename>/usr/share/sgml</filename>.</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-p</option> <replaceable>program</replaceable></arg>
            <arg><option>--parser</option> <replaceable>program</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Specify the parser to use (<application>Jade</application>
          or <application>OpenJade</application>) if several
          are installed. If this option is not specified,
          the script first tries to use Jade, then it tries
          <application>OpenJade</application>.</para>
        </glossdef>	  
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-o</option> <replaceable>directory</replaceable></arg>
            <arg><option>--output</option> <replaceable>directory</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Set output directory where all the resulting files will
          be stored. If the style sheets define a subdirectory where to
          store the resulting files too, the subdirectory defined by the
          style sheets will be placed below the subdirectory defined by
          this option.</para>
        </glossdef>	  
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-u</option></arg>
            <arg><option>--nochunks</option></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Output only one big file. This option is useful only
          when generating HTML, because the output can be split into
          several files. This option overrides the setting that may be
          done in the style sheets.</para>
        </glossdef>	  
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-i</option> <replaceable>section</replaceable></arg>
            <arg><option>--include</option> <replaceable>section</replaceable></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Declare a SGML marked section as "include". A SGML marked
          section is a kind of conditional part of a document. If it is
          declared "ignore", it will be left ignored, otherwise it will
          be processed. An example of such a marked section would be:
            <informalexample><para><literallayout>
            &lt;DOCTYPE mydoc [
              &lt;!ENTITY % confidential "ignore"&gt;
            ]&gt;
            &lt;mydoc&gt;
              ...
              &lt;![ %confidential [ Some confidential text... ]]&gt;
              ...
            &lt;/mydoc&gt;
            </literallayout></para></informalexample>
          </para>
        </glossdef>	  
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-h</option></arg>
            <arg><option>--help</option></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Print a short help message and exit</para>
        </glossdef>	  
      </glossentry>

      <glossentry>
        <glossterm>
          <cmdsynopsis><group>
            <arg><option>-v</option></arg>
            <arg><option>--version</option></arg>
          </group></cmdsynopsis>
        </glossterm>
        <glossdef>
          <para>Print the version identifier and exit</para>
        </glossdef>	  
      </glossentry>

    </glosslist>      

  </refsect1>

  <refsect1>
    <title>Files</title>

    <glosslist>

      <glossentry>
        <glossterm>
          <filename>/etc/sgml/sgml-docbook.cat</filename>
        </glossterm>
        <glossdef>
          <para>Centralized SGML open catalog. This file name might
          vary if another frontend than <filename>docbook</filename>
          is used.</para>
        </glossdef>
      </glossentry>

<!-- The man-backend (from docbook2x) doesn't do a line break here in the -->
<!-- output. Don't know why. -->

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <filename>/usr/share/sgml/docbook/utils-0.2/backends</filename>
        </glossterm>
        <glossdef>
          <para>The various backends</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <filename>/usr/share/sgml/docbook/utils-0.2/frontends</filename>
        </glossterm>
        <glossdef>
          <para>The various frontends</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <filename>/usr/share/sgml/docbook/utils-0.2/helpers</filename>
        </glossterm>
        <glossdef>
          <para>The various helper scripts like docbook2man or docbook2texi</para>
        </glossdef>
      </glossentry>

    </glosslist>
  </refsect1>

  <refsect1>
    <title>Authors</title>

    <glosslist>

      <glossentry>
        <glossterm>Eric Bischoff</glossterm>
        <glossdef>
          <para>Author of jw shell script and of a few backends</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          Jochem Huhmann
        </glossterm>
        <glossdef>
          <para>Author of the <filename>man</filename> and <filename>texi</filename> backends</para>
        </glossdef>
      </glossentry>

    </glosslist>
  </refsect1>

  <refsect1>
    <title>See Also</title>

    <glosslist>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <citerefentry><refentrytitle>docbook2man-spec.pl</refentrytitle> <manvolnum>1</manvolnum></citerefentry>
        </glossterm>
        <glossdef>
          <para>perl script to help do the actual conversion to a man page</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <citerefentry><refentrytitle>docbook2texi-spec.pl</refentrytitle> <manvolnum>1</manvolnum></citerefentry>
        </glossterm>
        <glossdef>
          <para>perl script to help do the actual conversion to a texinfo page</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <citerefentry><refentrytitle>install-catalog</refentrytitle> <manvolnum>8</manvolnum></citerefentry>
        </glossterm>
        <glossdef>
          <para>manage a centralized SGML catalog</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <citerefentry><refentrytitle>nsgmls</refentrytitle> <manvolnum>1</manvolnum></citerefentry>
        </glossterm>
        <glossdef>
          <para>a base component of <application>Jade</application> DSSSL engine</para>
        </glossdef>
      </glossentry>

      <glossentry>
        <glossterm>
<!-- Next line  is a hack to force a paragraph break in the man-page. -->
<cmdsynopsis> <command></command> </cmdsynopsis>
          <ulink url="http://sourceware.cygnus.com/docbook-tools/">http://sourceware.cygnus.com/docbook-tools/</ulink>
        </glossterm>
        <glossdef>
          <para>the home page of the DocBook tools, a compendium of
          all tools necessary to process DocBook files, including the
          DocBook-utils.</para>
        </glossdef>
      </glossentry>

    </glosslist>
  </refsect1>

</refentry>
