This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Q) newbie to docbook and chunking


Hi,

You guys had fun with this thread I see. Well, in answer to the original
questions, here we go:

"Rafael R. Sevilla" wrote:
> 
> On Wed, 20 Jun 2001 Jeffrey_Franks@i-o.com wrote:
> >
> > Hi,
> >
> > I've just got my HTML tool chain working. Now I would
> > like to have multple pages - like one for each chapter, etc.
> >
> 
> What set of stylesheets are you using, XSL or DSSSL?  If you use XSL, what
> XSLT processor do you have?
> 

I'm using XSL and Xt for the XSLT processor.
Here is the makefile I'm using.

==============================================================================
TARGET = book

SAXDRIVER = com.jclark.xsl.sax.Driver
FOP_PROC  = org.apache.fop.apps.CommandLine
# HTML_XSL  =
/home/jlf/xae/xae/doctypes/docbook/styles/docbook/html/docbook.xsl
HTML_XSL  =
/home/jlf/xae/xae/doctypes/docbook/styles/docbook/html/chunk.xsl
PDF_XSL   =
/home/jlf/xae/xae/doctypes/docbook/styles/docbook/fo/docbook.xsl
TIME      = com.jclark.xml.apps.Time

XT_PATH  = /home/jlf/xt/xt.jar
XP_PATH  = /home/jlf/xp/xp.jar
SAX_PATH = /home/jlf/xt/sax.jar
FOP_PATH = /home/jlf/fop/fop.jar

export CLASSPATH = $(XT_PATH):$(XP_PATH):$(SAX_PATH):$(FOP_PATH)

SOURCE  = \
        $(TARGET).xml   \
        bkinfo.xml      \
        preface.xml     \
        ch01/ch01.xml

all:    html pdf

valid:
        java $(TIME) $(TARGET).xml

html:   $(TARGET).html

pdf:    $(TARGET).pdf

$(TARGET).html: $(SOURCE)
        java $(SAXDRIVER) $(TARGET).xml $(HTML_XSL) > $(TARGET).html

$(TARGET).pdf:  $(SOURCE)
        java $(SAXDRIVER) $(TARGET).xml $(PDF_XSL) > $(TARGET).fo ; \
        java $(FOP_PROC) $(TARGET).fo $(TARGET).pdf

clean:
        rm -f $(TARGET).html ; \
        rm -f $(TARGET).pdf ; \
        rm -f $(TARGET).fo
==============================================================================
> > This newbie reviewed the mail archive and found the
> > subject very confusing. I see it is related to chunking
> > and XSLT stuff and I have not come up to speed on
> > all of this yet.
> >
> 
> There is a html/chunk.xsl stylesheet you can use in the XSL stylesheets if
> you don't use James Clark's XT XSLT engine (in which case you ought to use
> html/xtchunk.xsl instead).
> 

Looks like I've got that part wrong according to your above comment.
However,
the HTML target does render okay. However, the figures don't center.
Here is
an example of my markup. Did I do something wrong?

        <figure id="fig1-1" float="1">
          <title>Xmt helps separate UI from application back end</title>
          <mediaobject>
            <imageobject>
              <imagedata align="center" format="eps"
              fileref="./images/fig1-1.eps"/>
            </imageobject>
            <imageobject>
              <imagedata align="center" format="jpg"
              fileref="./images/fig1-1.jpg"/>
            </imageobject>
          </mediaobject>
        </figure>

And then there is the style issue of chunks on a per chapter basis
instead of
all the slicing and dicing that goes on here. Is there a parameter I can
set
or do I have to customize the style sheet for this. Currently, I've
specified
only the default style sheet with no customizations nor over-rides.

> > Can someone suggest a compatable set of tools that
> > gets the job done for a Linux platform? Where are the
> > instructions and docs to do this type of thing?
> >
> 
> Frankly, I found the DSSSL route much too clunky, so I decided to go the
> XSL route.  Three things are needed to do it this way:
> 
> 1. The DocBook XSL Stylesheets (obviously)
> 2. Any XSL transformations processor
> 3. An XSL Formatting objects processor (if you want to make PDF from dbk)
> 

I would like to stay with XSL. However,
the PDF target doesn't work yet. It produces the following:

jlf>make pdf
java com.jclark.xsl.sax.Driver book.xml
/home/jlf/xae/xae/doctypes/docbook/styles/docbook/fo/docbook.xsl >
book.fo ; \
        java org.apache.fop.apps.CommandLine book.fo book.pdf
Exception in thread "main" java.lang.NoClassDefFoundError:
org/xml/sax/ContentHandler
        at org.apache.fop.apps.CommandLine.run(CommandLine.java:127)
        at org.apache.fop.apps.CommandLine.main(CommandLine.java:268)
make: *** [book.pdf] Error 1
jlf> 


I have not a clue.


> The XSLT processors I use are Michael Kay's Saxon, James Clark's XT, and
> the Apache Project's Xalan.  There are apparently only two free (speech)
> XSL-FO processors available: the Apache Project's FOP and Sebastian
> Rahtz's PassiveTeX.  The latter can be used to typeset MathML, but it's
> relatively more difficult to set up than FOP (standard TeX installations
> that come with the Linux distros I use don't work very well...I had to get
> the 250 meg TeXLive ISO to do it!).
> 

So, what might I have to do to get PDF target rendered ??

--- Jeffrey L. Franks


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]