S
Simon Strandgaard
I am trying to understand how to create a 'catalog.xml'
file for my docbook-xml documents. If I understand
correct a local catalog.xml file can both avoid hardcoding
in makefiles (portability), plus speed up if the
stylesheet+dtds is located on the local machine.
Question #1:
How do I create a catagory.xml file, which works?
I tried follow the guide at
http://www.sagehill.net/docbookxsl/Catalogs.html
But cannot seems to get thier code working.
Question #2:
Can anyone help me hunt down the problem with the following
relative simple catalog.xml ?
Question #3:
I am worried that I do this completely wrong, how do
you deal with 'catalog.xml' ?
Please help (thanks in advance).
--
Simon Strandgaard
box% gmake
xsltproc --output index.html docbook.xsl main.xml
warning: failed to load external entity "docbook.xsl"
cannot parse docbook.xsl
gmake: *** [xhtml] Fejl 4
box%
** Makefile **
box% expand -t4 Makefile
XML_CATALOG_FILES=catalog.xml
XML_DEBUG_CATALOG=4
xhtml:
xsltproc --output index.html docbook.xsl main.xml
box%
** main.xml **
box% expand -t4 main.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE article
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
]>
<article>
<articleinfo>
<title>Test</title>
<author>
<firstname>Simon</firstname>
<surname>Strandgaard</surname>
</author>
</articleinfo>
<section><title>Title</title>
<para>placeholder.</para>
</section>
</article>
box%
** catalog.xml **
on my FreeBSD machine, the 'docbookx.dtd' is located at:
/usr/local/share/xml/docbook/4.2/docbookx.dtd
the stylesheet which I want to use is located here:
/usr/local/share/xsl/docbook/xhtml/docbook.xsl
Question #4:
Have I entered this information correct into catalog.xml ?
box% expand -t4 catalog.xml
<?xml version="1.0"?>
<!DOCTYPE catalog
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urnasis:names:tc:entity:xmlns:xml:catalog">
<!-- DTD files installed under /usr/local/share/xml -->
<group xml:base="file:///usr/local/share/xml/" >
<!-- Resolve DTD URL system ID to local file -->
<rewriteSystem
systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/"
rewritePrefix="docbook/4.2/" />
<!-- Resolve DTD PUBLIC identifiers -->
<nextCatalog catalog="docbook/4.2/catalog.xml" />
<!-- To resolve simple DTD SYSTEM identifiers. -->
<!-- Note: this does not work with Java resolver -->
<!-- classes in Saxon or Xalan -->
<system
systemId="docbook.dtd"
uri="docbook/4.2/docbookx.dtd" />
</group>
<!-- stylesheet files installed under /usr/local/share/xsl -->
<group xml:base="file:///usr/local/share/xsl/" >
<!-- Resolve stylesheet URL to local file -->
<rewriteURI
uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
rewritePrefix="docbook/" />
<!-- To resolve short stylesheet references -->
<uri
name="docbook.xsl"
uri="docbook/xhtml/docbook.xsl" />
</group>
</catalog>
box%
file for my docbook-xml documents. If I understand
correct a local catalog.xml file can both avoid hardcoding
in makefiles (portability), plus speed up if the
stylesheet+dtds is located on the local machine.
Question #1:
How do I create a catagory.xml file, which works?
I tried follow the guide at
http://www.sagehill.net/docbookxsl/Catalogs.html
But cannot seems to get thier code working.
Question #2:
Can anyone help me hunt down the problem with the following
relative simple catalog.xml ?
Question #3:
I am worried that I do this completely wrong, how do
you deal with 'catalog.xml' ?
Please help (thanks in advance).
--
Simon Strandgaard
box% gmake
xsltproc --output index.html docbook.xsl main.xml
warning: failed to load external entity "docbook.xsl"
cannot parse docbook.xsl
gmake: *** [xhtml] Fejl 4
box%
** Makefile **
box% expand -t4 Makefile
XML_CATALOG_FILES=catalog.xml
XML_DEBUG_CATALOG=4
xhtml:
xsltproc --output index.html docbook.xsl main.xml
box%
** main.xml **
box% expand -t4 main.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE article
PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
]>
<article>
<articleinfo>
<title>Test</title>
<author>
<firstname>Simon</firstname>
<surname>Strandgaard</surname>
</author>
</articleinfo>
<section><title>Title</title>
<para>placeholder.</para>
</section>
</article>
box%
** catalog.xml **
on my FreeBSD machine, the 'docbookx.dtd' is located at:
/usr/local/share/xml/docbook/4.2/docbookx.dtd
the stylesheet which I want to use is located here:
/usr/local/share/xsl/docbook/xhtml/docbook.xsl
Question #4:
Have I entered this information correct into catalog.xml ?
box% expand -t4 catalog.xml
<?xml version="1.0"?>
<!DOCTYPE catalog
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urnasis:names:tc:entity:xmlns:xml:catalog">
<!-- DTD files installed under /usr/local/share/xml -->
<group xml:base="file:///usr/local/share/xml/" >
<!-- Resolve DTD URL system ID to local file -->
<rewriteSystem
systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/"
rewritePrefix="docbook/4.2/" />
<!-- Resolve DTD PUBLIC identifiers -->
<nextCatalog catalog="docbook/4.2/catalog.xml" />
<!-- To resolve simple DTD SYSTEM identifiers. -->
<!-- Note: this does not work with Java resolver -->
<!-- classes in Saxon or Xalan -->
<system
systemId="docbook.dtd"
uri="docbook/4.2/docbookx.dtd" />
</group>
<!-- stylesheet files installed under /usr/local/share/xsl -->
<group xml:base="file:///usr/local/share/xsl/" >
<!-- Resolve stylesheet URL to local file -->
<rewriteURI
uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
rewritePrefix="docbook/" />
<!-- To resolve short stylesheet references -->
<uri
name="docbook.xsl"
uri="docbook/xhtml/docbook.xsl" />
</group>
</catalog>
box%