XSL Namespace Aliases

December 7th, 2009

I've been using XSL for a long time, and I know I've used XSL in the past to generate XSL, but today I found a very handy technique for doing so: namespace aliases!

Here's the articles I found which explain how its done:

In a nutshell, this is it:

<xsl:stylesheet version="1.0"
<xsl:namespace-alias stylesheet-prefix="xslo" result-prefix="xsl"/>
<xsl:template match="/">
<xslo:stylesheet version="1.0">
<xslo:template match="/">
<xslo:value-of select="//name"/>
Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022