Menu Close

XSL Skeleton

A basic XSL skeleton. So I don’t have to remember it.

The base of an XSL stylesheet is as follows:


< ?xml version="1.0" encoding="UTF-8"?>
< xsl :stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

< xsl:template match="/">
< html>< body>
< xsl:apply-templates/>
< /body>< /html>
< /xsl:template>


< xsl:template match="title">
< h2>
< xsl:value-of select="."/>
< /h2>
< /xsl:template>