7. <?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
<xsl:output method="html"/> • root node
<xsl:template match="/"> • xsl:stylesheet or xsl:transform
<html>
<head><title>Human Resource</title></head> • specific output
<body><p>Joe's company have
<xsl:value-of select="count(HumanResource/Person)" /> workers</p>
<p>Detail information:</p>
<hr/>
<xsl:apply-templates select="/HumanResource/Person" />
</body> • match root element
</html> • call function • main function
</xsl:template> • have only one main function
<xsl:template match="Person"> • a function
<p>Name: <xsl:value-of select="string(Name)" /></p>
<p>Position: <xsl:value-of select="Position" /></p>
</xsl:template>
</xsl:stylesheet> • a built-in function