The following software packages should be installed on a system which wants to make full use of the xml-keyval package:
Since the bash utility is available on such a wide variety of platforms, Paul has made it his shell scripting language of choice. You can determine if your system has bash installed properly using the following command:
[pkb@salsa common]
/bin/bash --version
GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
[pkb@salsa common]
If your system doesn't have bash installed, additional information on installing bash can be found in the Third Party Software chapter.
You will need a Java run time environment (version
1.4.2 or later). This package includes the
org.apache.xalan.xslt.Process
class, which enables one to apply XSL style sheets to
XML documents allowing us to translate XML source
files into other useful entities. It may be possible to
use an earlier version of the Java run time environment,
however, it will be up to you locate and install the
Xalan-Java package yourself (you will be on
your own).
You can use the following command to determine what version of Java you have installed on your system:
[pkb@salsa common]
java -version
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)
[pkb@salsa common]
If your system indicates that you have a version of
Java installed that is 1.4 or higher, they you are
probably set to go. You can further test this by verifying
that the
org.apache.xalan.xslt.Process
class
is available for applying XSL templates to XML
documents by using the following command:
[pkb@salsa common]
java org.apache.xalan.xslt.Process
Xalan-J command line Process class options:
-Common Options-
[-XSLTC (use XSLTC for transformation)]
[-IN inputXMLURL]
[-XSL XSLTransformationURL]
... bunch more output - you'll have to hit return a couple of times ...
[-XX (turns on additional debugging message output)]
[-XT (use translet to transform if possible)]
[pkb@salsa common]
If the above test produces an error message (typically something containing java.lang.NoClassDefFoundError), then you will need to update your Java run time environment. Additional information related to installing the Java 2 Software Edition can be found in the Third Party Software chapter.
When processing XML documents, validation is often desirable. Validation is done against the XML document's associated DTD or XML Schema. There is typically one public location for a DTD or XML Schema file (think Internet here). Often it is desirable to have a local copy of the schema available on your system. Having a local copy means you won't need to access the Internet when you process your XML documents. This makes things run quicker (and avoids the Internet dependency - and proxy server setup issues).
The xml-commons-resolver package provides a mechanism to read catalog files telling the XLST process where it can find DTD and XML Schema files on the local system. If not found on the local system, the XLST process should then still fall back to pulling it from the Internet.
You can use the following command to determine if you have the xml-commons-resolver package properly installed (you should not see an error message):
[pkb@salsa common]
java org.apache.xml.resolver.Version
XmlResolver 1.0
[pkb@salsa common]
If the above test produces an error message
(typically something containing
java.lang.NoClassDefFoundError),
then you will need to install the xml-commons-resolver
package on your system. This involves creating a
lib/endorsed
directory under your
Java run time direcorty (if it doesn't already exist), and
then placing the necessary JAR file
(found at http://www.ibiblio.org/maven/xml-resolver/jars/xml-resolver-1.1.jar)
in the lib/endorsed
directory. Assuming the path to your Java run time
environment is
/opt/j2sdk1.4.2_03/jre
, then the
installation of this package can be done in the following
manner (assuming you have the wget
utility properly installed and configured for your
system):
[pkb@guacamole keyval]$
su -
Password:
bash-2.03#
cd /opt/j2sdk1.4.2_03/jre/lib
bash-2.03#
if [ ! -d endorsed ]; then mkdir endorsed; fi
bash-2.03#
cd endorsed
bash-2.03#
wget -nd -nH http://www.ibiblio.org/maven/xml-resolver/jars/xml-resolver-1.1.jar
--09:56:23-- http://www.ibiblio.org/maven/xml-resolver/jars/xml-resolver-1.1.jar
=> `resolver-latest.jar'
Connecting to xml.apache.org:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 51,861 [application/octet-stream]
0K -> .......... .......... .......... .......... .......... [ 98%]
50K -> [100%]
09:56:24 (89.16 KB/s) - `resolver-latest.jar' saved [51861/51861]
bash-2.03#
Additional information related to installing the xml-commons-resolver package can be found in the Third Party Software chapter.
The docbook-xsl package does not need to be installed on your local system as long as Internet access is available. However, having a local copy of the docbook-xsl package installed can speed up the processing of DocBook.org files.
You can typically tell if your system has the docbook-xsl package installed, using the following command:
[pkb@salsa pkb]$
ls /usr/share/sgml/docbook
docbook-xsl-1.64.1 sgml-dtd-3.1-1.0-17 xmlcatalog
dsssl-stylesheets sgml-dtd-4.0-1.0-17 xml-dtd-4.1.2-1.0-17
dsssl-stylesheets-1.76 sgml-dtd-4.1-1.0-17 xml-dtd-4.2-1.0-17
gnome-customization-0.1 sgml-dtd-4.2-1.0-17 xsl-stylesheets
sgml-dtd-3.0-1.0-17 utils-0.6.12 yelp
[pkb@salsa pkb]$
If you don't see output similar to the above, it indicates that the docbook-xsl package is not installed on your system. Or, that it is installed in a different directory than we were expecting.
If you system has the docbook-xsl package
installed in a different directory, you will either need
to add a symbolic link, or set the
XML_COMMON_DOCBOOK
environment variable to
the directory it can be found at.
If your system doesn't have docbook-xsl package installed and you'd like to install a local copy, additional information on installing docbook-xsl can be found in the Third Party Software chapter.