<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.1" exclude-result-prefixes="fo">
	<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />
	<xsl:template match="GUIA">
		<fo:root>
			<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-body />
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-reference="simpleA4">
				<fo:flow flow-name="xsl-region-body">
					<fo:table table-layout="fixed" width="100%" space-before.optimum="0pt" space-after.optimum="0pt">
						<fo:table-column column-width="10cm" />
						<fo:table-column />
						<fo:table-column />
						<fo:table-column />
						<fo:table-column />
						<fo:table-header>
							<fo:table-row>
								<fo:table-cell border="0.7pt solid #000000">
									<fo:block font-size="10pt" text-align="center" font-weight="bold">Cuidado Prestado</fo:block>
								</fo:table-cell>
								<fo:table-cell border="0.7pt solid #000000">
									<fo:block font-size="10pt" text-align="center" font-weight="bold">Código</fo:block>
								</fo:table-cell>
								<fo:table-cell border="0.7pt solid #000000">
									<fo:block font-size="10pt" text-align="center" font-weight="bold">Valor</fo:block>
								</fo:table-cell>
								<fo:table-cell border="0.7pt solid #000000">
									<fo:block font-size="10pt" text-align="center" font-weight="bold">Benef.</fo:block>
								</fo:table-cell>
								<fo:table-cell border="0.7pt solid #000000">
									<fo:block font-size="10pt" text-align="center" font-weight="bold">Entidade</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-header>
						<fo:table-body>
							<xsl:for-each select="CORPO/LINHA_CORPO">
								<fo:table-row>
									<fo:table-cell border="0.7pt solid #000000">
										<fo:block font-size="10pt" text-align="left">
											<xsl:value-of select="PRODUTO/DESCRICAO" />
										</fo:block>
									</fo:table-cell>
									<fo:table-cell border="0.7pt solid #000000">
										<fo:block font-size="10pt" text-align="right">
											<xsl:value-of select="PRODUTO/CODIGO_TABELA" />
										</fo:block>
									</fo:table-cell>
									<fo:table-cell border="0.7pt solid #000000">
										<fo:block font-size="10pt" text-align="right">
											<xsl:value-of select="PRECO/PRECO_TOTAL" />
										</fo:block>
									</fo:table-cell>
									<fo:table-cell border="0.7pt solid #000000">
										<fo:block font-size="10pt" text-align="right">
											<xsl:value-of select="PRECO/PRECO_BENEFICIARIO" />
										</fo:block>
									</fo:table-cell>
									<fo:table-cell border="0.7pt solid #000000">
										<fo:block font-size="10pt" text-align="right">
											<xsl:value-of select="PRECO/PRECO_ENTIDADE" />
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:for-each>
							<table-row xmlns="http://www.w3.org/1999/XSL/Format">
								<table-cell />
							</table-row>
						</fo:table-body>
					</fo:table>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
</xsl:stylesheet>

