<?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="table1">

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

	<fo:layout-master-set>
        	<fo:simple-page-master 
			page-master-name="main"
          		margin-top="50pt"
          		margin-bottom="50pt"
          		margin-left="75pt"
          		margin-right="75pt">
        			<fo:region-body margin-bottom="75pt"/>
	        </fo:simple-page-master>
      	</fo:layout-master-set>

	<fo:page-sequence master-reference="">
		<fo:flow flow-name="">
			<xsl:for-each select="row1">

				<fo:block color="blue" line-height="25pt">
					<xsl:value-of select="@text"/>
				</fo:block>
				<fo:table table-layout="fixed">
					<xsl:if test="@c='3'">
						<fo:table-column column-width="5cm"/>
						<fo:table-column column-width="5cm"/>
						<fo:table-column column-width="5cm"/>
					</xsl:if>
					<xsl:if test="@c='2'">
						<fo:table-column column-width="7.5cm"/>
						<fo:table-column column-width="7.5cm"/>
					</xsl:if>
					<xsl:if test="@c='1'">
						<fo:table-column column-width="15cm"/>
					</xsl:if>
					<xsl:if test="@c='4'">
						<fo:table-column column-width="3.75cm"/>
						<fo:table-column column-width="3.75cm"/>
						<fo:table-column column-width="3.75cm"/>
						<fo:table-column column-width="3.75cm"/>
					</xsl:if>
					<xsl:if test="@c='6'">
						<fo:table-column column-width="2.5cm"/>
						<fo:table-column column-width="2.5cm"/>
						<fo:table-column column-width="2.5cm"/>
						<fo:table-column column-width="2.5cm"/>
						<fo:table-column column-width="2.5cm"/>
						<fo:table-column column-width="2.5cm"/>
					</xsl:if>
					<xsl:if test="@c='5'">
						<fo:table-column column-width="3cm"/>
						<fo:table-column column-width="3cm"/>
						<fo:table-column column-width="3cm"/>
						<fo:table-column column-width="3cm"/>
						<fo:table-column column-width="3cm"/>
					</xsl:if>

					<fo:table-body>
						<fo:table-row>
							<xsl:for-each select="column1">
								<fo:table-cell border="0.05pt solid" text-align="center">
									<fo:block font-size="6pt" color="navy" line-height="12pt">
										<xsl:value-of select="@c1"/>
									</fo:block>
								</fo:table-cell>
							</xsl:for-each>
						</fo:table-row>
					</fo:table-body>
				</fo:table>

			</xsl:for-each>
		</fo:flow>
	</fo:page-sequence>
</fo:root>
</xsl:template>		
</xsl:stylesheet>
