PipedStylesheets.bash
Jump to navigation
Jump to search
Idea
This is a shell script (in the bash language) that executes each stylesheet it finds in its own directory on the specified input file. It uses (and thus depends on) the xsltproc command, which is part of the [libxslt] library. Mac OS X users can easily obtain xsltproc via [fink].
Quick Usage Summary
Copy this script and all the stylesheets you want to execute into a single directory. Make sure that the stylesheets all end in ".xslt" and are named such that they are sorted in the order you wish to have them executed. Then run the script, specifying the input file as the only argument.
Detailed Instructions
- Log into a commandline interface to a bash-enabled system, e.g. Mac OS X or Debian GNU/Linux.
- Create a new directory (if needed), and cd into it. E.g. mkdir ~/Desktop/p42p5/; cd ~/Desktop/p42p5/.
- If your bash executable is not /bin/bash, then change both occurences of the string "/bin/bash" to a working path to the bash executable. You can probably ascertain such a path with the command which bash.
- Copy all of the desired stylesheets into the new and current directory. You may want to get all or some of the stylesheets at P4toP5, and you may want Remove-Default-Attributes.xsl, although remember that it only works on the elements