Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6b3585ea67ce3e79c9049b5b33294cdd > files > 609

docbook-style-dsssl-doc-1.79-16.mga7.noarch.rpm

<chapter id="install">
<?html-filename install.html>
<docinfo>
<pubdate role=rcs>$Date: 2001/07/07 18:48:37 $</pubdate>
</docinfo>
<title>Installation and Setup</title>
<para>In order to process DocBook documents with these stylesheets,
you must get three separate components installed and configured correctly:
</para>
<itemizedlist>
<listitem><para><ulink url="http://www.jclark.com/jade/">Jade</ulink> (or
another DSSSL processor)</para>
</listitem>
<listitem><para>The
<ulink url="http://www.oasis-open.org/docbook/">DocBook DTD</ulink>.</para>
</listitem>
<listitem><para>The <ulink url="http://sourceforge.net/projects/docbook/">The Modular DocBook Stylesheets
</ulink></para>
</listitem>
</itemizedlist>
<para>For simplicity, these instructions assume that you are working with
Jade on a Microsoft Windows machine. These instructions should be just as
useful if you are working on a non-M$ platform, modulo the normal cross-platform
idiosyncracies (path and filename separator characters, use of drive letters,
etc.)</para>
<para>If you are using another DSSSL processor, <xref linkend="instdocbook">
may still be helpful, but most of the rest probably won't apply.</para>
<sect1 id="instjade">
<title>Installing Jade</title>
<procedure>
<step><para>Download and unpack the <ulink url="http://www.jclark.com/jade/">
Jade</ulink> distribution. Binary distributions are available for some platforms,
including Microsoft Windows, which makes installation a simple matter of unpacking
the distribution. For other platforms, you will need to build Jade from sources.
Please consult the documentation that comes with Jade for more detailed installation
instructions.</para>
<para>You may wish to add the directory where you installed Jade to your <envar>
PATH</envar>. If not, make sure that you use the fully qualified name of the
executable when you try to run the commands below.</para>
</step>
<step><para>Download <ulink url="testdata/jtest.sgm">jtest.sgm</ulink> and <ulink
url="testdata/jtest.dsl">jtest.dsl</ulink>. These are self-contained test
documents. Test Jade by running:</para>
<screen>jade -t rtf -d jtest.dsl jtest.sgm</screen>
<para>This command should silently produce <ulink url="testdata/jtest.rtf">
jtest.rtf</ulink>.</para>
<para>If you get errors of the form:<screen>jade:jtest.dsl:1:72:W: cannot generate system identifier for public
text "-//James Clark//DTD DSSSL Style Sheet//EN"
jade:jtest.dsl:1:72:E: reference to entity "STYLE-SHEET" for which no
system identifier could be generated
jade:jtest.dsl:1:0: entity was defined here
jade:jtest.dsl:1:72:E: DTD did not contain element declaration for
document type name
jade:jtest.dsl:2:12:E: element "STYLE-SHEET" undefined
jade:jtest.dsl:3:20:E: element "STYLE-SPECIFICATION" undefined
jade:jtest.dsl:4:25:E: element "STYLE-SPECIFICATION-BODY" undefined
jade:E: specification document does not have the DSSSL architecture
as a base architecture</screen></para>
<para>You probably need to setup the <envar>SGML_CATALOG_FILES</envar> path,
as described below.</para>
</step>
<step><para>If you encounter other warnings or errors, Jade is not installed
correctly.</para>
</step>
</procedure>
</sect1>
<sect1 id="instdocbook">
<title>Installing the DocBook DTD</title>
<procedure>
<step><para>Download and unpack the <ulink url="http://www.ora.com/davenport/">
DocBook DTD</ulink> distribution. Please consult the documentation that comes
with DocBook for more detailed installation instructions.</para>
</step>
<step><para>The DocBook DTD is composed of several modules. In order for SGML
tools on your system to find these modules, you will need to setup an <ulink
url="http://www.sgmlopen.org/">SGML Open</ulink> catalog file that maps the
public identifiers used in DocBook to local system identifiers. The DocBook
distribution comes with a default catalog called <filename>docbook.cat</filename>
which is probably sufficient.</para>
<para>Note, however, that Jade does not understand the <literal>DTDDECL</literal>
directive in catalog files and will issue a warning if you use <filename>
docbook.cat</filename> unchanged.</para>
</step>
<step><para>In order to find your catalog files, Jade, nsgmlsu, and the other
tools in the Jade distribution examine the <envar>SGML_CATALOG_FILES</envar>
environment variable. This variable should contain a <envar>PATH</envar>-like
list of the catalog files on your system. I have combined the catalog from
the DocBook distribution and several other DTDs that I use frequently into
a single catalog in <filename>d:/share/sgml/catalog</filename>, so I set my <envar>
SGML_CATALOG_FILES</envar> variable to:<screen>./catalog;d:/share/sgml/catalog;c:/jade/catalog;
</screen>If you are using only Jade and the DocBook DTD on your system, this
setting should be sufficient:<screen>c:/docbook/docbook.cat;c:/jade/catalog
</screen>assuming that you have the DocBook DTD installed in <filename>c:\docbook
</filename> and Jade installed in <filename>c:\jade</filename>.</para>
<para>Note: If you are on a UNIX system, the catalog file separator in <envar>
SGML_CATALOG_FILES</envar> is the colon, not the semicolon.</para>
<para>One mistake that I frequently make the first time I try to install Jade
somewhere new is to set the <envar>SGML_CATALOG_FILES</envar> variable to
the list of <emphasis>directories</emphasis> that contain catalog files rather
than the list of catalog files. That doesn' t work, it has to be a list of
the actual catalog <emphasis>files</emphasis>.</para>
<para>Another wrinkle to be aware of is that Jade will also search the catalog
files for the <literal>SGMLDECL</literal> entry which specifies the default <ulink
url="http://www.oasis-open.org/cover/wlw11.html">SGML Declaration</ulink> to use.
On my system, I have several doctypes that don't use the declaration identified
as the default in one of my catalog files, so I have to explicitly include
the proper declaration when I format those documents.</para>
</step>
<step id="dbtest"><para>To test your installation, download <ulink url="testdata/test.sgm">
test.sgm</ulink> and run following command:<screen>nsgmls -sv test.sgm</screen>The <command>
nsgmls</command> program is a stand-alone SGML parser included in the current
Jade distribution (in previous distributions, it was called <command>nsgmlsu
</command>).</para>
<para>If the <command>nsgmls</command> command produces errors, review your
catalog and resolve the errors:<itemizedlist>
<listitem><para>Ignore warnings about <literal>DTDDECL</literal> being unsupported.
It is unsupported, and there's no way to disable the warning message. Note,
however, that this may also effect which SGML declaration gets used. When
in doubt, pass the correct declaration explicitly and see if that corrects
any problems. (To parse <filename>test.sgm</filename> with the declaration <filename>
docbook.dcl</filename> explicitly, run <command>nsgmls -sv docbook.dcl test.sgm
</command>.)</para>
</listitem>
<listitem><para>If you are missing some of the <acronym>ISO</acronym> entity
sets, they are available on the web at <ulink url="http://www.oasis-open.org/cover/topics.html#entities">
http://www.oasis-open.org/cover/topics.html#entities</ulink></para>
</listitem>
</itemizedlist></para>
</step>
</procedure>
</sect1>
<sect1 id="instmds">
<title>Installing the Modular DocBook Stylesheets</title>
<procedure>
<step><para>Download and unpack the
<ulink url="http://sourceforge.net/projects/docbook/">stylesheet</ulink>
distribution.</para>
</step>
<step><para>Test the installation by processing <filename>test.sgm</filename>
(from the <link linkend="dbtest">previous section)</link> with Jade:<screen>
jade -t rtf -d d:\where-you-unpacked-the-stylesheets\docbook\print\docbook.dsl test.sgm
</screen> </para>
<para>This command should silently produce <ulink url="testdata/test.rtf"><filename>
test.rtf</filename></ulink>.</para>
<para>If you get errors indicating that a capacity has been exceeded (<literal>
...must not exceed LITLEN</literal> or <literal>...must not exceed GRPCNT
</literal>, etc.), you are probably using the wrong declaration. Try the test
again, with an explicit declaration:<screen>jade -t rtf -d d:\where-you-unpacked-the-stylesheets\docbook\print\docbook.dsl docbook.dcl test.sgm
</screen></para>
<para>If errors persist, and the <link linkend="dbtest">preceding test</link>
succeeded, something has gone wrong&mdash;<ulink url="http://nwalsh.com/~ndw/contact.html">
contact the maintainer</ulink>.</para>
<para>To test the HTML stylesheet, run<screen>jade -t sgml -d d:\where-you-unpacked-the-stylesheets\docbook\html\docbook.dsl test.sgm
</screen></para>
<para>This command should silently produce <ulink url="testdata/c01.htm"><filename>
c01.htm</filename></ulink>. If not, and the preceding test succeeded, something
has gone wrong&mdash;<ulink url="http://nwalsh.com/~ndw/contact.html">contact
the maintainer</ulink>.</para>
</step>
</procedure>
</sect1>
</chapter>