Section M.2 Installing xsltproc
Subsection M.2.1 xsltproc binaries
This is the most annoying part of the installation. Obtain four zip archives from Igor Zlatkovic’s FTP site that hosts the most recent Libxml binaries for Windows. At the time of this writing, the 64-bit binaries were considered experimental. I have had no trouble using the 32-bit binaries on my 64-bit Windows 7 system, so I suggest that all PreTeXt users download the most recent 32-bit version of the following libraries:
1
ftp://ftp.zlatkovic.com/libxml
xsltproc
Zip Filesiconv
(filename something likeiconv-1.9.2.win32.zip
)libxml2
(filename something likelibxml2-2.7.8.win32.zip
)libxslt
(filename something likelibxslt-1.1.26.win32.zip
)zlib
(filename something likezlib-1.2.5.win32.zip
)
We only need a handful of files from these archives. So the simplest thing is to leave them in your Downloads folder and grab what we need. Create a new folder
C:\xsltproc
(it can be anywhere, as long as it’s a new location). We’ll call this location <xsltproc>
in case you named your folder something different.Extract the following files from the four zip archives you downloaded above into
<xsltproc>
:xsltproc
Extracted Zip Files- From
iconv-*.win32.zip
:iconv-*.win32\bin\iconv.dll
- From
libxml2-*.win32.zip
:libxml2-*.win32\bin\libxml2.dll
libxml2-*.win32\bin\xmllint.exe
- From
libxslt-*.win32.zip
:libxslt-*.win32\bin\libexslt.dll
libxslt-*.win32\bin\libxslt.dll
libxslt-*.win32\bin\xsltproc.exe
- From
zlib-*.win32.zip
:zlib-*.win32\bin\zlib1.dll
Subsection M.2.2 Change PATH environment variable
Note: if you prefer not to meddle with this, it can be avoided. Now, we need to make sure your system can find these files when we need them.
xsltproc
- Open the Start menu and start typing “Edit the system environment variables”. Select this option when it becomes visible.
- Click the Environment Variables button near the bottom of the dialog.
- In the bottom part of the dialog labeled “System environment variables”, look for a variable named
PATH
. You may need to scroll.- If you do not find one, create it using the New... button. Make sure to use all capital letters. (This really shouldn’t happen. Make sure you are editing the system environment variables, not the user environment variables.)
- If you do find the
PATH
variable, select it and click the Edit... button.
- Regardless of which of steps 1 and 2 you followed, now you should see a dialog with two text fields. Your variable name should be
PATH
. - If you created this variable, populate the second field with the full path name of
<xsltproc>
, the location where you put the seven files from Igor’s zip archives. For me this looks likeC:\xsltproc
. - If you are editing the
PATH
variable, place the cursor in the existing value and press the End key, so that the cursor moves to the back of the line. ThePATH
string is a;
-delimited list of full path names, so append the string<xsltproc>;
(note the semicolon) to the existing value. If you named <xsltproc> as we suggested above, then the last part of yourPATH
variable is nowC:\xsltproc;
. - Click OK to save changes.
Congratulations, you have successfully installed
xsltproc
.Note that you have installed the
xmllint
utility as part of this procedure. This utility will allow some text editors to lint your PreTeXt files, that is, to automatically detect and highlight errors, and perhaps even to explain them.