XSLT Content Management
I wanted this web site to be simpler and more portable, so I threw out Wordpress, PHP, and MySQL, and wrote my own code based on one XML and one XSLT file.
Here is an excerpt of the XML file:
<post> <date>2012-02-18T22:20:00</date> <url>xslt</url> <title>XSLT Content Management</title> <css>pre{ background-color: #EEEEEE }</css> <excerpt>I ported my web site from PHP to XML and Java.</excerpt> <tags> <tag>xslt</tag> <tag nolink="true">xsl</tag> </tags> <tns:content xmlns="http://www.w3.org/1999/xhtml"> <p>I wanted this web site to be simpler and more portable,
The XSLT file creates several (X)HTML files using the xsl:result-document
instruction. Where I needed server side dynamics, I used JSPX and Java.
Features:
- Portable
- Fast (no database)
- Secure (static files)
- Separates content from style and code
- Tags
- RSS feed
- Links to next and previous post
- "Hidden"/unlisted posts (pages), etc.
- Support for custom CSS + JavaScript
To simplify building and error detection, I configured this XML pipeline using maven-antrun-plugin:
- Validate content.xml
- Transform with XSLT
- Validate HTML files (XHTML 1.1 Strict)
- Check well-formedness of JSPX files and feed.xml
Created on Sat, 18 Feb 2012 22:20
blog comments powered by Disqus