<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cv="http://www.gianlucabertelli.com">
	<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
	<xsl:template match="cv:curriculum">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			<!-- Impaginazione generale -->
			<fo:layout-master-set>
				<fo:simple-page-master master-name="normale" page-height="297mm" page-width="210mm" margin-top="1cm" margin-bottom="0cm" margin-left="1cm" margin-right="1cm">
					<fo:region-body margin-top="0cm" margin-bottom="1cm"/>
					<fo:region-before extent="1cm"/>
					<fo:region-after extent="1cm"/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<!-- Contenuti -->
			<fo:page-sequence master-reference="normale" initial-page-number="1" language="it" country="it">
				<fo:title>
					Curriculum
				</fo:title>
				<fo:static-content flow-name="xsl-region-after">
					<fo:block font-size="3mm" border-before-width="0.1mm" border-color="black" border-before-style="solid">
						gianluca.bertelli@gmail.com - www.gianlucabertelli.com
					</fo:block>
				</fo:static-content>
				<fo:flow flow-name="xsl-region-body">
					<fo:block flow-name="xsl-region-before" font-size="10mm" color="gray" font-style="italic" font-family="Baskerville"  font-weight="bold" border-after-style="solid" border-color="black" text-align="end">
							Gianluca Bertelli
					</fo:block>
					<fo:block font-size="3.5mm">
						<fo:block space-before="7mm" start-indent="3mm" border-color="grey" border-style="solid" border-width="0.1mm">
							<fo:block space-before="1mm" start-indent="4mm" font-weight="bold">
							TARGET
					</fo:block>
							<fo:list-block>
								<xsl:for-each select="obiettivo">
									<fo:list-item>
										<fo:list-item-label>
											<fo:block end-indent="3mm" start-indent="4mm">-</fo:block>
										</fo:list-item-label>
										<fo:list-item-body>
											<fo:block start-indent="6mm">
												<xsl:value-of select="."/>
											</fo:block>
										</fo:list-item-body>
									</fo:list-item>
								</xsl:for-each>
							</fo:list-block>
						</fo:block>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
							DETAILS
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="3cm"/>
							<fo:table-column column-width="10cm"/>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">first name:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/nome"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">surname:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/cognome"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">title:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/titolo"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">address:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/indirizzo/via"/>
										</fo:block>
										<fo:block>
											<xsl:value-of select="dati/indirizzo/cap"/>&#160;<xsl:value-of select="dati/indirizzo/citta"/>&#160;<xsl:value-of select="dati/indirizzo/provincia"/>
										</fo:block>
										<fo:block>
											<xsl:value-of select="dati/indirizzo/nazione"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">place of birth:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/luogonascita"/> (<xsl:value-of select="dati/datanascita"/>)
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">driving licence:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/patente"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">marital status:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/statocivile"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">national service:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/serviziomilitare"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">mobile:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/telefono"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">e-mail:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block>
											<xsl:value-of select="dati/email"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-variant="small-caps" font-weight="bold">website:</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block text-decoration="underline">
											<xsl:value-of select="dati/sitointernet"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
							EDUCATION
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="17cm"/>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell>
										<fo:block text-decoration="underline">
											<xsl:value-of select="studi/maturita/anno"/> - <xsl:value-of select="studi/maturita/istituto"/>
										</fo:block>
										<fo:block>
											<xsl:value-of select="studi/maturita/titolo"/>, marks
												<fo:inline font-weight="bold">
												<xsl:value-of select="studi/maturita/voto"/>
											</fo:inline>
											 out of
											 <fo:inline font-weight="bold">
												<xsl:value-of select="studi/maturita/voto/@massimo"/>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<xsl:for-each select="studi/laurea">
									<fo:table-row>
										<fo:table-cell>
											<fo:block text-decoration="underline">
												<xsl:value-of select="./anno"/> - <xsl:value-of select="./universita"/>
											</fo:block>
											<fo:block>department of <fo:inline font-weight="bold">
													<xsl:value-of select="./facolta"/>
												</fo:inline>, Degree: <fo:inline font-weight="bold">
													<xsl:value-of select="./corso"/>
												</fo:inline>
												<xsl:if test="./voto">, marks 
													<fo:inline font-weight="bold">
														<xsl:value-of select="./voto"/>
													</fo:inline> out of <fo:inline font-weight="bold">
														<xsl:value-of select="./voto/@massimo"/>
													</fo:inline>
												</xsl:if>
												<xsl:if test="./tesi">
													<fo:block>
													thesis: <fo:inline font-style="italic">
															<xsl:value-of select="./tesi"/>
														</fo:inline>
													</fo:block>
												</xsl:if>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
								<fo:table-row>
									<fo:table-cell>
										<fo:block text-decoration="underline">
											Publications
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<xsl:for-each select="studi/pubblicazioni">
									<fo:table-row>
										<fo:table-cell>
											<fo:block>
												<xsl:value-of select="anno"/>	- <xsl:value-of select="autori"/>
												<fo:block>
												"<xsl:value-of select="titolo"/>"
												</fo:block>
												<fo:block font-style="italic">
												<xsl:value-of select="evento"/></fo:block>
												<fo:block >
												Abstract: <xsl:value-of select="abstract"/>
												</fo:block >
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						FOREING LANGUAGES
						</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="3cm"/>
							<fo:table-column column-width="10cm"/>
							<fo:table-body>
								<xsl:for-each select="linguestraniere/lingua">
									<fo:table-row>
										<fo:table-cell>
											<fo:block text-decoration="underline">
												<xsl:value-of select="."/>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block>
												(european level: <xsl:value-of select="@livelloEuropeo"/>)
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-style="italic">
												reading
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block font-style="italic">
												<xsl:value-of select="@lettura"/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-style="italic">
												writing
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block font-style="italic">
												<xsl:value-of select="@scrittura"/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-style="italic">
												listen
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block font-style="italic">
												<xsl:value-of select="@comprensione"/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						WORKING EXPERIENCE
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="2cm"/>
							<fo:table-column column-width="5cm"/>
							<fo:table-column column-width="12cm"/>
							<fo:table-body>
								<xsl:for-each select="lavoro/esperienza">
									<fo:table-row>
										<fo:table-cell border-style="solid" border-color="grey" border-width="0.1mm">
											<fo:block start-indent="1mm">
												<xsl:value-of select="data"/>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell border-style="solid" border-color="grey" border-width="0.1mm">
											<fo:block start-indent="1mm">
												<xsl:value-of select="azienda"/>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell border-style="solid" border-color="grey" border-width="0.1mm">
											<fo:block start-indent="1mm">
												<xsl:value-of select="descrizione/testo"/>
											</fo:block>
											<xsl:if test="descrizione/url">
												<fo:block start-indent="1mm">http://<xsl:value-of select="descrizione/url"/>
												</fo:block>
											</xsl:if>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						OPERATIVE SYSTEMS
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="15cm"/>
							<fo:table-body>
								<xsl:for-each select="knowhow/so">
									<fo:table-row>
										<fo:table-cell>
											<fo:block>
												<xsl:value-of select="."/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						PROGRAMMING LANGUAGES
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="10cm"/>
							<fo:table-column column-width="5cm"/>
							<fo:table-body>
								<xsl:for-each select="knowhow/linguaggio">
									<fo:table-row>
										<fo:table-cell border-style="solid" border-color="grey" border-width="0.1mm">
											<fo:block start-indent="1mm">
												<xsl:value-of select="."/>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell border-style="solid" border-color="grey" border-width="0.1mm">
											<fo:block start-indent="1mm">
												<xsl:value-of select="@conoscenza"/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						DATABASE
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="15cm"/>
							<fo:table-body>
								<xsl:for-each select="knowhow/database">
									<fo:table-row>
										<fo:table-cell>
											<fo:block>
												<xsl:value-of select="."/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						SOFTWARE
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="15cm"/>
							<fo:table-body>
								<xsl:for-each select="knowhow/applicazione">
									<fo:table-row>
										<fo:table-cell>
											<fo:block>
												<xsl:value-of select="."/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  -->
						<fo:block space-before="8mm" font-weight="bold">
						NOTE
					</fo:block>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="19cm"/>
							<fo:table-body>
								<xsl:for-each select="knowhow/note">
									<fo:table-row>
										<fo:table-cell>
											<fo:block>
												 - <xsl:value-of select="."/>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:for-each>
							</fo:table-body>
						</fo:table>
						<fo:block space-before="1cm" text-align="justify">
							<xsl:value-of select="conclusione"/>
						</fo:block>
						<fo:block space-before="3cm" text-align="end" end-indent="3cm">
							<xsl:value-of select="firma"/>
						</fo:block>
					</fo:block>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
</xsl:stylesheet>
