Ask most developers and they will shudder at the thought of having to use XSLT, Extensible Stylesheet Language Transformation, in any environment. But the truth is that it's a very powerful rendering language and is a perfect fit for the Umbraco XML cache. For those of you who are new to this language, “XSLT is a declarative, XML-based language used for the transformation of XML documents into other XML documents.” This is the short version of the definition on Wikipedia. In the case of Umbraco, the “other XML documents” refer in most cases to the output of HTML, and in some cases the output of other tag-based content. Because XSLT is, in essence, a flavor of XML, it requires that all output and logical markup have a matching start and close tag. You will see the practical application of this requirement in the examples throughout of this chapter.
In Umbraco you can leverage XSLT to access the content that is created in the content tree via macros, as discussed in Chapter 5. To access the XSLT repository, navigate to the Developer section, as shown in Figure 11-1. This chapter shows you the flexibility and versatility of using XSLT to generate content for menus, repeatable lists, and much more.
A lot of the discussion in this chapter has to do with XPath and XSLT. If you'd like more information or instruction on these languages, check out Beginning XSLT and XPath: Transforming XML Documents and Data by Ian Williams (Wiley, 2009).