O.K., could get a proof-of-concept doc->fo working on Ubuntu without having to 
install anything on
Ubuntu.

Steps:

  * copy Gil's xsl-files to a temporary directory
  * adjust DOCPATH in the following script doc2fo.sh:

    #!/bin/sh
    DOCPATH=~/dev/oorexx-code-0/docs/trunk
    COMMON_SOURCE_SPEC=${DOCPATH}/oorexx/en-US/*
    # STRINGPARAM=--stringparam use.extensions 0


    WHICHDOC=rexxpg
    TMPPATH=${DOCPATH}/${WHICHDOC}/en-US
    COMMON_TARGET=${TMPPATH}/Common_Content
    mkdir $COMMON_TARGET
    cp -prt ${COMMON_TARGET}  ${COMMON_SOURCE_SPEC}
    echo $WHICHDOC ...
    time xsltproc --xinclude --output ${WHICHDOC}.fo ${STRINGPARAM}  pdf.xsl 
${TMPPATH}/${WHICHDOC}.xml
    echo $COMMON_TARGET
    rm -rf ${COMMON_TARGET}

    WHICHDOC=rexxref
    TMPPATH=${DOCPATH}/${WHICHDOC}/en-US
    COMMON_TARGET=${TMPPATH}/Common_Content
    mkdir $COMMON_TARGET                                                        
                                                           cp -prt 
${COMMON_TARGET}  ${COMMON_SOURCE_SPEC}
    echo $WHICHDOC ...
    time xsltproc --xinclude --output ${WHICHDOC}.fo ${STRINGPARAM}  pdf.xsl 
${TMPPATH}/${WHICHDOC}.xml
    echo $COMMON_TARGET
    rm -rf ${COMMON_TARGET}

Then run the shell script "sh doc2fo.sh".

The resulting fo-files and pdf-files (both, cygwin and ubuntu) can be viewed 
temporerily at:
<https://www.dropbox.com/sh/ytjfeq27wpmc7sf/AACWmi0u1xhosxsEQ5_V6113a?dl=0>.

A few remarks:

  * the step fo->pdf was carried out on Windows,
  * currently it is necessary to copy the common files to each book 
subdirectory (the script removes
    that subdirectory after running xsltproc to keep the branch "clean"),
  * the above script needs to be adapted for all the books, one idea would be 
to create eventually a
    single Rexx script that determines on which operating system it runs and 
carries out all
    necessary steps automatically.

Todo:

  * get the Windows fo->pdf speedier by figuring out how to get downloaded 
dtd/xsl files honored by
    the Windows version of xsltproc
      o alternatively settle on cygwin
  * add the fo->pdf step to Unix (should be comparable to Windows),
  * remove need to copy common files from the oorexx "book" to all of the book 
branches for which a
    rendering gets created,
      o my post from March, 24th, 18:41, reported on the necessary changes in
        <https://sourceforge.net/p/oorexx/mailman/message/36956517/> in 
conjunction with pdf.xsl,
  * look into creating epub versions of the documentation as there seem to be 
stylesheets defined
    for that as well,
  * test producing the renderings with Java (in a platform independent manner) 
using Apache
    Xalan/Xerces.

---rony


On 27.04.2020 16:00, Rony G. Flatscher wrote:
> On 27.04.2020 15:49, P.O. Jonsson wrote:
>> Thanks Rony for the information, I have been to most of these places already 
>> :-( but indeed you are right, I am entirely in the dark since I do not 
>> really understand the logics behind these things.
>>
>> That said - I will give it a few more tries, but you raise a question that 
>> should maybe be explored: How much work would it be to remap the build 
>> process to Linux? On Jenkins server (running Ubuntu 18.04) there is plenty 
>> of processing power available, also when running Jenkins server.
> The step from xml to fo with xsltproc could work out of the box (just checked 
> on my Ubuntu machine,
> it has docbook 4.5 support in /etc/xml and the files in 
> /usr/share/xml/docbook). The step from fo to
> pdf needs Java and Gil's findings could be used to get it running on Ubuntu 
> as well.
>
>> Did you compare the output quality on your build with Cygwin?
> Yes, skimmed through the pdfs and they look as before.
>>  I remember that for the Publican build the quality of the output was 
>> inferior to builds on Windows
> This has been strange, probably (pure speculation) the quality of the output 
> was inferior because
> the quality of the bitmaps got tampered with.
>
> ---
>
> Will try out the xml->fo step on Ubuntu and report back ASAP.
>
> ---
>
> Just a word ad Gil's incredible effort to get that going on Windows: just 
> witnessing how difficult
> it has been (not yet solved) to get it up and running on Windows and still 
> getting locally available
> dtd/xsl to be honored, it is just incredible how much effort and patience Gil 
> must have thrown at
> this beast! Allowing creating the docs in the end after a frustratign period 
> where this ability was
> not there anymore or at least waning due to outdated tools that got more and 
> more problems on Windows!
>
> Even if the documentation could be created on Linux it still would be very 
> important to get the
> Windows build take locally available dtd/xsl files to speed it up as not 
> everybody has Linux available!
>
> ---rony
>

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to