Here is the overall structure of an XSLT stylesheet:
The root element must be either
xsl:transform; they are equivalent.
There are certain elements called top-level-only elements that must be just inside the root element. These are discussed below in the section on top-level elements.
The rest of the stylesheet consists of any mixture of these elements: