<xsl:include href="HEADER.html" />nor
<xsl:include href="HEADER.html" />worked.
<header>
<xsl:for-each select="files/file">
<xsl:variable name="fn" select="." />
<xsl:if test="contains($fn, 'HEADER.xslt')">
<xsl:import href="{.}" />
</xsl:if>
</xsl:for-each>
</header>
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="header.xslt" />
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
<xsl:template match="/output">
<html>
<xsl:call-template name="header" />
<body>
<p>Body</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="header">
<head>
<title>Title</title>
</head>
</xsl:template>
</xsl:stylesheet>
<output>
</output>
# xsltproc body.xslt data.xml
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Title</title>
</head>
<body><p>Body</p></body>
</html>
<header>
<xsl:for-each select="files/file">
<xsl:variable name="fn" select="." />
<xsl:if test="contains($fn, 'HEADER.xslt')">
<xsl:include href="{.}" />
</xsl:if>
<xsl:if test="contains($fn, 'LICENSE.xslt')">
<xsl:include href="{.}" />
</xsl:if>
</xsl:for-each>
</header>