OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] XML Processing on a Mac




Johnson, Eric wrote:
> 
> I want to set up my Mac to process DocBook using XSLT and not the Jade
> stuff. Can somebody offer a few pointers?
> 
> 


Just went through this over the last week.  Ended up with the following
which is working quite well for me on a MacbookPro.  I've a docbook file
from which I create chunked HTML for a doc hosts and a PDF for peer review.

  * xsltproc, from Fink
  * docbook-5.0CR1, from docbook.org
  * docbook5ns-xsl-1.71.0, from docbook.org (note it's docbook5...)
  * fop-0.93, from xmlgraphics.apache.org

Here's my build.sh script exhibiting parameters and the like:

---- start ----
#!/usr/bin/env bash

DOC=$1
XSLT=xsltproc
XSLDIR=docbook5ns-xsl-1.71.0
FO_XSL=$XSLDIR/fo/docbook.xsl
CHUNK_XSL=$XSLDIR/xhtml/chunk.xsl
FOP=./fop-0.93/fop
FOPEXT="--stringparam  fop1.extensions 1"

rm -rf build
mkdir -p build/{html,fo,pdf}

echo transforming docbook to chunked html
$XSLT --stringparam base.dir build/html/ $CHUNK_XSL $DOC.docbook
cp -r images build/html/

echo transforming docbook to fo
$XSLT --output build/fo/$DOC.fo $FOPEXT $FO_XSL $DOC.docbook

echo transforming fo to pdf
$FOP -fo build/fo/$DOC.fo -pdf build/pdf/$DOC.pdf
---- end ----

The end result is  a PDF replete with bookmarks (note it's fop1.extensions,
not fop.extensions as was the case with fop 0.20).

FWIW, I ended up using Emacs with nxml-mode as my docbook editor.  Although
I've been using Eclipse for the last few years, I had trouble getting it
setup, especially with the RelaxNG schema that Docbook5 pushes.  I'd been an
emacs user prior so old habits came back.  The mode has good tag completion
and helpful hints when the doc is malformed.  Haven't got it working with
split docs, however.  



-- 
View this message in context: http://www.nabble.com/XML-Processing-on-a-Mac-tf2962313.html#a8305850
Sent from the docbook apps mailing list archive at Nabble.com.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]