<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<!-- Author: Hector Tello - AEM Corporation -->
	<!-- Version: 3.0 -->

	<xsl:include href="pbdmi-common-3.xsl"/>

	<xsl:output indent="yes"/>

	<xsl:template match="*">

		<!-- HEADER -->
		<xsl:element name="FILETRANSMISSION">
			<xsl:attribute name="FILELAYOUTTYPE">
				<xsl:value-of select="FileLayoutType"/>
			</xsl:attribute>
			<xsl:attribute name="FILEID">
				<xsl:value-of select="FileId"/>
			</xsl:attribute>
			<xsl:attribute name="SCHOOLYEAR">
				<xsl:value-of select="SchoolYear"/>
			</xsl:attribute>

			<xsl:variable name="fips" select="FipsStateCode"/>

			<!--loop through agency elements-->
			<xsl:for-each select="Agency">
				<!--<AGENCY FIPSSTATECODE="01" STATEAGENCYIDNUMBER="01" STATELEAIDNUMBER="001000-0000001">-->
				<xsl:element name="AGENCY">
					<xsl:attribute name="FIPSSTATECODE">
						<xsl:value-of select="$fips"/>
					</xsl:attribute>
					<xsl:attribute name="STATEAGENCYIDNUMBER">
						<xsl:value-of select="StateAgencyIdNumber"/>
					</xsl:attribute>
					<xsl:attribute name="STATELEAIDNUMBER">
						<xsl:value-of select="StateLeaIdNumber"/>
					</xsl:attribute>

					<!--<IMPROVESTATUS>NOTIDENT</IMPROVESTATUS>-->
					<xsl:element name="IMPROVESTATUS">
						<xsl:value-of select="ImprovementStatus"/>
					</xsl:element>

					<!--<OPCHANGE>NOCHANGE</OPCHANGE>-->
					<xsl:element name="OPCHANGE">
						<xsl:value-of select="OperationalChange"/>
					</xsl:element>

					<!--<INTTECHSTATUS>YES</INTTECHSTATUS>-->
					<xsl:element name="INTTECHSTATUS">
						<xsl:value-of select="IntegratedTechnologyStatus"/>
					</xsl:element>

					<!--<TOTALSCHOOLS>8</TOTALSCHOOLS>-->
					<xsl:element name="TOTALSCHOOLS">
						<xsl:value-of select="TotalSchools"/>
					</xsl:element>

					<!--<EXPLANATION>text</EXPLANATION>-->
					<xsl:if test="Explanation">
						<xsl:element name="EXPLANATION">
							<xsl:value-of select="Explanation"/>
						</xsl:element>
					</xsl:if>
				</xsl:element>
			</xsl:for-each>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="LEA" userelativepaths="yes" externalpreview="no" url="TestFiles\x101_lea.xml" htmlbaseurl="" outputurl="TestFiles\transformed\x101_lea.xml" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="yes" validator="internal" customvalidator="" ><validatorSchema value="..\LegacyXSD\x101_lea_nclb_status_v3.xsd"/></scenario></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->
