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)

Let me share my Makefile with you

      1 html:
      2                 rm -rf site
      3                 mkdir site
      4                 cp css/* site
      5                 xmllint --noent --xinclude \
6 module.xml > /tmp/docbresolved.xml \
      7                                 2>./errloglint
      8                 xsltproc \
      9                                 --output site/ \
     10                                 docbook.xsl \
     11                                 /tmp/docbresolved.xml \
     12                                 2>./errlogxslt && \
     13                 tar czf site.tgz site/*
     14                 echo "site.tgz ready for deployment"
     16 pdf:
     17                 xmllint --noent --xinclude \
18 module.xml > /tmp/docbresolved.xml \
     19                                 2>./errloglint
     20                 xsltproc \
     21                     --xinclude \
     22                     --output /tmp/docbfo.fo \
     23                     docbook.fo.xsl \
     24                                 /tmp/docbresolved.xml \
     25                                 2>./errlogxslt && \
     26                 fop -fo /tmp/docbfo.fo \
     27                                 module.pdf \
     28                                 2>./errlogfop
     29                 rm /tmp/docbfo.fo
     30                 echo "module.pdf ready for deployment"

I only create html or pdf, not the other output formats.
I use xmllint to process the includes. I use includes extensively

An example of the top level document

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [
<!ENTITY % uvmatent SYSTEM "file:///basics/uvmat_entities.ent">
<book version="5.0" xmlns="http://docbook.org/ns/docbook";

    <title>Akademiuddannelsens it-speciale</title>
    <xi:include href="prepost/bookinfo.docbook.xml" />
    <xi:include href="prepost/forord.docbook.xml" />

        <title>Grundlæggende programmering</title>
        <xi:include href="chapters/javaLekt1.docbook.xml" />
        <xi:include href="chapters/javaLekt2.docbook.xml" />
        <xi:include href="chapters/javaLekt3.docbook.xml" />
        <xi:include href="chapters/javaLekt4.docbook.xml" />
        <xi:include href="chapters/javaLekt5.docbook.xml" />
        <xi:include href="chapters/javaLekt6.docbook.xml" />
        <xi:include href="chapters/javaLekt7.docbook.xml" />
        <xi:include href="chapters/javaLekt8.docbook.xml" />
        <xi:include href="chapters/javaLekt9.docbook.xml" />
        <xi:include href="chapters/javaLekt10.docbook.xml" />

The chapters are built from sections, also includes.
Coding examples (these are programming lessons) are also
includes with live code:

<programlisting language="java"><xi:include href="../codej/lesson4/src/CprTestObject.java" parse="text"/></programlisting>

The includes provide maximum flexibility. Couldn't do it without them.

Hope you find this useful.

Niels Muller Larsen, MSc
Programmer, Assoc Professor

Ring around the collar.

On 05/02/16 08:36, Dave Pawson wrote:
Also on Fedora 23, 64bit

On 2 May 2016 at 01:43,  <stimits@comcast.net> wrote:

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).

Edit: Emacs.
Validate: Jing
to  PDF: One of the two commercial XSL-FO tools, Antenna House  or XEP
RTF: Steve? I can't find it (GIYF)
PS: Don't know.
HTML: Standard Docbook transforms.

 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. 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.

You might want to shift from the DTD's to relax ng, then use the namespaced

xsltproc might work, but I have bash shell scripts for all my conversions.

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

I expand my includes using the resolver.jar file?

ava   -cp /sgml:/myjava/saxon655.jar:/myjava/xercesImpl.jar:/myjava/resolver.jar
com.icl.saxon.StyleSheet   -o op.html   -w1 <input>.xml
docbook.html.xsl  "saxon.extensions=1"  $4 $5 $6


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