On 26.04.2020 17:56, P.O. Jonsson wrote: > Phew! I have been trying to replicate your steps in vain for the past two > days, I did not want to > bother you with my failures. I also found out that making to many failing > attempts I „broke“ JAVA > so everything after these failures the error messages were completely > unpredictable.
Sorry for that! > On Jenkins everything run smooth so it is only when you mistreat xsltproc > that things start go bad. > > This is what I found out so far: > > Adding the option *—catalogs* (minus-minus-catalogs, the spell checker messes > with my text), the > DTD should be taken from what SGML_CATALOG_FILES points to. I have tried a > number of things but > nothing really worked. > > All these did NOT work (and some others also not): > > set > SGML_CATALOG_FILES="///C:/Users/po/workspace/ooRexx-docs-build_V2/docbook-xml-4.5/docbook.dtd/" > set > SGML_CATALOG_FILES="///C:/Users/po/workspace/ooRexx-docs-build_V2/docbook-xml-4.5/docbookx.dtd/" > set > SGML_CATALOG_FILES="C:\Users\po\workspace\ooRexx-docs-build_V2\docbook-xml-4.5\docbookx.dtd" > set > SGML_CATALOG_FILES="///C:/Users/po/workspace/ooRexx-docs-build_V2/docbook-xml-4.5/" > set > SGML_CATALOG_FILES="///C:/Users/po/workspace/ooRexx-docs-build_V2/docbook-xml-4.5/„ > > What I did notice is that the zipped archive you pointed to does not contain > a file *docbook.dtd* > but a file *docbookx.dtd* > > I am also not sure if the —catalogs wants a single file, or a number of > files, as in > docbook-xml-4.5/ (or docbook-xml-4.5) directory, I am not <https://github.com/docbook/wiki/wiki/DocBookAndXmlCatalogs> has a few information on catalogs. It seems that the utility xmlcatalog.exe can be used to indicate the location and xml/xsl files available locally, such that they need not be fetched from the net. More on catalog files: <http://www.sagehill.net/docbookxsl/ToolsSetup.html> and about the book: <http://www.sagehill.net/book-description.html>. Here the HTML-version of that book: <http://www.sagehill.net/docbookxsl/index.html>. > I also read somewhere that you could enter the path to the dtd directly as > the first command on > the commandline, but I never tried it. > > The debugging process is very slow since you need to erase all files between > runs and wait 3-4 > minutes for the quickest files. And indeed if you have a fo file existing and > the xsltprocess > breaks the fo2pdf will just use the existing fo file, this takes a few > seconds only. >From the above HTML version a brief overview about xslt processors (xsltproc, >saxon, Apache Xerxces/Xalan), how to install and how to invoke them for docbook processing: <http://www.sagehill.net/docbookxsl/InstallingAProcessor.html>. --- Looks like one of those things where the ones in the know think everything they know goes without saying/is obvious and therefore not giving enough information for people who use this infrastructure rarely or for the first time. It may boil down to the questions: where to store the dtd/xsl files, how to define a catalog.xml file to point to them, how to get xsltproc (and its companion tools) to find and honor the catalog file. (On Unix it seems the dtd/xsl files get stored to /etc/xml). Ad Unix on Windows using "Cygwin": Cygwin is a utiltiy set of Unix programs for Windows (http://cygwin.com/) with a library that allows to compile Unix programs for Windows. It also uses the Unix file system conventions for its tools like forward slashes and the like. Cygwin remaps its installation location to Unix style locations such that e.g. "/etc", "/bin" directories are available for it. One can install Cygwin's xsltproc and docbook, and using a cygwin shell there is a "/etc/xml" directory with two files, one called "catalog" one "docbook". It is possible to install docbook 4.5 support and then out of the box creating the fo files (step doc2fo) worked: Here are the Unix-style commands (in a Cygwin session on Windows) with their timings to produce the fo files for rexxpg and rexxref: Administrator@T450sRGF /cygdrive/g/oorexx.tmp/gilDocs/orxbldoc-2.0.1/cygwin $ time xsltproc --xinclude --output rexxpg.fo --stringparam use.extensions 0 pdf.xsl /cygdrive/f/work/svn/oorexx/docs/trunk/rexxpg/en-US/rexxpg.xml Making portrait pages on A4 paper (210mmx297mm) real 0m2,669s user 0m2,421s sys 0m0,156s Administrator@T450sRGF /cygdrive/g/oorexx.tmp/gilDocs/orxbldoc-2.0.1/cygwin $ time xsltproc --xinclude --output rexxref.fo --stringparam use.extensions 0 pdf.xsl /cygdrive/f/work/svn/oorexx/docs/trunk/rexxref/en-US/rexxref.xml Making portrait pages on A4 paper (210mmx297mm) real 0m33,451s user 0m33,062s sys 0m0,233s Administrator@T450sRGF /cygdrive/g/oorexx.tmp/gilDocs/orxbldoc-2.0.1/cygwin $ ls -al *fo -rw-r--r-- 1 Administrator None 1674990 27. Apr 15:18 rexxpg.fo -rw-r--r-- 1 Administrator None 11505845 27. Apr 15:18 rexxref.fo Administrator@T450sRGF /cygdrive/g/oorexx.tmp/gilDocs/orxbldoc-2.0.1/cygwin And here the timings for turning those fo files to pdf files: G:\oorexx.tmp\gilDocs\orxbldoc-2.0.1>docprep rexxpg 0 File(s) copied G:\oorexx.tmp\gilDocs\orxbldoc-2.0.1>timeit fo2pdf *** ooRexx-Timeit: command: fo2pdf 15:28:52 - Creating PDF_files\rexxpg.pdf from fo_files\rexxpg.fo using Apache FOP fo2pdf: call fop-2.4\fop\fop.bat -c F:\work\svn\oorexx\docs\trunk\rexxpg\en-US\Common_Content\fop.cfg fo_files\rexxpg.fo PDF_files\rexxpg.pdf 15:28:58 - PDF created *** ended. *** command: fo2pdf *** started: 2020-04-27T15:28:52.876000 *** ended: 2020-04-27T15:28:58.666000 *** duration: 00:00:05.790000 G:\oorexx.tmp\gilDocs\orxbldoc-2.0.1>docprep rexxref 0 File(s) copied G:\oorexx.tmp\gilDocs\orxbldoc-2.0.1>timeit fo2pdf *** ooRexx-Timeit: command: fo2pdf 15:29:07 - Creating PDF_files\rexxref.pdf from fo_files\rexxref.fo using Apache FOP fo2pdf: call fop-2.4\fop\fop.bat -c F:\work\svn\oorexx\docs\trunk\rexxref\en-US\Common_Content\fop.cfg fo_files\rexxref.fo PDF_files\rexxref.pdf 15:29:27 - PDF created *** ended. *** command: fo2pdf *** started: 2020-04-27T15:29:07.061000 *** ended: 2020-04-27T15:29:27.452000 *** duration: 00:00:20.391000 In this combination creating /*rexxpg.pdf *takes a total *appr. 8,5 seconds* (instead of many, many minutes)/ and /*rexxref.pdf* *appr. 53,9 seconds* (instead of more than 10 minutes)/ on Windows. Chances are that on Unix systems producing the docs with xsltproc is straight forward and fast, if having the appropriate docbook 4.5 support installed (and if not, I can supply the cygwin catalog files as an example). The challenge for Windows then is to a) understand how xsltproc and its relatives work on Windows, and b) how they find and process the catalog file(s). ---rony P.S.: It may be the case that an operating system independent solution with the Java versions of Xalan/Xerces is worthwhile exploring as we are already using Java in the fo processing step.
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel