XSL Formatting Guidelines

September 30th, 2009

I've finally come up with my guidelines for XSL based XHTML template that I'm very pleased with:

  • Keep everything within 80 characters wide, life feed at attributes with no indent.
  • Separate XHTML-only and XHTML+XSL blocks with one line feed.
  • Include two line feeds after <xsl:template> lines and before </xsl:template> blocks.
  • Use two spaces for indentation.
  • Don't use XPath for i18n. I've done it in the past and while its reliable and robust, it makes XSL templates look like garbage.

I'm writing these down for my own personal use.

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022