<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
	<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
	<xsl:template match="LISTA_FICHAS">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
		    <fo:layout-master-set>
			<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
				<fo:region-before extent="30pt"/>
				<fo:region-body margin-top="30pt"/>
				<fo:region-after extent="6pt"
						padding="6pt 1in"
						display-align="after"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="simpleA4">
				<fo:static-content flow-name="xsl-region-before">
					<fo:block font-size="14pt" text-align="center" font-weight="bold">
						RELA&#xc7;&#xc3;O DE FICHAS DE APTID&#xc3;O ENVIADAS
					</fo:block>
				</fo:static-content>
				<fo:flow flow-name="xsl-region-body">
					<fo:table table-layout="fixed" width="100%" space-before.optimum="10pt"
							border="1pt solid #000000">
							<fo:table-column/>
							<fo:table-column column-width="100pt"/>
							<fo:table-column column-width="100pt"/>
							<fo:table-body >
								<fo:table-row>
									<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin">
										<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">
											NOME
										</fo:block>
									</fo:table-cell>
									<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin">
										<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">
										   DATA EXAME
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">
										   PR&#xd3;XIMO EXAME
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<xsl:for-each select="FICHA">
									<fo:table-row>
										<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" border-right-color="black" border-right-style="solid" border-right-width="thin">
											<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
												<xsl:value-of select="NOME" />
											</fo:block>
										</fo:table-cell>
										<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" border-right-color="black" border-right-style="solid" border-right-width="thin">
											<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
											   <xsl:value-of select="DATA_EXAME" />
											</fo:block>
										</fo:table-cell>
										<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin">
											<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
											   <xsl:value-of select="DATA_PROXIMO_EXAME" />
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
							  </xsl:for-each>
							</fo:table-body>
					</fo:table>
					<fo:block font-size="8pt" text-align="left">
						<xsl:value-of select="DATA_EXTENSO" />
					</fo:block>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
</xsl:stylesheet>

