Generate static web-based CV from XML.
You need to use an XSLT 2.0 processor to translate your XML database to HTML files. I have used SAXON.
The example/ directory contains a stripped down example:
- File bec.xml is an example database.
- File bec.html.xsl is the top-level stylesheet that defines the set of top-level pages. This file uses the cvx*.xsl stylesheets in the root directory.
The Makefile will need to be modified to point to your XSLT processor.
For maintaining a research website, I had gotten tired of manually modifying a bunch of HTML/CSS files that would easily get inconsistent.
My requirements for the website were as follows:
- A single data source to minimize inconsistencies.
- Flexible output into any number of formats.
- Static output that can be posted on any web server.
A dynamic, content management system did not really fit the bill, so I went with a handcrafted, barebones system using XSLT.
It's minimalistic, but I have posted it here as starting point for others who might want to do the same.
The cvx*.xsl stylesheets have been created incrementally as needed, and I have not made much effort to make it general. To get the desired layout, you will probably need to modify them.
This process is in part inspired by a similar set of scripts by Adam Chlipala.