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] Xsltproc with XInclude (Docbook 5)


Hello palindromic stimits,

>I am trying to find a suitable combination of tools under Linux 
>(currently Fedora 23) for validating and publishing from Docbook 5 
>to PDF, PostScript, RTF, and some variant of HTML (preferably xhtml 
>strict, but most any variant will work). Some of my testing 
>"almost" works via xsltproc using the sourceforge download for 
>docbook.xsl, but apparently what I need is the "xi" version, 
>docbookxi.xsl, which I have not been able to find.

I do not know of any such thing.  It may exist, but I have never 
heard of it.

Separate the two problems.

You want to 1) use xinclude and 2) transform your Docbook.

>If I give up dividing into multiple files vi XInclude, and instead 
>use a DTD and entities, or else create one large monolithic file, 
>things work...however, this is very difficult to work with...I'd 
>end up going back to less desirable less flexible tools.
> 
>For use of Docbook 5 under Linux and xsltproc, where would I find a 
>suitable XInclude stylesheet (docbook.xsl)? Or is there some other 
>recommended route for processing Docbook 5 books while splitting 
>into separate files for each chapter?

I have little experience with Docbook 5.x (mostly Docbook 4.x), but 
I have dabbled with it and here's what I do.  This works famously 
for Docbook 4.x and seems to work just fine for me for Docbook 5.x.  
Sure, I have to process the entire document every time, but that's 
just fine, as far as I'm concerned.  At least, I can still organize 
the document as I would like.

Note:  I'll show my validation steps for Docbook 5.x, as well.

  xmllint --nonet --noent --xinclude book.xml > monolithic.xml
  jing /path/to/5.x/docbook.rng  monolithic.xml

If jing doesn't complain, you should be able then to move along to 
processing with the docbook5-xsl-stylesheets.  I show the path on my 
system, yours will probably differ slightly.  (No laboratory 
command-lines were tested in the production of this email.)

  xsltproc > monolithic-one-page.html \
    --nonet \
    /usr/share/xml/docbook/stylesheet/nwalsh5/1.78.1/html/docbook.xsl \
    monolithic.xml

  xsltproc > monolithic.fo \
    --nonet \
    /usr/share/xml/docbook/stylesheet/nwalsh5/1.78.1/fo/docbook.xsl \
    monolithic.xml

  fop -fo monolithic.fo -pdf monolithic.pdf

  # some people prefer PDF from dblatex:
  #   dblatex -F xml -t pdf -o monolithic.pdf monolithic.xml

You can probably figure out how to get from PDF to Postscript.

As for RTF, I've no idea, but maybe 'pandoc' is your friend here.

In the stylesheets directory, you should be able to find the 
stylesheets for html, xhtml and xhtml5.  If you need to know the 
distinction between these, perhaps somebody else can address that.

The answer may be in the book on the Docbook Stylesheets:

  http://www.sagehill.net/docbookxsl/

Best of luck and may the best namespace be unadorned,

-Martin

P.S. I think the docbook stylesheets are great.  And both the 
  printed book and the online documentation are fantastic.  Yes, 
  Bob Stayton--I know you are usually reading here, so thank you...

-- 
Martin A. Brown
http://linux-ip.net/


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