<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.esd.org.uk/standards" xmlns:esd="http://www.esd.org.uk/standards">
	<xsl:namespace-alias stylesheet-prefix="esd" result-prefix="#default"/>
	<xsl:include href="HierarchyListToWord20040420.xslt"/>
	<xsl:template match="esd:Domains">
		<xsl:processing-instruction name="mso-application">progid="Word.Document"</xsl:processing-instruction>
		<xsl:variable name="NotesBeforeMetadata">
			<xsl:apply-templates select="esd:Domain[@Key = 'LgtlNotesBeforeMetadata']"/>
		</xsl:variable>
		<xsl:variable name="NotesAfterMetadata">
			<xsl:apply-templates select="esd:Domain[@Key = 'LgtlNotesAfterMetadata']"/>
		</xsl:variable>
		<xsl:variable name="HierarchyList">
			<xsl:apply-templates select="esd:Domain[@Key = 'Lgtl']"/>
		</xsl:variable>
		<xsl:call-template name="BuildHierarchy">
			<xsl:with-param name="NotesBeforeMetadata" select="$NotesBeforeMetadata"/>
			<xsl:with-param name="NotesAfterMetadata" select="$NotesAfterMetadata"/>
			<xsl:with-param name="HierarchyList" select="$HierarchyList"/>
			<xsl:with-param name="Relation.IsFormatOf">http://www.esd.org.uk/standards/lgtl/0.01/lgtl.xml</xsl:with-param>
			<xsl:with-param name="Source">http://www.esd.org.uk/standards/lgtl/0.01/lgtlword.xml</xsl:with-param>
			<xsl:with-param name="Relation.IsReplacedBy">http://www.esd.org.uk/standards/lgtl/lgtlword.xml</xsl:with-param>
			<xsl:with-param name="TopLevelHeading">true</xsl:with-param>
			<xsl:with-param name="TopTwoLevelHeading">true</xsl:with-param>
			<xsl:with-param name="CompleteList">true</xsl:with-param>
			<xsl:with-param name="Equi">false</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	<xsl:template match="esd:Domain">
		<xsl:variable name="CurrentVersion" select="esd:Versions/@Current"/>
		<xsl:value-of select="esd:Versions/esd:Release[@Number = $CurrentVersion]/@Resource"/>
	</xsl:template>
</xsl:stylesheet>
