xmlto for Windows

Anything
Awatar użytkownika
admin
Site Admin
Posty: 104
Rejestracja: ndz lip 17, 2011 8:51 am

xmlto for Windows

Post autor: admin »

xmlto is a shell-script tool for converting XML files to various formats, released under GNU GPL 2 license (see COPYING file).

The biggest problem I met when trying to build it for Windows was getopt. It's a dependency that's automatically satisfied on Linux, but requires an effort on other systems. Now windows version is downloadable.

xmlto homepage: https://fedorahosted.org/xmlto/
Download windows binaries: xmlto-0.0.25-win-bin.zip (md5sum 3de19ba119ec5206e60f57578d0800c5)
Download source: xmlto-0.0.25.tar.gz (md5sum a88cd3f08789b4825d1ac89fa065170d) (sf-mirror)

xmlto uses xsltproc. On xslt homepage you will find links to Windows binaries. You will need to download dependencies also: libxml, iconv, zlib. Using these tools on Windows is a bit tricky, so you may find also this article useful: libxml catalogs on Windows.

Building from source
  1. Once you have getopt.exe in your path, building xmlto should be a walk in a park.
  2. Watch out for utilities discovered by configure in directories with spaces, like Program Files. They screw up the process. The simplest workaround is to inspect the PATH variable (echo $PATH), remove unwanted components and set the shorter PATH (export PATH="...").
  3. Rather don't issue this nice make clean command. It purges man files contained in source archive and you will rebuild it by yourself during next make. This is very taughtful experience, especially considering the ability to properly configure docbook tools, but one may want to avoid it.
  4. If a tool is discovered during configure, its location is hardcoded into xmlto script. So best results are achieved when no tools are discovered :) , as it results in most portable executables. Editing xmlto and removing hardcoded paths manually should also work. Just remove the path and leave only the program name, for example: XMLLINT_PATH=xmllint.
Additional tools need to be in path, so after entering msys shell I do something like that:

Kod: Zaznacz cały

export PATH=$PATH:/d/Program_Files/xslt/bin
For PDF transformation I use MikTex.
ODPOWIEDZ