Recent entries

Rendering the Symphony admin with XSLT

@kanduvisla opened an issue about the possibility of rendering the Symphony admin pages with XSLT.

Symphony 3 had been developed to make this possible.

I have created my own experiments with this in mind. I’d like to continue those experiments, starting with a collection of all the Symphony admin page layouts, rendered as plain old HTML.

View the Symphony Demo in the Markup Library. Now, if anyone wants to find out more about Symphony without going through the trouble of installing (which is really no trouble at all), just look around the Symphony admin area and the debug pages to get familiarized with how the system works. Feel free to fork the html-symphony repository on GitHub.

No harm can be done, because this is just plain old HTML.

Debug Pages

One note about the ?debug pages: I have only rendered the pages for the Home page, as I was just doing a copy/paste from a local install, and I didn’t want to do the whole set for every page. I figured people could get the basic idea based on only the Home page Debug and Profile pages.

Building the Admin with XSLT

So, the next step is to rebuild the admin with XSLT. I already have some ideas about using Nick Dunn’s Section Schemas extension and Form Controls templates to dynamically build the Publish pages. But I would also like to dig a little deeper into how Symphony 3 proposed to do this.

Portability of templates between scripting languages

My ultimate goal with this project is to explore the possibility of the portability of XSLT templates between multiple scripting languages as a way of establishing XSLT as a standard for templating in the process of front end web design and development.


Follow the discussion I have started on the Symphony discussion forum:

Symphony Book

The Symphony book project was cancelled.

Project Cancelled

After nine months and ten chapters, Wrox decided to cancel this book project in June 2011. Symphony Start to Finish was to be the first comprehensive guide to building websites and web applications with Symphony. It was meant to cover the next major version of the platform, but after Symphony lost its only full-time developer, progress on that version was delayed significantly, and in the end Wrox was unable to accommodate the extended timeline.

What Now?

The considerable work put into the manuscript will be incorporated into Symphony’s free online documentation.

Thank you for donating your book to the community, Craig.

Now, the Symphony book is free to read on GitHub. Keep in mind that the manuscript is not finished and was a work-in-progress that refers to Symphony 3.0 (which never was released beyond the beta, which was really an alpha) and Crane (there were plans, which were scrapped, to rename Symphony to avoid confusion with the Symfony PHP framework). There is still a lot of valuable information to be gleaned from Craig’s work, and now it’s up to the community to rework it to align this content with the latest Symphony release. Feel free to fork, update and send pull requests.

The XSLT Chapter is a particularly good read for anyone who is just getting started with XSLT. This is a Markdown formatted adaptation of the Chapter 8 text. I thought this would be a great place to start to help contribute to the XSLT resources on the Web Platform project.

If you’d like to see higher rates of XSLT adoption in the Web Standards community, get involved in the discussion and help to build a library of resources.

Understanding XSLT

XSL Transformations (XSLT) is a markup language for transforming XML into other forms of output, such as XML documents, HTML and many other text-based formats. The World Wide Web Consortium maintains the XSLT standard.


XSLT is the keystone in a trio of languages developed to transform and format XML. Collectively, those languages are known as XSL, or Extensible Stylesheet Language. Each member of the XSL family has a specific role:

  • XSLT, or XSL Transformations, is used to transform XML data into other kinds of output.
  • XPath, or XML Path Language, is used to identify nodes in an XML document for transformation or formatting.
  • XSL-FO, or XSL Formatting Objects, is a presentational language used for formatting XML data, usually for print.

XSLT 1.0 became an official recommendation in 1999. XSLT 2.0 became an official recommendation in 2007. The latest XSLT 3.0 Working Draft was released 10 July 2012.

XSLT as a Standards-Based Templating Language

Though the usage of XSLT as a web templating language is not commonplace, there are a lot of factors that make it ideal for this purpose.

  • It’s an XML technology. This means native handling of every web feed, every XHTML page, every RDF format, and nearly every API that exists on the web.
  • It’s an open standard. Maintained by the world’s web standards body (W3C), XSLT is widely-used, widely-supported, and well-documented. You won’t have trouble finding resources or getting answers, and once you’ve learned XSLT it can be helpful anywhere XML is used (which is pretty much everywhere).
  • It’s content-driven. Everything you output is directly tied to the data you need to present, meaning your presentation can always be lean and semantic.
  • It’s rule-based. Rules are much more powerful than mixtures of markup and procedural code. They are distinct and self-contained, but can also have complex relationships and interdependencies.
  • It’s flexible. XSLT can output nearly any text-based format there is, even ones that haven’t been invented yet.
  • It’s a complete templating language. With XSLT you can craft an organized, coherent presentation system rather than cobbling pages together out of snippets and tags using scripting languages.

XSLT defines sets of instructions that are used to transform source XML and create some kind of output. A processor starts with some XML content, and as it parses that content, it uses instructions from an XSLT stylesheet to generate some other sort of output.

Many common programming languages are imperative—they issue commands, one after the other. XSLT, on the other hand, is a declarative language. Instead of issuing commands, it simply states what should be done in a given context. It’s rather similar to CSS in that way. Neither language describes a sequence of events or functions. They just say, “When you come across this element, this is how you should style/transform it.”

Templating with this kind of rule-based language takes a different sort of mindset, but it’s actually a much more powerful and flexible approach. A list of commands can only be followed, but rules can have scope and interdependencies, they can cascade, and they can override one another.

A work in progress on WebPlatform