<?xml version="1.0" encoding="UTF-8"?>
<!--

Stylesheet for trust templates
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:urn="urn:hl7-org:v3">
	<!--

	Main trust template which includes content rows
	-->
	<xsl:template name="structuredBody.trust" match="urn:structuredBody" mode="trust">

	
		
		<xsl:if test="../../urn:recordTarget">
			<tr>
				<td class="tableBlock">
					<xsl:apply-templates select="../../urn:recordTarget/urn:patientRole" mode="application"/>
				</td>
			</tr>
		</xsl:if>

	<xsl:if test="../../urn:author">
			<tr>
				<td class="tableBlock">
					<xsl:apply-templates select="../../urn:author/urn:assignedAuthor" mode="applicationAuthor"/>
				</td>
			</tr>
		</xsl:if>
		
		<xsl:if test="../../urn:recordTarget">
			<tr>
				<td class="tableBlock">
					<xsl:apply-templates select="../../urn:recordTarget/urn:patientRole/urn:patient/urn:guardian" mode="trustPerson"/>
				</td>
			</tr>
		</xsl:if>

		<xsl:if test="urn:component/urn:section[urn:code/@code='TRUST']">
			<tr>
				<td class="tableBlock">
					<xsl:apply-templates select="urn:component/urn:section[urn:code/@code='TRUST']" mode="trustPerson"/>
				</td>
			</tr>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet>
