catalog.xml for docbook

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Strandgaard

    #1

    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

    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.xs l"
    cannot parse docbook.xsl
    gmake: *** [xhtml] Fejl 4
    box%

    ** Makefile **

    box% expand -t4 Makefile
    XML_CATALOG_FIL ES=catalog.xml
    XML_DEBUG_CATAL OG=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>Simo n</firstname>
    <surname>Strand gaard</surname>
    </author>
    </articleinfo>
    <section><title >Title</title>
    <para>placehold er.</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:oasi s:names:tc:enti ty:xmlns:xml:ca talog">

    <!-- DTD files installed under /usr/local/share/xml -->
    <group xml:base="file:///usr/local/share/xml/" >
    <!-- Resolve DTD URL system ID to local file -->
    <rewriteSyste m
    systemIdStartSt ring="http://www.oasis-open.org/docbook/xml/4.2/"
    rewritePrefix=" docbook/4.2/" />
    <!-- Resolve DTD PUBLIC identifiers -->
    <nextCatalog catalog="docboo k/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="docbo ok.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.sourcef orge.net/release/xsl/current/"
    rewritePrefix=" docbook/" />
    <!-- To resolve short stylesheet references -->
    <uri
    name="docbook.x sl"
    uri="docbook/xhtml/docbook.xsl" />
    </group>

    </catalog>
    box%


  • Simon Strandgaard

    #2
    Re: catalog.xml for docbook

    On Wed, 20 Aug 2003 23:03:04 +0200, Simon Strandgaard wrote:
    [snip][color=blue]
    > box% gmake
    > xsltproc --output index.html docbook.xsl main.xml
    > warning: failed to load external entity "docbook.xs l"
    > cannot parse docbook.xsl
    > gmake: *** [xhtml] Fejl 4
    > box%
    >
    > ** Makefile **
    >
    > box% expand -t4 Makefile
    > XML_CATALOG_FIL ES=catalog.xml
    > XML_DEBUG_CATAL OG=4
    >
    > xhtml:
    > xsltproc --output index.html docbook.xsl main.xml[/color]
    [snip]

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

    Now I have 'setenv XML_CATALOG_FIL ES catalog.xml' in my .tcshrc

    --
    Simon Strandgaard



    Comment

    • Simon Strandgaard

      #3
      Re: catalog.xml for docbook

      On Fri, 22 Aug 2003 16:05:39 +0200, Simon Strandgaard wrote:
      [color=blue]
      > Silly me.. I took me a while to figure out that
      > specifying XML_CATALOG_FIL ES in the top of the makefile
      > is not equal to setting an environment variable.
      >
      > Now I have 'setenv XML_CATALOG_FIL ES catalog.xml' in my .tcshrc[/color]

      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.



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

      --
      Simon Strandgaard

      Comment

      Working...