mysheet.xsl
generates a well-formed HTML document
with a bullet list:
Mexican Writers
,
.
<xsl:stylesheet...> means:
Use the XSL namespace, version 1.0.
(Note: the 1999 indicates the year in which the URI was allocated
by the W3C.)
<xsl:output...> means:
Produce the result tree in HTML 4.0 format.
An XSL stylesheet is made up of "templates", defined by
<xsl:template...> elements.
They match nodes in the source tree and produce a result tree.
The <xsl:template match="/"> line matches against
the root node in the source tree (the writers element).
The <xsl:template match="author"> line matches
the author element, and so on.
Within a template, all elements that are not in the XSL namespace
(all elements that do not start with xsl:) are nodes to be
created in the result tree. For legibility, we have capitalized all
HTML output.
The <xsl:apply-templates> line tells the processor
to process the templates for the all the nodes contained within
the current node.
The <xsl:apply-templates select="last"> line
tells the processor to process the template for the last
element.
The default template (when no template is defined) simply outputs
the text content of the element.