All XSLT stylesheets contain the following:
An XML declaration (optional)
An <xsl:stylesheet> element as the document's root element
Zero or more template rules
Consider the following bare-bones stylesheet:
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <!-- the content for the output document contained here --> </xsl:template> </xsl:stylesheet>
Note that the root template (defined by the match="/" attribute) will be called without regard for the contents of the XML document being processed. As such, this is the best place to put the top-level elements that we want to include in the output of each and every document being transformed with this stylesheet.
 
Continue to: