<?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">
	<xsl:template match="Patient_information">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			<!-- the master layout -->
			<fo:layout-master-set>
				<fo:simple-page-master master-reference="all" page-height="30cm" page-width="21.0cm" margin-top="2.5cm" margin-bottom="2.5cm" margin-left="1.5cm" margin-right="1.5cm">
					<!--fo:region-body margin-top="2.5cm" margin-bottom="1.9cm" background-image="xml4pharma1.gif"/-->
					<fo:region-body margin-top="2.5cm" margin-bottom="1.9cm"/>
					<fo:region-before extent="1.9cm"/>
					<fo:region-after extent="1cm"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<!-- header and footer of document -->
			<fo:page-sequence master-name="all" format="1">
				<fo:static-content flow-name="xsl-region-before">
					<fo:block text-align="start" font-size="10pt" color="black" font-family="serif" line-height="1em + 2pt">
				Country: <fo:inline color="blue">
							<xsl:apply-templates select="Country"/>
						</fo:inline>
					</fo:block>
					<fo:block text-align="start" font-size="10pt" color="black" font-family="serif" line-height="1em + 2pt">
	  			 Language: <fo:inline color="red">
							<xsl:apply-templates select="Language"/>
						</fo:inline>
					</fo:block>
				</fo:static-content>
				<fo:static-content flow-name="xsl-region-after">
					<fo:block text-align="start" font-size="10pt" font-family="serif" line-height="1em + 2pt">
			Page <fo:page-number/>
					</fo:block>
				</fo:static-content>
				<!-- the body of the page -->
				<fo:flow flow-name="xsl-region-body">
					<xsl:apply-templates select="Product_title"/>
					<xsl:apply-templates select="Information_item"/>
                              <fo:block text-align="center" space-before.optimum="25pt">
						<fo:external-graphic src="file:xml4pharma1.gif"/>
					</fo:block>
				</fo:flow>
				
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
	<!-- To be used in the heading ... -->
	<xsl:template match="Country">
		<xsl:value-of select="."/>
	</xsl:template>
	<xsl:template match="Language">
		<xsl:value-of select="."/>
	</xsl:template>
	<xsl:template match="Product_title">
		<fo:block color="red" font-size="25pt" font-family="sans-serif" space-before.optimum="3pt">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	<xsl:template match="Information_item">
		<xsl:apply-templates select="item_description"/>
		<xsl:apply-templates select="item_text"/>
	</xsl:template>
	<xsl:template match="item_description">
		<fo:block color="blue" font-size="18pt" font-family="sans-serif" space-before.optimum="20pt">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	<xsl:template match="item_text">
		<xsl:apply-templates select="emphasis"/>
		<xsl:apply-templates select="normal"/>
	</xsl:template>
	<xsl:template match="emphasis">
		<fo:block color="blue" font-size="15pt" font-family="sans-serif" font-weight="bold" space-before.optimum="10pt">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	<xsl:template match="normal">
		<fo:block color="black" font-size="15pt" font-family="sans-serif" start-indent="1em" space-before.optimum="10pt">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
</xsl:stylesheet>
