This Time Self-Hosted
dark mode light mode Search

No more PHP for my site…

My developer site was, until now, using PHP on my local system to build the XHTML pages starting from some XML files. This was a bit of a problem as PHP is… a mess.

Edit: just to clarify, I think PHP is a mess for two reasons: a) php can be great to add simple dynamic contents to a page, but it’s not so suited for CLI usage to create a series of static pages b) the XML parsing code IS messy if you don’t use simplexml, and simplexml requires PHP5, and still it had a couple of problems with my content, and I had to quote its content into a <[CDATA[ section to get it right.

By the way, the time needed to recreate all the site with the same content is way less using xslt than continuing PHP-parse the XML datafiles to get the output xhtml files. :tidE

Being working lately with ProjectXML and GuideXML files in bsd project pages, I though of looking at the xslt pages to do a similar work.

The result is that I reworked a bit my XML datafiles to aggregate the data without using two-stage xml files, and then wrote a series of XSL files to translate them to XML with xsltproc…

No changes on the site, but now is way simpler and faster for me to add a new release of a project, or add a news, or whatever else 🙂

I’ll probably release a copy of the sources soon, in the mean time if someone wants to look at them, just mail me and I’ll send you 🙂

emerge unmerge php …

Comments 1

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.