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: Again: Apache FOP,Docbook: Features / Versions,"complete" Docbook distribution


This complete "framework" is SO complex to setup, I have never seen 
something like this before, especially when there is no documentation 
that explains the necessary steps in one document. currently I feel like 
playing a text-adventure, getting different types of hints from 
different persons.

so to go into detail:

David Cramer wrote:

> This might help:
> http://lists.oasis-open.org/archives/docbook-apps/200111/msg00182.html
> 


there stands essentially to use xalan extension. and to turn on those 
extensions, but unfortunately not in detail HOW to turn them on. I would 
guess I have to write an xsl stylesheet importing the standard 
stylesheet(s)?

then again: which to use? another user told me I should use the schema:
________________________________________________________________________
my.xml --> my.fo   using fo/docbook.xsl
my.fo  --> my.fop  using fo/fo-patch-for-fop.xsl (included w/1.48)
my.fop --> my.pdf  using fop.
________________________________________________________________________

so, which stylesheets do I have to modify? only the docbook.xsl, or also 
the patch.xsl?

I tried to write "my_docbook.xsl" and "my_patch.xsl". then I tried to 
call xalan with the described parameter. to keep it short, it did not work.

the error is:
________________________________________________________________________
      [echo] Create SWP User Documentation: all in PDF format:
      [echo] Formatting Options File
      [java] file:///e:/docs/docbook/docbook-xsl-1.48/fo/docbook.xsl; 
Line 94; Co
lumn 16; Making portrait pages on USletter paper (8.5inx11in)
      [java] file:///e:/docs/docbook/docbook-xsl-1.48/fo/table.xsl; Line 
180; Col
umn 69;
      [java] XSLT Error (javax.xml.transform.TransformerException): null
      [java] Java Result: -1
________________________________________________________________________


As all of this stuff becomes so complex, I put all this calls into an 
ant file. I show you the relevant target of the ant file, this is:

________________________________________________________________________
     <!-- create pdf -->
     <target name="convert_pdf" depends="validate">
         <echo message="Create SWP User Documentation: all in PDF 
format:" />
         <echo message="Formatting Options File" />
         <java
             classpath="${xalanclasspath}"
             classname="org.apache.xalan.xslt.Process"
             fork="yes"
             dir="${src}"
             >
             <arg line="-in ${srcfilename} -xsl 
${docbook_xsl_pdf_path}fo/my_docbook.xsl -out ${pdffilename}.fo -param 
xalan.extensions 1" />
         </java>
         <java
             classpath="${xalanclasspath}"
             classname="org.apache.xalan.xslt.Process"
             fork="yes"
             dir="${src}"
             >
             <arg line="-in ${pdffilename}.fo -xsl 
${docbook_xsl_pdf_path}fo/my_fo-patch-for-fop.xsl -out 
${pdffilename}.fop -param xalan.extensions 1" />
         </java>
         <echo message="PDF out of Formatting Options File" />
         <java
             classpath="${fopclasspath}"
             classname="org.apache.fop.apps.Fop"
             fork="yes"
             dir="${src}"
             >
             <arg line="-fo ${pdffilename}.fop -pdf ${pdffilename}.pdf" />
         </java>
     </target>
________________________________________________________________________

with "my_docbook.xsl" and "my_patch..:" (off course the patch document 
imports the patch style)like this:
________________________________________________________________________
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version='1.0'
                 xmlns="http://www.w3.org/TR/xhtml1/transitional";
                 exclude-result-prefixes="#default">

<xsl:import href="docbook.xsl"/>

<xsl:variable name="use.extensions">1</xsl:variable>
<xsl:variable name="tablecolumns.extension">1</xsl:variable>
</xsl:stylesheet>
________________________________________________________________________


the error mentioned above occurs. btw.: using docbook.xsl 1.48, xalan 2 
and the xalan extension jar is in the xalan classpath, fop 0.20.2. it 
makes no difference if I use "my_fo-patch-for-fop.xsl" or 
"fo-patch-for-fop.xsl".

the ant script works with no error if I use the "normal" styles instead 
of the my_styles; I mean "work" with all the problems (no tables, ...).


maybe anyone could find the time to give me some complete answer. If I 
ever should manage to run all that stuff, I swear I will write at least 
a brief tutorial how to setup these things, because in the state as it 
is now, I guess at least 99% of potential users will be frustrated with 
setup and forget docbook again. I usually manage to setup all stuff like 
that (enhydra, tomcat, cocoon, ...) but this time...


thank you in advance for any help



Alex


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