<?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"
	xmlns:ganttproject="http://ganttproject.sf.net/"
	version="1.0">


<!-- Basic Theme for PDF export from Ganttproject
     ALexandre THOMAS
		 Septembre 2003 -->


<xsl:template match="ganttproject:report">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

    <fo:layout-master-set>
      <!-- layout information -->
      <fo:simple-page-master master-name="simple"
                    page-height="29.7cm"
                    page-width="21cm"
                    margin-top="1cm"
                    margin-bottom="1cm"
                    margin-left="1.75cm"
                    margin-right="1.75cm">
        <fo:region-body margin-top="1cm"/>
        <fo:region-before extent="1cm"/>
        <fo:region-after extent="1cm"/>
      </fo:simple-page-master>
    </fo:layout-master-set>
    <!-- end: defines page layout -->


	    <fo:page-sequence master-reference="simple">

         <fo:flow flow-name="xsl-region-body">

			 
			 <fo:block font-size="10pt"
		        font-family="Helvetica"
		        line-height="24pt"
		        space-after.optimum="15pt"
		        color="black"
		        text-align="center"
		        padding-top="3pt">
		    	<xsl:apply-templates select="ganttproject:ganttchart"/>
	         </fo:block>

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



<!-- ========================================== GanttChart ========================================== -->
<xsl:template match="ganttproject:ganttchart">
    <!-- Show the real chart from a picture -->
    <fo:block text-align="right">
		<fo:external-graphic>
			<xsl:attribute name="src"><xsl:value-of select="@src"/></xsl:attribute>
			<xsl:attribute name="height">24cm</xsl:attribute>
		</fo:external-graphic>
    </fo:block>
</xsl:template>

</xsl:stylesheet>
