Websites returning

Inasmuch as I accidentally deleted most of my websites and this blog last night, my “Full backup of all your data to remote servers every day” webhost then only had a backup from 27 June, i.e., somewhere in the middle of my migrating between servers such that there was no backup for most of my sites.

The net result is (a) I will be paying a lot more attention to doing my own website backups in future; (b) I’m busy scraping pages from the WayBack Machine and Google’s cache to remake the web sites; (c) the graphics don’t feature in the caches, so they’ll take longer to get back; and (d) this blog’s styles disappeared along with everything else and is now using the current default. You probably won’t miss the blog styles all that much, but losing them left WordPress in a state where it was both configured to serve RSS and not configured to have the RSS link on the pages, with the result that it threw an error on each request and didn’t serve anything. Finding and fixing that just added to the effort.

So while the websites are mostly back, it will be a while before they’re pristine again. The http://www.mentea.net/ website design is due to be revamped real soon now, anyway, but I still need the old content in order to transfer it to the new layout.

New XSL-FO 2.0 Working Draft

Inasmuch as that was always the plan, the XSL-FO 2.0 Working Draft published yesterday (latest version always at http://www.w3.org/TR/xslfo20/) is the first to incorporate new FOs and properties from the previous “Design Notes” document into the text from the XSL 1.1 Recommendation. The new WD also features more extensive linking from FO, property, and function references to their definitions. Continue reading “New XSL-FO 2.0 Working Draft”

CSS for the hierarchically minded

Inasmuch as both HTML and XML markup – being descended from SGML – support a nested, hierarchical structure and as CSS allows, even promotes, a stream-of-consciousness style of coding, there can be a tension between the two approaches.

To put it another way:

  • If you want different styles in a couple of contexts that depend on the type of several levels of ancestor, then you get to put all those ancestors in the CSS selectors for each of those styles;
  • If you want to use the same colour in multiple different styles, then, by golly, you get to enter the same color value in each of them (and if you want to change it later, you get to find them all again to do it); and
  • If you want to use the same set of styles in multiple contexts – say, use rounded corners multiple places and with bigger radii on the outermost corners – then you get to repeat the same set of styles while jiggering their values every place that you want them.

The CSS soon gets to the point that only a machine can reliably work out the cascading and so we require tools such as Firebug to make sense of it and present it to us in ways that we can understand.

I have previously implemented a system for a client where the template CSS file is wrapped in an XML element and contains empty elements for each of the values of color properties so the all-XML processing system can ‘skin’ the stylesheet by substituting the preferred color values and outputting proper CSS on the way to making the HTML, but that was adding complexity, not taking it away.

Enter LESS (http://www.lesscss.org/), the “dynamic stylesheet language”. LESS is pretty much CSS as it should have been, since it elegantly solves the gripes listed above, and more besides. Continue reading “CSS for the hierarchically minded”

XML Summer School 2011 ends on high note

Inasmuch as my final “XSLT and XSL-FO toolbox of tips and tricks” session was well received, XML Summer School 2011 finished on a high note. My other sessions, “Developing and Testing in XSLT” with Jeni Tennison in the “XSLT/XQuery” track and a five-minute Ignite-format talk on EPUB, also went well, but it was that final talk in the “Publishing” track that got the most visible reactions. Continue reading “XML Summer School 2011 ends on high note”