472,791 Members | 1,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

catalog.xml for docbook

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="urn:oasis: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%
Jul 20 '05 #1
2 2703
On Wed, 20 Aug 2003 23:03:04 +0200, Simon Strandgaard wrote:
[snip]
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

[snip]

Silly me.. I took me a while to figure out that
specifying XML_CATALOG_FILES in the top of the makefile
is not equal to setting an environment variable.

Now I have 'setenv XML_CATALOG_FILES catalog.xml' in my .tcshrc

--
Simon Strandgaard

Jul 20 '05 #2
On Fri, 22 Aug 2003 16:05:39 +0200, Simon Strandgaard wrote:
Silly me.. I took me a while to figure out that
specifying XML_CATALOG_FILES in the top of the makefile
is not equal to setting an environment variable.

Now I have 'setenv XML_CATALOG_FILES catalog.xml' in my .tcshrc


OK.. I got 'catalog.xml' working. Many problems, which actually were
quite simple, thus I have written a mini-howto on how you can get
catalog.xml working in a hurry (15 minutes).

Please review and comment on it.

http://aeditor.rubyforge.org/mini_docbook.html

Especialy the troubleshooting section is what I feel other
tutorials/manuals is missing.

--
Simon Strandgaard
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dr. Laurence Leff | last post by:
I am having trouble doing the basics with xmlto on Redhat to convert DocBook XML into the various files. I believe the problem is the first line on the files: Here is starter file (notes.xml):...
6
by: Vincent Lefevre | last post by:
I would like to know if the base URI considered to resolve an unparsed entity defined by a relative URI should be the URI before or after its rewriting due to a possible catalog. Let's take an...
3
by: ZJT | last post by:
What are the ways and corresponding tools to transform a docbook document to a pdf document? Thanks a lot!
0
by: Soren Kuula | last post by:
Hi, I'm using a catalog for my Docbook xsl transformation. I can see (by having the resolver dump debug information) that the remapping of the system identifier <rewriteURI...
4
by: Thomas Sommer | last post by:
Hi group, I am really desperate but I think I am missing only a minor part. Basically I want to pipe a global entity (the one you dereference with the &) through my dtd into the xml-file I am...
7
by: mike p. | last post by:
I have a docbook xml file, and am using standard docbook 1.61.3 xsl stylesheets to do xhtml transform. Transform works fine when using MSXML. When I try to do the following using asp.net 1.1: ...
3
by: Otmar Ganahl | last post by:
Hi! In my application I transform a docbook file to a html view using the webcontrol "Xml" (with a xsl).It works fine, except the using of the tag "fileref" in the docbook-file will cause an...
1
by: Will Parsons | last post by:
I am trying to get started with using Docbook/xml using free tools and am stymied in generating printable documentation from even the simplest source. I have attempted to generate a PDF using...
2
by: Joseph Kesselman | last post by:
Since the recent "Docbook on Windows" question brought this up... I did a bit of checking on the current status of these schemas, what they're intended for and how they interrelate. IBM's Robert...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.