<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:output method="xml" encoding="ISO-8859-1"/>
	<xsl:param name="request" select="'print'"/>
	<xsl:variable name="document-properties">
		<doc name="LE" desc="Law Enforcement Notice">
			<orientation>portrait</orientation>
			<duplex-setting>simplex</duplex-setting>
			<effective from="19950101"/>
			<updated-by>Rajendran</updated-by>
			<updated-on>February 18, 2005</updated-on>
			<n-focus-work-pkg>750</n-focus-work-pkg>
		</doc>
	</xsl:variable>
	<xsl:variable name="upperCase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
	<xsl:variable name="lowerCase" select="'abcdefghijklmnopqrstuvwxyz'"/>
	<xsl:template match="Incident">
		<xsl:variable name="lang" select="translate(LNG,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
		<fo:root>
			<fo:layout-master-set>
				<fo:simple-page-master master-name="main" page-height="279mm" page-width="216mm" margin-left="10mm" margin-right="10mm" margin-top="10mm" margin-bottom="5mm">
					<fo:region-body region-name="xsl-region-body" margin-bottom="15mm"/>
					<fo:region-after extent="10mm"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="main">
				<fo:static-content font-family="Helvetica" font-weight="normal" font-size="8pt" flow-name="xsl-region-after">
					<fo:block>
						<fo:table table-layout="fixed" width="196mm">
							<fo:table-column column-width="85mm"/>
							<fo:table-column column-width="65mm"/>
							<fo:table-column column-width="46mm"/>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell>
										<fo:block color="#000000" font-size="9pt" padding-top="1mm" padding-bottom="1mm" padding-start="1mm" border-top-width="1px" border-top-style="solid" border-top-color="#000000">
											<fo:block>Law Enforcement Notice</fo:block>
											<fo:block font-size="7pt">
												<xsl:value-of select="IntakeName/PersonName/PersonFullName"/>
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block color="#000000" font-size="9pt" padding-top="1mm" padding-bottom="1mm" padding-start="1mm" border-top-width="1px" border-top-style="solid" border-top-color="#000000">Page
											<fo:page-number/> of 
											<fo:page-number-citation ref-id="last-page"/>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block color="#000000" font-size="9pt" padding-top="1mm" padding-bottom="1mm" padding-start="1mm" border-top-width="1px" border-top-style="solid" border-top-color="#000000" text-align="end">
											<xsl:value-of select="@ID"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:block>
				</fo:static-content>
				<fo:flow flow-name="xsl-region-body">
					<fo:block-container position="absolute" height="20mm" width="106mm" top="9mm" left="3mm" font-family="Helvetica" font-size="9pt" font-weight="normal">
						<xsl:apply-templates select="IncidentResponse/IncidentServiceCall/ServiceCallAssignedUnit/OrganizationLocation/AddressFullText" mode="hdr-return-addr"/>
					</fo:block-container>
					<fo:block-container position="absolute" height="18mm" width="115mm" top="54mm" left="19mm" font-family="Helvetica" font-size="9pt" font-weight="normal">
						<xsl:apply-templates select="ServiceCallAssistingUnit/OrganizationLocation/LocationAddress/AddressFullText" mode="hdr-mail-addr"/>
					</fo:block-container>
					<fo:block space-before="75mm"/>
					<fo:block font-family="Helvetica" font-size="10pt">
						<fo:table table-layout="fixed" space-before="2pt" width="196mm">
							<fo:table-column column-number="1" column-width="196mm"/>
							<fo:table-body>
								<fo:table-row>
									<!--fo:table-cell background-color="rgb(203,228,254)" margin-right="2.5pt" width="100%"-->
									<fo:table-cell margin-right="2.5pt" width="100%">
										<xsl:apply-templates select="HDR"/>
										<xsl:apply-templates select="BDY"/>
									</fo:table-cell>
									<!--fo:table-cell background-color="rgb(254,237,205)" margin-left="2.5pt"-->
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:block>
					<fo:block id="last-page"/>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
	<xsl:template match="HDR">
		<fo:table table-layout="fixed" font-family="Helvetica" font-size="10pt">
			<fo:table-column column-number="1" column-width="50mm"/>
			<fo:table-column column-number="2" column-width="146mm"/>
			<fo:table-body margin="5pt">
				<fo:table-row>
					<fo:table-cell number-columns-spanned="2">
						<fo:block text-align="center" space-after="5pt">
							<fo:block font-weight="bold" font-size="14pt">
								<xsl:value-of select="INTK_TYP"/>
							</fo:block>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="2">
						<fo:block text-align="center" space-after="5pt">
							<fo:block font-weight="bold" font-size="14pt">Intake Worksheet</fo:block>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="2">
						<fo:block text-align="center" space-after="12pt">
							<fo:block font-weight="bold" font-size="12pt">
								<xsl:value-of select="DRAFT"/>
							</fo:block>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="BDY">
		<xsl:variable name="upperCase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
		<xsl:variable name="lowerCase" select="'abcdefghijklmnopqrstuvwxyz'"/>
		<xsl:choose>
			<xsl:when test="contains(translate(../HDR/INTK_TYP, $upperCase, $lowerCase),'adult protective services')">
				<fo:table table-layout="fixed">
					<fo:table-column column-number="1" column-width="48mm"/>
					<fo:table-column column-number="2" column-width="141mm"/>
					<fo:table-body>
						<fo:table-row space-before="6pt">
							<fo:table-cell>
								<fo:block>
Intake Number:	<xsl:value-of select="../HDR/IntakeNumber"/>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
Intake Name:<xsl:value-of select="../HDR/IntakeName/PersonName/PersonFullName"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>
			</xsl:when>
			<xsl:otherwise>
				<fo:block text-align="left" space-before="6pt">
					<fo:block>
  Intake Number:
				<xsl:value-of select="../HDR/IntakeNumber"/>
						<fo:inline>
  Intake Name:
					<xsl:value-of select="../HDR/IntakeName/PersonName/PersonFullName"/>
						</fo:inline>
					</fo:block>
				</fo:block>
			</xsl:otherwise>
		</xsl:choose>
		<fo:block text-align="left" space-before="6pt">
			<xsl:if test="PRIRTY or STAT_RSN_CD">
				<fo:block space-after="6pt">	
					Priority:&#160;
					<xsl:value-of select="IncidentCategory/IncidentLevelCode"/>
					<xsl:value-of select="IncidentEvent/EventStatus"/>
				</fo:block>
			</xsl:if>
			<xsl:if test="STAT_RSN_CD_X">
				<fo:block space-after="6pt">Status Reason: 
					<xsl:value-of select="STAT_RSN_CD_X"/>
				</fo:block>
			</xsl:if>

		</fo:block>
		<fo:block text-align="left">
			<!--fo:block>Date Received:
				<xsl:value-of select="DT_RCVD"/>&#160;&#160;Time Received:
				<xsl:value-of select="TME_RCVD"/>&#160;&#160;Source:
				<xsl:value-of select="SRC"/>
				<xsl:value-of select="HOT_LNE"/-->
			<fo:block>Date Received:
				<xsl:value-of select="DT_RCVD"/> &#160;&#160;&#160;&#160;Time Received:
				<xsl:value-of select="TME_RCVD"/>
			</fo:block>
			<fo:block text-indent="48mm">Source:
				<xsl:value-of select="SRC"/>
				<xsl:value-of select="HOT_LNE"/>
			</fo:block>
		</fo:block>
		<xsl:call-template name="received_by"/>
		<xsl:if test="ALL_TYP">
			<fo:block space-after="12pt" space-before="6pt">
				<xsl:apply-templates select="ALL_TYP"/>
			</fo:block>
		</xsl:if>
		<xsl:if test="ALL_TYP_A">
			<fo:block space-after="12pt">
				<xsl:apply-templates select="ALL_TYP_A"/>
			</fo:block>
		</xsl:if>
		
		<fo:block space-before="6pt"/>
		<xsl:call-template name="worker_info"/>
		<xsl:call-template name="asgn_date"/>
		<xsl:call-template name="county_info"/>
		<xsl:apply-templates select="HouseHoldInformation"/>
		<!--xsl:if test="contains(translate(//HDR/INTK_TYP, $upperCase, $lowerCase),'adult protective services')">
			<fo:block space-before="9pt" font-size="11pt">
				<xsl:text>Person Information:</xsl:text>
			</fo:block>
		</xsl:if-->
		<xsl:apply-templates select="IncidentAdult"/>
		<xsl:apply-templates select="IncidentChildren"/>
		<xsl:apply-templates select="RelationshipSummary"/>
		<xsl:apply-templates select="ReferralInformation"/>
		<xsl:apply-templates select="ServiceCallOriginator"/>
		<xsl:apply-templates select="CurrentAllegaionSummary"/>
		<xsl:apply-templates select="PERP_HIST"/>
		<xsl:apply-templates select="DepartmentDecision"/>
		<xsl:apply-templates select="OrganizaionInvolved"/>
		<xsl:apply-templates select="TL_USED"/>
	</xsl:template>
	<xsl:template match="INTK_NME">
		<xsl:choose>
			<xsl:when test="position()=1">
				<fo:block>Intake Name: 
					<fo:inline>
						<xsl:value-of select="."/>
					</fo:inline>
				</fo:block>
			</xsl:when>
			<xsl:otherwise>
				<fo:block text-indent="20mm">
					<xsl:value-of select="."/>
				</fo:block>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="received_by">
	<fo:block space-before="3mm">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="48mm"/>
			<fo:table-column column-number="2" column-width="141mm"/>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell>
						<fo:block>
							<fo:block>
								Received By:
							</fo:block>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<xsl:apply-templates select="RCVD_BY_INFO"/>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		</fo:block>
	</xsl:template>
	<xsl:template match="RCVD_BY_INFO">
		<fo:block>
			<fo:block>
				<xsl:value-of select="NME"/>
			</fo:block>
			<fo:block>
				<xsl:value-of select="OFC"/>
			</fo:block>
		</fo:block>
	</xsl:template>
	<xsl:template name="worker_info">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="48mm"/>
			<fo:table-column column-number="2" column-width="141mm"/>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell>
						<fo:block>
							<fo:block>
								Worker Assigned:
							</fo:block>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<xsl:apply-templates select="WRKR_ASGN_INFO"/>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="WRKR_ASGN_INFO">
		<fo:block>
			<fo:block>
				<xsl:value-of select="NME"/>
			</fo:block>
			<xsl:apply-templates select="ADDR" mode="rpt_info"/>
			<fo:block>
				<xsl:value-of select="PHN_NBR"/>
			</fo:block>
		</fo:block>
	</xsl:template>
	<xsl:template name="asgn_date">
		<xsl:if test="string-length(normalize-space(DT_WRKR_ASGN)) &gt; 0">
			<fo:block space-before="6pt">
				<fo:table table-layout="fixed">
					<fo:table-column column-number="1" column-width="48mm"/>
					<fo:table-column column-number="2" column-width="141mm"/>
					<fo:table-body>
						<fo:table-row>
							<fo:table-cell>
								<fo:block>
									<fo:block>
							Date Assigned:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<xsl:value-of select="DT_WRKR_ASGN"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>
			</fo:block>
		</xsl:if>
	</xsl:template>
	<xsl:template name="county_info">
		<fo:block space-before="6pt">
			<fo:table table-layout="fixed">
				<fo:table-column column-number="1" column-width="48mm"/>
				<fo:table-column column-number="2" column-width="141mm"/>
				<fo:table-body>
					<xsl:if test="string-length(normalize-space(CNTY_OF_INCD)) &gt; 0">
						<fo:table-row>
							<fo:table-cell>
								<fo:block>County of Incident:</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<xsl:apply-templates select="CNTY_OF_INCD" mode="rpt_info"/>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
				</fo:table-body>
			</fo:table>
		</fo:block>
	</xsl:template>
	<xsl:template match="HH_INFO">
		<fo:block space-before="9pt" space-after="9pt" font-size="11pt">Household Information:</fo:block>
		<xsl:apply-templates select="NONE"/>
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="10mm"/>
			<fo:table-column column-number="2" column-width="38mm"/>
			<fo:table-column column-number="3" column-width="38mm"/>
			<fo:table-column column-number="4" column-width="96mm"/>
			<fo:table-body>
				<xsl:if test="string-length(normalize-space(NME)) &gt; 0">
					<fo:table-row>
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Name:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="NME"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(ADDR)) &gt; 0">
					<fo:table-row>
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<xsl:if test="position()=1">
									<fo:block>
								Address:
									</fo:block>
								</xsl:if>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="ADDR" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(CNTY)) &gt; 0">
					<fo:table-row>
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							County:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="CNTY"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(DIR)) &gt; 0">
					<fo:table-row>
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Directions:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="DIR"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(PHN_NBR)) &gt; 0">
					<fo:table-row>
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<xsl:if test="position()=1">
									<fo:block>
								Phone:
									</fo:block>
								</xsl:if>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="PHN_NBR" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="ADLT_INFO|CHLD_INFO">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="10mm"/>
			<fo:table-column column-number="2" column-width="38mm"/>
			<fo:table-column column-number="3" column-width="38mm"/>
			<fo:table-column column-number="4" column-width="96mm"/>
			<fo:table-body>
				<fo:table-row keep-with-next="always">
					<fo:table-cell number-columns-spanned="4">
						<xsl:choose>
							<xsl:when test="contains(translate(//HDR/INTK_TYP, $upperCase, $lowerCase),'adult protective services')">
								<fo:block>
									<fo:block space-before="9pt" font-size="11pt">
										<xsl:text>Person Information:</xsl:text>
									</fo:block>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<xsl:choose>
									<xsl:when test="name()='ADLT_INFO'">
										<fo:block space-before="9pt" font-size="11pt">
											<xsl:text>Adult Information (Greater than 18 years of age)</xsl:text>
										</fo:block>
									</xsl:when>
									<xsl:when test="name()='CHLD_INFO'">
										<fo:block space-before="9pt" font-size="11pt">
											<xsl:text>Child Information (18 years of age or less)</xsl:text>
										</fo:block>
									</xsl:when>
								</xsl:choose>
							</xsl:otherwise>
						</xsl:choose>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-next="always">
					<fo:table-cell number-columns-spanned="2">
						<fo:block space-after="9pt"/>
						<xsl:apply-templates select="NONE"/>
						<fo:block text-indent="10mm">
							<xsl:value-of select="RLE"/>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="string-length(normalize-space(NME)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Name:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="NME"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(ADDR)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								Address:
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="ADDR" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(DIR)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Directions:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="DIR"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(PHN_NBR)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								Phone:

							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="PHN_NBR" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<fo:block/>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:if test="string-length(normalize-space(DOB)) &gt; 0 or string-length(normalize-space(AGE)) &gt; 0 ">
								<fo:block>
								DOB/Age:
								</fo:block>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:if test="string-length(normalize-space(DOB)) &gt; 0 or string-length(normalize-space(AGE)) &gt; 0 ">
								<xsl:choose>
									<xsl:when test="contains(DOB,'Unknown')">
								  Unknown
									</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="concat(DOB,'/',AGE)"/>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:if test="string-length(normalize-space(SEX)) &gt; 0">
								<xsl:value-of select="concat('Sex: ',SEX)"/>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="string-length(normalize-space(RACE)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								Race:
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="RACE" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(ENTCY)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Ethnicity:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="ENTCY"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(TRIB)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>Tribal Affiliation:
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="TRIB" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(SCHL)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							School:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="SCHL"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(GRADE)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Grade:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="GRADE"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="RPTR_INFO">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="10mm"/>
			<fo:table-column column-number="2" column-width="38mm"/>
			<fo:table-column column-number="3" column-width="35mm"/>
			<fo:table-column column-number="4" column-width="55mm"/>
			<fo:table-body>
				<fo:table-row keep-with-next="always">
					<fo:table-cell>
						<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
							<xsl:text>Reporter</xsl:text>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<xsl:apply-templates select="NONE"/>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell number-columns-spanned="4">
						<xsl:if test="string-length(normalize-space(SRC)) &gt; 0">
							<fo:block text-indent="10mm">
					Source:
			<fo:inline>
									<fo:leader leader-pattern="space" leader-length="25mm"/>
								</fo:inline>
								<xsl:value-of select="SRC"/>
							</fo:block>
						</xsl:if>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="string-length(normalize-space(NME)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Name:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="NME"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(ADDR)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
								Address:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="ADDR" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(DIR)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Directions:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="DIR"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(PHN_NBR)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
								Phone:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="PHN_NBR" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<fo:block/>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:if test="string-length(normalize-space(DOB)) &gt; 0 or string-length(normalize-space(AGE)) &gt; 0 ">
								<fo:block>
								DOB/Age:
								</fo:block>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:if test="string-length(normalize-space(DOB)) &gt; 0 or string-length(normalize-space(AGE)) &gt; 0 ">
								<xsl:choose>
									<xsl:when test="contains(DOB,'Unknown')">
								  Unknown
									</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select="concat(DOB,'/',AGE)"/>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block>
							<xsl:if test="string-length(normalize-space(SEX)) &gt; 0">
								<xsl:value-of select="concat('Sex: ',SEX)"/>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="string-length(normalize-space(RACE)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
								Race:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="RACE" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(ENTCY)) &gt; 0">
					<fo:table-row>
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<fo:block>
							Ethnicity:
								</fo:block>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:value-of select="ENTCY"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(TRIB)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>Tribal Affiliation:
							</fo:block>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block>
								<xsl:apply-templates select="TRIB" mode="rpt_info"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="string-length(normalize-space(ADD_DTL)) &gt; 0">
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<fo:block/>
						</fo:table-cell>
						<fo:table-cell>
							<xsl:if test="string-length(normalize-space(ADD_DTL)) &gt; 0">
								<fo:block> Additional Details:
			<fo:inline>
										
									</fo:inline>
								</fo:block>
							</xsl:if>
						</fo:table-cell>
						<fo:table-cell number-columns-spanned="2">
							<fo:block wrap-option="wrap">
								<xsl:value-of select="ADD_DTL"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>

			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="REL_SUMM">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="196mm"/>
			<fo:table-body>
				<fo:table-row keep-with-next="always">
					<fo:table-cell>
						<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
							<xsl:text>Relationship Summary</xsl:text>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<xsl:apply-templates select="NONE"/>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<fo:block start-indent="10mm">
							<xsl:apply-templates select="RS_ARP"/>
							<xsl:apply-templates select="RS_FUNCTNL"/>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="RS_ARP">
		<fo:block line-height="12pt">
			<xsl:value-of select="concat(RS_ARP1,'&#160;',RS_ARP2)"/>
		</fo:block>
	</xsl:template>
	<xsl:template match="RS_FUNCTNL">
		<fo:block line-height="12pt">
			<xsl:value-of select="concat(RS_FUNCTNL1,'&#160;',RS_FUNCTNL2)"/>
		</fo:block>
	</xsl:template>
	<xsl:template match="REF_INFO">
		<xsl:if test="position() =1">
			<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
				<xsl:text>Referral Information</xsl:text>
			</fo:block>
		</xsl:if>
		<xsl:apply-templates select="NONE"/>
		<xsl:for-each select="DTL">
			<xsl:apply-templates mode="ref_info"/>
			<fo:block space-before="6pt"/>
		</xsl:for-each>
	</xsl:template>
	<xsl:template match="CURR_ALL_SUMM">
		<xsl:for-each select="DTL">
			<fo:table table-layout="fixed">
				<fo:table-column column-number="1" column-width="10mm"/>
				<fo:table-column column-number="2" column-width="38mm"/>
				<fo:table-column column-number="3" column-width="35mm"/>
				<fo:table-column column-number="4" column-width="96mm"/>
				<fo:table-body>
					<fo:table-row keep-with-next="always">
						<fo:table-cell number-columns-spanned="3">
							<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
				Current Allegation(s) Summary
		</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row keep-with-previous="always">
						<fo:table-cell>
							<xsl:apply-templates select="NONE"/>
						</fo:table-cell>
					</fo:table-row>
					<xsl:if test="string-length(normalize-space(INCD_DT)) &gt; 0">
						<fo:table-row keep-with-previous="always">
							<fo:table-cell>
								<fo:block/>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:block>
							Incident Date:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell number-columns-spanned="2">
								<fo:block>
									<xsl:value-of select="INCD_DT"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test="string-length(normalize-space(FNDNG_DT)) &gt; 0">
						<fo:table-row keep-with-previous="always">
							<fo:table-cell>
								<fo:block/>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:block>
								Finding Date:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:inline>
										<xsl:value-of select="FNDNG_DT"/>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<xsl:if test="FNDNG">
								  Finding:&#160;
										<xsl:value-of select="FNDNG"/>
									</xsl:if>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test="string-length(normalize-space(VCTM)) &gt; 0">
						<fo:table-row keep-with-previous="always">
							<fo:table-cell>
								<fo:block/>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:block>
							Victim:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell number-columns-spanned="2">
								<fo:block>
									<xsl:value-of select="VCTM"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test="string-length(normalize-space(PERP)) &gt; 0">
						<fo:table-row keep-with-previous="always">
							<fo:table-cell>
								<fo:block/>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:block>
							Perpetrator:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell number-columns-spanned="2">
								<fo:block>
									<xsl:value-of select="PERP"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test="string-length(normalize-space(ALL)) &gt; 0">
						<fo:table-row keep-with-previous="always">
							<fo:table-cell>
								<fo:block/>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:block>
							Allegation:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell number-columns-spanned="2">
								<fo:block>
									<xsl:value-of select="ALL"/>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test="string-length(normalize-space(EXPUNG_DT)) &gt; 0">
						<fo:table-row keep-with-previous="always">
							<fo:table-cell>
								<fo:block/>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<fo:block>
								Expungement&#160;Date:
									</fo:block>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block space-after="6pt">
									<fo:inline>
										<xsl:value-of select="EXPUNG_DT"/>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block>
									<xsl:if test="string-length(normalize-space(EXPUNG_RSN)) &gt; 0">
								 Reason:&#160;
										<xsl:value-of select="EXPUNG_RSN"/>
									</xsl:if>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
				</fo:table-body>
			</fo:table>
			<fo:block space-after="6pt"/>
		</xsl:for-each>
	</xsl:template>
	<xsl:template match="PERP_HIST">
		<xsl:if test="position() =1">
			<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
				Perpetrator History
			</fo:block>
		</xsl:if>
		<xsl:apply-templates select="NONE"/>
		<xsl:for-each select="PERP">
			<fo:block font-weight="bold" text-indent="10mm">
				<xsl:value-of select="NME"/>
			</fo:block>
			<xsl:for-each select="INTK">
				<!--xsl:if test="string-length(normalize-space(NBR)) &gt; 0">
					<fo:block text-indent="10mm">
								Intake #:
						<xsl:value-of select="NBR"/>
						<fo:leader leader-length="40mm" leader-pattern="space"/>
						<xsl:if test="RCVD_DT">
							Received&#160;Date:&#160;
							<xsl:value-of select="RCVD_DT"/>
						</xsl:if>
					</fo:block>
				</xsl:if-->
				<xsl:for-each select="DTL">
					<fo:table table-layout="fixed">
						<fo:table-column column-number="1" column-width="13mm"/>
						<fo:table-column column-number="2" column-width="35mm"/>
						<fo:table-column column-number="3" column-width="35mm"/>
						<fo:table-column column-number="4" column-width="123mm"/>
						<fo:table-body>
							<fo:table-row keep-with-next="always">
								<fo:table-cell number-columns-spanned="4">
									<xsl:if test="string-length(normalize-space(../NBR)) &gt; 0">
										<fo:block text-indent="10mm">
								Intake #: 
						<xsl:value-of select="../NBR"/>
											<fo:leader leader-length="40mm" leader-pattern="space"/>
											<xsl:if test="../RCVD_DT">
							Received&#160;Date:&#160;
							<xsl:value-of select="../RCVD_DT"/>
											</xsl:if>
										</fo:block>
									</xsl:if>
								</fo:table-cell>
							</fo:table-row>
							<xsl:if test="string-length(normalize-space(INCD_DT)) &gt; 0">
								<fo:table-row keep-with-next="always">
									<fo:table-cell>
										<fo:block/>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:block>
							Incident Date:
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="2">
										<fo:block>
											<xsl:value-of select="INCD_DT"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="string-length(normalize-space(FNDNG_DT)) &gt; 0">
								<fo:table-row keep-with-previous="always">
									<fo:table-cell>
										<fo:block/>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:block>
								Finding Date:
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:inline>
												<xsl:value-of select="FNDNG_DT"/>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:if test="FNDNG">
								  Finding:&#160;
												<xsl:value-of select="FNDNG"/>
											</xsl:if>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="string-length(normalize-space(VCTM)) &gt; 0">
								<fo:table-row keep-with-previous="always">
									<fo:table-cell>
										<fo:block/>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:block>
							Victim:
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="2">
										<fo:block>
											<xsl:value-of select="VCTM"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="string-length(normalize-space(PERP)) &gt; 0">
								<fo:table-row keep-with-previous="always">
									<fo:table-cell>
										<fo:block/>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:block>
							Perpetrator:
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="2">
										<fo:block>
											<xsl:value-of select="PERP"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="string-length(normalize-space(ALL)) &gt; 0">
								<fo:table-row keep-with-previous="always">
									<fo:table-cell>
										<fo:block/>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:block>
							Allegation:
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell number-columns-spanned="2">
										<fo:block>
											<xsl:value-of select="ALL"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
							<xsl:if test="string-length(normalize-space(EXPUNG_DT)) &gt; 0">
								<fo:table-row keep-with-previous="always">
									<fo:table-cell>
										<fo:block/>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<fo:block>
								Expungement&#160;Date:
											</fo:block>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block space-after="6pt">
											<fo:inline>
												<xsl:value-of select="EXPUNG_DT"/>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:if test="string-length(normalize-space(EXPUNG_RSN)) &gt; 0">
								 Reason:&#160;
												<xsl:value-of select="EXPUNG_RSN"/>
											</xsl:if>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:if>
						</fo:table-body>
					</fo:table>
					<fo:block space-after="6pt"/>
				</xsl:for-each>
				<fo:block space-after="9pt"/>
			</xsl:for-each>
		</xsl:for-each>
	</xsl:template>
	<xsl:template match="DEPT_DCSN">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="196mm"/>
			<fo:table-body>
				<fo:table-row keep-with-next="always">
					<fo:table-cell>
						<xsl:if test="position() =1">
							<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
			Department Decision
			</fo:block>
						</xsl:if>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<xsl:apply-templates select="NONE"/>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<xsl:for-each select="DTL">
							<fo:block text-indent="10mm">
								<xsl:value-of select="concat(BEG_DT,' ',STAT,' ',WRKR_NME)"/>
							</fo:block>
							<fo:block text-indent="10mm" space-after="6pt">
								<xsl:value-of select="concat(TYP,' ',STAT_RSN_CD,' ')"/>
								<xsl:if test="string-length(normalize-space(PRIRTY)) &gt; 0">
				- Priority:
					<xsl:value-of select="PRIRTY"/>
								</xsl:if>
							</fo:block>
						</xsl:for-each>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="ORG_INVLVD">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="196mm"/>
			<fo:table-body>
				<fo:table-row keep-with-next="always">
					<fo:table-cell>
						<xsl:if test="position() =1">
							<fo:block space-before="9pt" space-after="9pt" font-size="11pt">
			Organization Involved
			</fo:block>
						</xsl:if>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<xsl:apply-templates select="NONE"/>
					</fo:table-cell>IncidentType
				</fo:table-row>
				<fo:table-row keep-with-previous="always">
					<fo:table-cell>
						<xsl:for-each select="ORG">
							<fo:block text-indent="10mm">
								<xsl:value-of select="NME"/>
							</fo:block>
							<fo:block text-indent="10mm">
								<xsl:value-of select="RLE"/>
							</fo:block>
							<fo:block start-indent="10mm">
								<xsl:apply-templates select="ADDR" mode="rpt_info"/>
								<xsl:apply-templates select="PHN_NBR" mode="rpt_info"/>
							</fo:block>
						</xsl:for-each>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="RET_ADDR" mode="hdr-return-addr">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="MAIL_ADDR" mode="hdr-mail-addr">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="ADDR_LNE">
		<fo:block>
			<xsl:apply-templates/>
		</fo:block>
	</xsl:template>
	<xsl:template match="OCC_DT|DESC" mode="ref_info">
		<fo:block text-indent="10mm">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	<xsl:template match="NARR_TXT" mode="ref_info">
		<fo:block start-indent="10mm" white-space-collapse="false">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	<xsl:template match="*" mode="line_info">
		<xsl:param name="sttext" select="' '"/>
		<xsl:if test="string-length(normalize-space(.)) &gt; 0">
			<fo:table-row>
				<fo:table-cell>
					<fo:block>
						<fo:block>
							<xsl:value-of select="$sttext"/>
						</fo:block>
					</fo:block>
				</fo:table-cell>
				<fo:table-cell>
					<fo:block>
						<xsl:value-of select="."/>
					</fo:block>
				</fo:table-cell>
			</fo:table-row>
		</xsl:if>
	</xsl:template>
	<xsl:template match="ADDR|PHN_NBR|CNTY_OF_INCD|RACE|TRIB" mode="rpt_info">
		<fo:block>
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	<xsl:template match="ALL_TYP_A">
		<fo:table table-layout="fixed">
			<fo:table-column column-number="1" column-width="48mm"/>
			<fo:table-column column-number="2" column-width="100mm"/>
			<fo:table-body>
				<fo:table-row keep-with-next="always">
					<fo:table-cell>
						<fo:block space-before="12pt">
			Allegation Type:
			</fo:block>
					</fo:table-cell>
					<fo:table-cell>
						<fo:block space-before="12pt">
							<xsl:value-of select="TYP_A"/>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="ALL_INCD_LOCT">
					<fo:table-row keep-with-previous="always" column-number="1">
						<fo:table-cell>
							<fo:block start-indent="3mm">Incident Location:</fo:block>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<xsl:value-of select="ALL_INCD_LOCT"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="ALL_LIV_STAT_CD">
					<fo:table-row keep-with-previous="always" column-number="1">
						<fo:table-cell>
							<fo:block start-indent="3mm">Victim Living Status:</fo:block>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<xsl:value-of select="ALL_LIV_STAT_CD"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="ALL_LA_CD">
					<fo:table-row keep-with-previous="always" column-number="1">
						<fo:table-cell>
							<fo:block start-indent="3mm">Victim Living Arrangement:</fo:block>
						</fo:table-cell>
						<fo:table-cell>
							<fo:block>
								<xsl:value-of select="ALL_LA_CD"/>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="ALL_SLF_NEG">
					<fo:table-row keep-with-previous="always" column-number="1">
						<fo:table-cell>
							<fo:block start-indent="3mm">Self Neglect:</fo:block>
						</fo:table-cell>
						<xsl:if test="ALL_SLF_NEG='N'">
							<fo:table-cell>
								<fo:block>
								No
							</fo:block>
							</fo:table-cell>
						</xsl:if>
						<xsl:if test="ALL_SLF_NEG='Y'">
							<fo:table-cell>
								<fo:block>
								Yes
							</fo:block>
							</fo:table-cell>
						</xsl:if>
					</fo:table-row>
				</xsl:if>
			</fo:table-body>
		</fo:table>
		
	</xsl:template>
	<xsl:template match="ALL_TYP">
		<xsl:choose>
			<xsl:when test="position()=1">
				<fo:block>Allegation Type:
					<fo:leader leader-pattern="space" leader-length="22mm"/>
					<xsl:value-of select="."/>
				</fo:block>
			</xsl:when>
			<xsl:otherwise>
				<fo:block>
					<fo:leader leader-pattern="space" leader-length="48mm"/>
					<xsl:value-of select="."/>
				</fo:block>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="NONE">
		<fo:block text-indent="10mm">
			None
		</fo:block>
	</xsl:template>
</xsl:stylesheet>
