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]
Other format: [Raw text]

Re: xsl-fo: title page customization and bug resolutionin xsltproc


I had the same problem over the weekend.  This must be a problem with
xsltproc, I wrote a readme for the complete resolution process.  It entails
using the java Xerces-Xalan-FOP build environment, support seems to be
better in this environment and the performance isn't as desirable as
xsltproc, but I believe it is more supported and will eventually replace
xsltproc as time goes on (I opened a can of worms on that statement ;).  Do
the following (or move directly to line item 7 if you have
Xerces-Xalan-FOP).

To create build environment for DocBook Documents (Redhat Distro)
-------------------------------------------------
Date:    Feb 18, 2003.
Author:  Damian Kohlfeld

1) install j2sdk-1.4.x
 (j2sdk1.4.1_01 at time of this writing)

2) cd into /usr/java/j2sdk1.4.1_xx directory
 (/usr/java/j2sdk1.4.1_01 at time of this writing)

3) install jai-lib-linux for the JDK (not JRE environment)
    Note: This isn't documented anywhere!!! in the FOP install docs.  The rc
version of FOP no longer uses Jimi.
 (jai-1_1_2-beta-lib-linux-i586-jdk at time of this writing)

4) cd into opt and unzip xalan bundle and fop
 (xalan-j_2_4_1-bin.tar.gz and fop-0.20.5rc-bin.tar.gz at time of this
writing)

5) Update the CLASSPATH variable in $HOME/.bash_profile to include
directory to the tools.jar file which came with the j2sdk, where
$HOME is the path to your home directory.

i.e. (for j2sdk1.4.1_01 at time of this writing)
CLASSPATH=/usr/java/j2sdk1.4.1_01/lib/tools.jar

export CLASSPATH

6) Update your PATH variable in $HOME/.bash_profile to include the
path for the java executable, where $HOME is the path to your home
directory.

i.e. (for j2sdk1.4.1_01 at time of this writing)
PATH=$PATH:/usr/java/j2sdk1.4.1_01/bin

export PATH

7)  To create the custom stylesheet with the spec file, run this command:

java -Djava.endorsed.dirs=/opt/xalan-j_2_4_1/bin
org.apache.xalan.xslt.Process\
 -out fo/mytitlepages.xsl -in fo/titlepage.templates.xml\
 -xsl template/titlepage.xsl


---------------------------------------------------------------------

You are now ready to build DocBook documents using the build scripts.

----- Original Message -----
From: "Bernd Kuemmerlen" <bkuemmer at gmx dot net>
To: <docbook-apps at lists dot oasis-open dot org>
Sent: Tuesday, February 18, 2003 6:09 AM
Subject: DOCBOOK-APPS: xsl-fo: title page customization


> Hello there,
>
> sorry if this might be a newbie question, but I am very new to the world
> of xsl.
>
> I would like to customize the title pages of our pdf documents using the
> method described in
> <http://www.sagehill.net/xml/docbookxsl/HtmlCustomEx.html#HTMLTitlePage>
> and
>
<http://www.sagehill.net/xml/docbookxsl/PrintCustomEx.html#PrintTitlepageSpe
cfile>
>
> My problem is that the stylesheet I create with
>
> xsltproc --output fo/mytitlepages.xsl template/titlepage.xsl
> fo/titlepage.templates.xml
>
> (for testing purposes I just tried to use the provided
> titlepage.templates.xml) has a lot of empty namespace prefix
> declarations like
>
> <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:ns1=""
> xsl:use-attribute-sets="article.titlepage.recto.style"
> ns1:keep-with-next="always" ns1:font-size="24.8832pt"
> ns1:font-weight="bold">
>
> the fo generation from a DocBook XML file using xsltproc gives lots of
> errors about "Empty namespace name for prefix ns...":
>
>   xsltproc --catalogs --output ./fo/job.fo \
>
> /raid/1/projects/ilab/Documentation/lib/xml/xsl/docbook/mevis/fo.xsl
job.xml
>
/raid/1/projects/ilab/Documentation/lib/xml/xsl/docbook/fo/mytitlepages.xsl:
152:
> error: Empty namespace name for prefix ns1
> le" ns1:keep-with-next="always" ns1:font-size="24.8832pt"
> ns1:font-weight="bold
>
>         ^
>
/raid/1/projects/ilab/Documentation/lib/xml/xsl/docbook/fo/mytitlepages.xsl:
166:
> error: Empty namespace name for prefix ns2
> ="article.titlepage.recto.style" ns2:space-before="0.5em"
> ns2:font-size="14.4pt
>
>         ^
>
> and the subsequent processing of the FO with XEP also fails with an
> error related to the prefix:
>
> xep.sh -fo ./fo/job.fo -out ./pdf/job.pdf
> (document
> (validate SAX parsing errors encountered no such prefix "ns15"
>
> What is the problem here? Is there any option to xsltproc I must set?
> The versions I am using are
>
> xsltproc --version
> Using libxml 20501, libxslt 10024 and libexslt 715
> xsltproc was compiled against libxml 20501, libxslt 10024 and libexslt 715
> libxslt 10024 was compiled against libxml 20500
> libexslt 715 was compiled against libxml 20500
>
> and
>
> docbook-xsl-1.60.1
>
> Thanks for any help
> Bernd
>
>


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