<?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" />
<xsl:template match="//NewDataSet">
		<fo:root>

			<fo:layout-master-set>
				<fo:simple-page-master master-name="SAT-Customer Report" page-height="297.00mm" page-width="210.00mm">
					<fo:region-body margin-bottom="30.00mm" margin-top="30.00mm" margin-left="30.00mm" margin-right="30.00mm"/>
					<fo:region-before display-align="after"/>
					<fo:region-after extent="1.00in"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			
				<fo:page-sequence master-reference="SAT-Customer Report" force-page-count="no-force">
					<fo:static-content flow-name="xsl-region-after">
        			<fo:block font-size="8.0pt" font-family="sans-serif" padding-after="2.0pt"
                  		space-before="4.0pt" text-align="left" start-indent="32.00mm">                  		
                 		 Page <fo:page-number/>
						 of <fo:page-number-citation ref-id="terminator"/>
					 </fo:block>                		
        			 </fo:static-content>

					<fo:flow flow-name="xsl-region-body">						
						<fo:block font-size="16pt" 
							font-weight="bold"
                					font-family="arial sans-serif" 
                					line-height="24pt"
                					space-after.optimum="15pt"
                					color="black"
                					text-align="center"
                					padding-top="3pt">
            						<xsl:value-of select="header/report"/>
          					</fo:block>
											
						<!--<top table report information>-->
						<fo:block absolute-position="absolute" 
							font-family="Arial" 
							font-size="10.00pt"								 
							height="23.64mm" 
							left="-0.10mm" 
							top="20.01mm" 
							width="150.28mm">
							   <fo:table width="150.28mm" table-layout="fixed" border="thin solid 0.1 Gray" padding="2mm">
								<fo:table-column column-width="88.18mm"/>
								<fo:table-column column-width="62.11mm"/>
								<fo:table-body start-indent="0pt">							
									<fo:table-row height="4.00mm">
								 	    <fo:table-cell>												
										<fo:block>Surveys Completed</fo:block>												
									   </fo:table-cell>

   									   <fo:table-cell>												
										<fo:block><xsl:value-of select="header/daterange"/></fo:block>												
									   </fo:table-cell>
									</fo:table-row>

									<fo:table-row height="4.00mm">
									   <fo:table-cell>
										<fo:block>Customers(s) #:</fo:block>												
									   </fo:table-cell>
 
									  <fo:table-cell>												
										<fo:block><xsl:value-of select="header/customers"/></fo:block>																								
									  </fo:table-cell>
									</fo:table-row>

									<fo:table-row height="4.00mm">
									  <fo:table-cell>												
										<fo:block>Service Type:</fo:block>												
									  </fo:table-cell>

									  <fo:table-cell>												
										<fo:block><xsl:value-of select="header/servicetype"/></fo:block>																					
									  </fo:table-cell>
									</fo:table-row>										
								</fo:table-body>
							</fo:table>					
						</fo:block>

						<fo:block absolute-position="absolute" 
							 font-family="Arial"
							 text-align="center"
							 font-size="9.00pt"							 
							 left="-0.10mm"
							 top="20.01mm"
							 width="150.00mm"
							 space-before="5mm">
								<fo:table table-layout="fixed" width="150.00mm">
									<fo:table-column column-width="110.00mm"/>
									<fo:table-column column-width="20.00mm" number-columns-repeated="2"/>								
									  <fo:table-header start-indent="0pt">
 										 <fo:table-row height="7.70mm">
    											<fo:table-cell display-align="center">
      											 <fo:block text-align="center">
      											  <fo:block start-indent="0pt"> </fo:block>
     											 </fo:block>
   											</fo:table-cell>

											<fo:table-cell display-align="center">
      											 <fo:block text-align="center" font-weight="bold">
      											  <fo:block start-indent="0pt"># of Respondents *</fo:block>
     											 </fo:block>
   											</fo:table-cell>											

											<fo:table-cell display-align="center">
      											 <fo:block text-align="center" font-weight="bold">
      											  <fo:block start-indent="0pt">Percentage Satisfied</fo:block>
     											 </fo:block>
   											</fo:table-cell>
																				
										</fo:table-row>
									      </fo:table-header>

									 <fo:table-body start-indent="0pt">
									   <xsl:for-each select="datasettablename">
										<fo:table-row>
											<fo:table-cell display-align="center">
											 <fo:block text-align="left" font-weight="bold" overflow="condense">
											  <fo:block start-indent="0pt">
											    <xsl:choose>
												<xsl:when test="preceding-sibling::datasettablename[1]/section_title = section_title"></xsl:when>												
												<xsl:otherwise><fo:block>
												<fo:leader leader-pattern="space"/>
												</fo:block> 												
												<xsl:value-of select="section_title"/>																						 
												</xsl:otherwise>
												</xsl:choose>
											  </fo:block>
											 </fo:block>
											</fo:table-cell>																					
										</fo:table-row>																								
															
										<fo:table-row>									
											<fo:table-cell display-align="center">
											 <fo:block text-align="left">
											  <fo:block start-indent="0pt">
											    <xsl:value-of select="question"/>
											  </fo:block>
											 </fo:block>
											</fo:table-cell>

											<fo:table-cell display-align="center">
											 <fo:block text-align="center">
											  <fo:block start-indent="0pt">
											    <xsl:value-of select="respondents"/>
											  </fo:block>
											 </fo:block>
											</fo:table-cell>
											
											<fo:table-cell padding-right="5.00mm">
											 <fo:block text-align="right">
											  <fo:block start-indent="0pt">
											   <!-- <xsl:value-of select="format-number(satisfied,'0.0%')"/>-->
											    <xsl:value-of select="format-number(satisfied,'#.0')"/>% 
											  </fo:block>
											 </fo:block>
											</fo:table-cell>										
											
										</fo:table-row>
									  </xsl:for-each>																								
								     </fo:table-body>
							</fo:table>							
						</fo:block>

						<fo:block absolute-position="absolute"
							 font-family="Arial"
							 font-size="9.00pt"
							 height="15.08mm" 
							 left="1.22mm" 
							 top="1.49mm" 
							 width="150.81mm" 
							 overflow="condense"
							 space-before="10.00mm"
							 start-indent="0pt">							 
								<fo:inline font-weight="bold">* </fo:inline>								
								<fo:inline>Neutral and N/A responses are not included</fo:inline>																						
						</fo:block>
								
						<fo:block absolute-position="absolute"
							 font-family="Arial"
							 font-size="9.00pt"
							 height="15.08mm" 
							 left="1.22mm" 
							 top="1.49mm" 
							 width="150.81mm" 
							 overflow="condense"							 
							 start-indent="0pt">			 
							<fo:inline font-weight="bold">**</fo:inline>								
							<fo:inline>Non numeric responses are excluded</fo:inline>																													
						</fo:block>				
													
						<fo:block id="terminator"/>
					</fo:flow>
				</fo:page-sequence>						
		</fo:root>
</xsl:template>
</xsl:stylesheet>				<!-- Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="sat&#x2D;customer.xml" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="fop" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->