Bob,
Thanks a lot for your help. I'm getting this problem when I run xalan from
ant but outside of ant the TOC is being generated fine.
I downloaded instant saxon and ran it with the following command and the toc
came out fine.
saxon. tdocbook.xml chunk.xsl
I then tried to use xalan outside of ant and did the following command. I
now get a toc in my html file. However, this produced several error messages
starting with a IncrementalSAXSource_Xerces class not found message.
java org.apache.xalan.xslt.Process -in tdocbook.xml -xsl chunk.xsl
The ant code that I am using now is roughly as follows:
<target name="development" depends="preparedevelopment" description="XSL
The Development Docs">
<copy todir="${builddevelopment}">
<fileset dir="${css}" includes="${bmscss}"/>
</copy>
<java classname="org.apache.xalan.xslt.Process" fork="yes">
<jvmarg
value="-Xbootclasspath/a:${basedir}/lib/xalan.jar:${basedir}/lib/xercesImpl.
jar:${basedir}/lib/xml-apis.jar"/>
<arg value="-HTML"/>
<arg line="-IN ${docsdevelopment}/development.xml"/>
<arg line="-XSL ${docbookhtmlxsl}"/>
<arg line="-PARAM base.dir ${builddevelopment}/"/>
<arg line="-PARAM html.stylesheet ${bmscss}"/>
<classpath>
<pathelement location="lib/xalan.jar"/>
</classpath>
</java>
</target>
If I remember correctly, the bootclass path was changed a while ago (by
someone else) because there is some problem with Xalan under java 1.4
because Xerces is now part of java 1.4. This must be causing the error
messages I see when I run Xalan directly from the command line. This must
have in turn caused problems for ant. I'm afraid I don't understand any of
this. However, this "workaround" must somehow be related to the TOC not
showing up when Xalan is run under ant.
If anyone knows what is going on I would be interested in finding out how I
can run ant and java 1.4 and still get a TOC also. However, I think I will
go to the person who originally changed the ant build file. Perhaps he will
know how to resolve the problems in the ant build file without causing a
problem with the TOC.
Vincent
----- Original Message -----
From: "Bob Stayton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 09, 2002 3:54 PM
Subject: Re: DOCBOOK-APPS: Creating A TOC automatically
> Well, you do not have to do a customization
> layer to get a TOC. It is the default behavior
> of the stylesheets to generate a TOC for a book,
> which is what your example was. The presense or
> absense of an empty <toc> element will make no
> difference unless you are using some of the fancy
> manual TOC features, which I doubt.
>
> Like I said, when I process your sample file
> with the stock 1.55.0 chunk stylesheet (with or without
> that empty <toc> element included), I get a TOC in
> the output.
>
> Something is going on in your processing environment, but
> it is hard to tell what. Exactly what command are you
> using? You might try processing it with Saxon instead of
> Xalan. I also wonder if that embedded stylesheet reference
> at the beginning is somehow having an effect on Xalan?
>
>
> Bob Stayton 400 Encinal Street
> Publications Architect Santa Cruz, CA 95060
> Technical Publications voice: (831) 427-7796
> Caldera International, Inc. fax: (831) 429-1887
> email: [EMAIL PROTECTED]
>
>
> On Wed, Oct 09, 2002 at 03:27:55PM -0700, [EMAIL PROTECTED] wrote:
> > Thanks, I looked at the site.
> >
> > What I think I need to do is to create a customization layer as follows:
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
> > version="1.0"
> > exclude-result-prefixes="doc">
> >
> > <!--xsl:param name="generate.toc">
> > book toc
> > </xsl:param-->
> >
> > <xsl:param name="toc.list.type">dl
> > </xsl:param>
> >
> > <xsl:include href="../docs/docbook-xsl-1.51.1/html/chunk.xsl"/>
> >
> > </xsl:stylesheet>
> >
> > I now use this xsl instead of chunk.xsl. However, I'm having the same
> > problem. I did this both with and without the <toc></toc> tags.
> >
> > Vincent
> >
> >
> > > Forget about a TOC element in docbook if you want a
> > > automatic TOC. The TOC element in docbook is used if
> > > you define your own manual TOC (not very useful,
> > > really).
> > >
> > > For automatic TOC, if you're using the XSL
> > > stylesheets, you have to overwrite in your custom
> > > layer some parameters of param.xsl in order to obtain
> > > the desired result. I recomemd you to read the
> > > documentation of the XSLT stylesheets, especially this
> > > one:
> > > http://docbook.sourceforge.net/release/xsl/current/doc/html/rn04.html
> > >
> > > hope it helps.
> > >
> > >
> > > --- Vincent Hikida <[EMAIL PROTECTED]> escribis: >
> > > I get an index.html either way. There is no
> > >> difference between having an
> > >> empty toc and not having one.
> > >>
> > >> Vincent
> > >> ----- Original Message -----
> > >> From: "Bob Stayton" <[EMAIL PROTECTED]>
> > >> To: <[EMAIL PROTECTED]>;
> > >> <[EMAIL PROTECTED]>
> > >> Sent: Tuesday, October 08, 2002 4:58 PM
> > >> Subject: Re: DOCBOOK-APPS: Creating A TOC
> > >> automatically
> > >>
> > >>
> > >> > On Tue, Oct 08, 2002 at 01:40:33PM -0700,
> > >> [EMAIL PROTECTED] wrote:
> > >> > > I'm afraid I'm still a novice at Docbook and
> > >> related technologies. I am
> > >> > > under the impression that using <toc> </toc>
> > >> will automatically cause a
> > >> toc
> > >> > > to be created.
> > >> > >
> > >> > > I tried the following docbook xml file.
> > >> > >
> > >> > > <?xml version='1.0' encoding='UTF-8'?>
> > >> > > <?xml-stylesheet type="text/css"
> > >> > >
> > >>
> > > href="http://docs.boostmyscore.com/dtd/docbook.css"?>
> > >> > > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML
> > >> V4.2//EN"
> > >> > >
> > >>
> > > "http://docs.boostmyscore.com/dtd/docbook/docbookx.dtd"
> > >> >
> > >> > > <book>
> > >> > > <bookinfo>
> > >> > > <title>Docbook Test</title>
> > >> > > <date>October 1, 2002</date>
> > >> > > </bookinfo>
> > >> > > <toc></toc>
> > >> > > <chapter id="chapter1">
> > >> > > <title>Chapter 1</title>
> > >> > > <para>
> > >> > > This is Chapter 1 of Docbook test.
> > >> > > </para>
> > >> > > </chapter>
> > >> > > <chapter id="chapter2">
> > >> > > <title>Chapter 2</title>
> > >> > > <para>
> > >> > > This is Chapter 2 of Docbook test.
> > >> > > </para>
> > >> > > </chapter>
> > >> > > </book>
> > >> > >
> > >> > > I am using Xalan and chunk.xsl. No TOC is
> > >> created in the html files that
> > >> > > are produced. Am I doing something wrong?
> > >> >
> > >> > Interesting. The empty <toc> element should not
> > >> > make any difference unless you have some
> > >> parameters
> > >> > set to process it. What happens when you remove
> > >> > the empty <toc>? Do you get an index.html file
> > >> > either way?
> > >> >
> > >> > I'm able to process your file with both Saxon and
> > >> xsltproc
> > >> > and the 1.55.0 chunk stylesheet, and I get a TOC
> > >> in
> > >> > index.html. I don't currently have Xalan set up
> > >> to test it.
> > >> >
> > >> > --
> > >> >
> > >> > Bob Stayton 400
> > >> Encinal Street
> > >> > Publications Architect Santa
> > >> Cruz, CA 95060
> > >> > Technical Publications voice:
> > >> (831) 427-7796
> > >> > Caldera International, Inc. fax:
> > >> (831) 429-1887
> > >> > email:
> > >> [EMAIL PROTECTED]
> > >> >
> > >> >
> > >>
> > >>
> > >
> > > =====
> > > Carles Canellas.
> > > Vicer Tec S.L.
> > >
> > > _______________________________________________________________
> > > Yahoo! Messenger
> > > Nueva versisn: Webcam, voz, y mucho mas !Gratis!
> > > Descargalo ya desde http://messenger.yahoo.es
> >
> >
> >
>
> --
>
> Bob Stayton 400 Encinal Street
> Publications Architect Santa Cruz, CA 95060
> Technical Publications voice: (831) 427-7796
> Caldera International, Inc. fax: (831) 429-1887
> email: [EMAIL PROTECTED]
>
>