<?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:template match="/">
	
	<!-- Tama on rahtikirjan esikatselua varten oleva xsl tiedosto.
		Eli tama tiedosto nakyy naytolla oikealta, mutta
		matriisille meneva tulostuspohja on erillinen xsl tiedosto -->
		
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			<fo:layout-master-set>
				<fo:simple-page-master master-name="A4"
					page-width="210mm"  page-height="297mm"
					margin-top="0.5in"  margin-bottom="0.5in"
					margin-left="0.5in" margin-right="0.5in">
					<fo:region-body/>
				</fo:simple-page-master>
			</fo:layout-master-set>
			<fo:page-sequence master-name="A4">
				<fo:flow flow-name="xsl-region-body">
					<xsl:apply-templates select="//palautusrahtikirja">
					</xsl:apply-templates>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>
	
	<xsl:template match="palautusrahtikirja">
		<fo:table height="5mm" width="184mm">
			<fo:table-column column-width="184mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="5mm" width="184mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							RAHTIKIRJA
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 1,2,3,4,5,50,26.
			Olen kommentoinut pienemmatkin taulukot jotka ovat taman ison taulukon
			sisalla, helpottaakseni monimutkaisten taulukoiden hahmottamista -->
		<fo:table height="50mm" width="184mm">
			<fo:table-column column-width="11mm"/>
			<fo:table-column column-width="88mm"/>
			<fo:table-column column-width="85mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="50mm" width="11mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:block font-family="Helvetica" font-size="30pt" font-weight="bold">
							1
						</fo:block>
					</fo:table-cell>
					
					<fo:table-cell height="50mm" width="173mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="25mm" width="173mm">
							<fo:table-column column-width="88mm"/>
							<fo:table-column column-width="85mm"/>
							<fo:table-body>
						  		<fo:table-row>
						  			<!-- Tama cell sisaltaa kohdat 1,50 -->
									<fo:table-cell height="25mm" width="88mm">
										<fo:table height="6mm" width="88mm">
											<fo:table-column column-width="60mm"/>
											<fo:table-column column-width="28mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="6mm" width="60mm" padding="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															1 L&#228;hett&#228;j&#228; osoitteineen
														</fo:block>
													</fo:table-cell>
													
													<fo:table-cell height="6mm" width="28mm">
														<fo:table height="6mm" width="28mm">
															<fo:table-column column-width="28mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="6mm" width="28mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			50
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
										
										<fo:table height="19mm" width="88mm">
											<fo:table-column column-width="88mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="19mm" width="88mm">
														<fo:table height="3mm" width="88mm">
															<fo:table-column column-width="60mm"/>
															<fo:table-column column-width="28mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="3mm" width="60mm" padding-start="1mm">
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettaja/nimi"/>		<!-- Hakee lahettajan nimen xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																	<fo:table-cell height="3mm" width="28mm" padding-start="1mm">
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettaja/sopimusnumero"/>	<!-- Hakee sopimusnumeron tiedon xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
														<fo:table height="16mm" width="88mm">
															<fo:table-column column-width="88mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="16mm" width="88mm" padding-start="1mm">
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettaja/osoite1"/>	<!-- Hakee lahettajan lahiosoitteen xml dokumentista -->
																		</fo:block>
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettaja/osoite2"/>	<!-- Hakee lahettajan postitoimipaikan xml dokumentista -->
																		</fo:block>
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettaja/osoite3"/>	<!-- Hakee lahettajan postinumeron xml dokumentista -->
																		</fo:block>
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettaja/osoite4"/>	<!-- Hakee lahettajan maakoodin xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									
									<!-- Tama cell sisaltaa kohdat 2,26,3 -->
									<fo:table-cell height="6mm" width="85mm">
										<!-- Tama taulukko sisaltaa kohdat 2,26 -->
										<fo:table height="6mm" width="85mm">
											<fo:table-column column-width="65mm"/>
											<fo:table-column column-width="20mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="6mm" width="65mm">
														<fo:table height="6mm" width="65mm">
															<fo:table-column column-width="65mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="6mm" width="65mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			2 Toimitussop.
																		</fo:block>
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="toimitussopimus"/>	<!-- Hakee toimitussopimus tiedon xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
													
													<fo:table-cell height="6mm" width="20mm">
														<fo:table height="6mm" width="20mm">
															<fo:table-column column-width="20mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="6mm" width="20mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			26 Rahtikirja
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
										
										<!-- Tama taulukko sisaltaa kohdat 3 -->
										<fo:table height="19mm" width="85mm">
											<fo:table-column column-width="85mm"/>
											<fo:table-column column-width="20mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="19mm" width="85mm">
														<fo:table height="19mm" width="85mm">
															<fo:table-column column-width="85mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="5mm" width="85mm" border-width="1pt" border-color="green" border-style="solid">
																		<fo:table height="5mm" width="85mm">
																			<fo:table-column column-width="45mm"/>
																			<fo:table-column column-width="20mm"/>
																			<fo:table-column column-width="20mm"/>
																			<fo:table-body>
																				<fo:table-row>
																					<fo:table-cell height="5mm" width="45mm" padding="1mm">
																						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																							3 L&#228;hetysasema
																						</fo:block>
																					</fo:table-cell>

																					<fo:table-cell height="5mm" width="20mm" padding-start="14mm">
																						<fo:block font-family="Courier" font-size="10pt" font-weight="bold" padding-before="3mm">
																							<xsl:value-of select="lahtomaa"/>		<!-- Hakee lahtomaan tiedon xml dokumentista -->
																						</fo:block>
																					</fo:table-cell>

																					<fo:table-cell height="5mm" width="20mm" border-width="1pt" border-color="green" border-style="solid" padding-start="1mm">
																						<fo:block font-family="Courier" font-size="10pt" font-weight="bold" padding-before="3mm">
																							<xsl:value-of select="lahtopaikkakoodi"/>	<!-- Hakee lahtopaikkakoodin tiedon xml dokumentista -->
																						</fo:block>
																					</fo:table-cell>
																				</fo:table-row>
																			</fo:table-body>
																		</fo:table>
																		<fo:table height="14mm" width="85mm">
																			<fo:table-column column-width="85mm"/>
																			<fo:table-body>
																				<fo:table-row>
																					<fo:table-cell height="14mm" width="85mm" padding="1mm">
																						<fo:block font-family="Courier" font-size="10pt" font-weight="bold" padding-before="2mm">
																								<xsl:value-of select="lahtopaikka"/>,		<!-- Hakee lahtopaikan tiedon xml dokumentista -->
																							<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																								<xsl:value-of select="kuormausraide"/>		<!-- Hakee kuormausraiteen tiedon xml dokumentista -->
																							</fo:inline>
																						</fo:block>
																					</fo:table-cell>
																				</fo:table-row>
																			</fo:table-body>
																		</fo:table>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						
						<!-- Tama taulukko sisaltaa kohdat 5, 4 -->
						<fo:table height="25mm" width="170mm">
							<fo:table-column column-width="88mm"/>
							<fo:table-column column-width="85mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="25mm" width="88mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											5 Vastaanottaja osoitteineen
										</fo:block>
										<xsl:apply-templates select="vastaanottaja"/>
									</fo:table-cell>
									<fo:table-cell height="25mm" width="85mm">
										<fo:table height="25mm" width="184mm">
											<fo:table-column column-width="85mm"/>
											<fo:table-body>
									  			<fo:table-row>
													<fo:table-cell height="25mm" width="85mm" border-width="1pt" border-color="green" border-style="solid">
														<fo:table height="3mm" width="184mm">
															<fo:table-column column-width="55mm"/>
															<fo:table-column column-width="30mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="3mm" width="55mm" padding="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			4 L&#228;hett&#228;j&#228;n erit.ilmoituksia
																		</fo:block>
																	</fo:table-cell>
																	<fo:table-cell height="3mm" width="30mm" padding="1mm">
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			Viite: <xsl:value-of select="rahtikirjanro"/>		<!-- Hakee rahtikirjanro tiedon xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
														<fo:table height="22mm" width="184mm">
															<fo:table-column column-width="85mm"/>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell height="22mm" width="85mm" padding-start="1mm">
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="lahettajan_ilmoituksia"/>	<!-- Hakee lahettajan_ilmoituksia tiedon xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 6,27 -->
		<fo:table height="17mm" width="184mm">
			<fo:table-column column-width="99mm"/>
			<fo:table-column column-width="85mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="17mm" width="99mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							6 Merkinn&#228;t, jotka eiv&#228;t ole v&#228;ltt&#228;m&#228;tt&#246;mi&#228; rautateille
						</fo:block>
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
							<xsl:value-of select="ei_rautateiden_merkinnat"/>	<!-- Hakee ei_rautateiden_merkinnat tiedon xml dokumentista -->
						</fo:block>
					</fo:table-cell>
					<fo:table-cell height="17mm" width="85mm">
						<fo:table height="17mm" width="85mm">
							<fo:table-column column-width="85mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="17mm" width="85mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											27 Tullin merkint&#246;j&#228;
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 7,28,29,30,31,32 -->
		<fo:table height="17mm" width="184mm">
			<fo:table-column column-width="99mm"/>
			<fo:table-column column-width="85mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="17mm" width="99mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="4mm" width="99mm">
							<fo:table-column column-width="59mm"/>
							<fo:table-column column-width="40mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="4mm" width="59mm" padding-before="1mm" padding-start="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											7 Rajanylitysasemat
										</fo:block>
									</fo:table-cell>
									<fo:table-cell height="4mm" width="40mm" border-width="1pt" border-color="green" border-style="solid">
										<fo:table height="4mm" width="40mm">
											<fo:table-column column-width="40mm"/>
											<fo:table-body>
			  									<fo:table-row>
													<fo:table-cell height="4mm" width="40mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="maaramaa"/>	<!-- Hakee maaramaan tiedon xml dokumentista -->
															<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																,
															</fo:inline>
															<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																<xsl:value-of select="suomen_raja_asemakoodi"/>	<!-- Hakee suomen_raja_asemakoodin tiedon xml dokumentista -->
															</fo:inline>
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold" padding-before="1mm">
							<xsl:value-of select="muut_raja_asemat"/>	<!-- Hakee muut_raja_asemat tiedon xml dokumentista -->
						</fo:block>
					</fo:table-cell>
					
					<fo:table-cell height="17mm" width="85mm">
						<fo:table height="9mm" width="85mm">
							<fo:table-column column-width="85mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="9mm" width="85mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="6pt" font-weight="bold">
											28 Vaunu 29 Kantavuus 30 Akselililuku 31 Taarapaino 32 Tark.taarapaino
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						
						<fo:table height="8mm" width="85mm">
							<fo:table-column column-width="37mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-column column-width="6mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="8mm" width="37mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											28 No
										</fo:block>
									</fo:table-cell>
									
									<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											29 t
											<fo:inline font-family="Helvetica" font-size="5pt" font-weight="bold">
												T
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									
									<fo:table-cell height="8mm" width="6mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="0.4mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											30
										</fo:block>
									</fo:table-cell>
									
									<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											31 t
											<fo:inline font-family="Helvetica" font-size="5pt" font-weight="bold">
												T
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									
									<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											32 t
											<fo:inline font-family="Helvetica" font-size="5pt" font-weight="bold">
												T
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 8 -->
		<fo:table height="17mm" width="184mm">
			<fo:table-column column-width="99mm"/>
			<fo:table-column column-width="85mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="17mm" width="99mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="4mm" width="99mm">
							<fo:table-column column-width="59mm"/>
							<fo:table-column column-width="40mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="4mm" width="59mm" padding-before="1mm" padding-start="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											8 M&#228;&#228;r&#228;asema ja -rautatie
										</fo:block>
									</fo:table-cell>
									<fo:table-cell height="4mm" width="40mm" border-width="1pt" border-color="green" border-style="solid">
										<fo:table height="4mm" width="40mm">
											<fo:table-column column-width="40mm"/>
											<fo:table-body>
			  									<fo:table-row>
													<fo:table-cell height="4mm" width="40mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="maaramaa"/>	<!-- Hakee maaramaan tiedon xml dokumentista -->
															<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																,
															</fo:inline>
															<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																<xsl:value-of select="maarapaikkakoodi"/>	<!-- Hakee maarapaikkakoodin tiedon xml dokumentista -->
															</fo:inline>
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold" padding-before="1mm">
							<xsl:value-of select="maarapaikka"/>	<!-- Hakee maarapaikan tiedon xml dokumentista -->
							<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
								,
							</fo:inline>
							<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
								<xsl:value-of select="maarapaikka_huom"/>	<!-- Hakee maarapaikka_huom tiedon xml dokumentista -->
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell height="17mm" width="85mm">
						<fo:table height="17mm" width="85mm">
							<fo:table-column column-width="85mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="17mm" width="85mm">
										<fo:table height="8mm" width="85mm">
										<fo:table-column column-width="37mm"/>
										<fo:table-column column-width="14mm"/>
										<fo:table-column column-width="6mm"/>
										<fo:table-column column-width="14mm"/>
										<fo:table-column column-width="14mm"/>
											<fo:table-body>
	  											<fo:table-row>
													<fo:table-cell height="8mm" width="37mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[1]/vaununro"/>	<!-- Tahan tulee 1. vaunun vaununro -->
															
															<xsl:if test="vaunu[1]/omistajamaa!=''">
																<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																	/<xsl:value-of select="vaunu[1]/omistajamaa"/>	<!-- Tahan tulee 1. vaunun omistajamaa -->
																</fo:inline>
															</xsl:if>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[1]/kantavuus"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="6mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[1]/akseliluku"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[1]/taarapaino"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
													</fo:table-cell>
												</fo:table-row>
	  											<fo:table-row>
													<fo:table-cell height="8mm" width="37mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[2]/vaununro"/>		<!-- Tahan tulee 2. vaunun vaununro -->
															
															<xsl:if test="vaunu[2]/omistajamaa!=''">
																<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																	/<xsl:value-of select="vaunu[2]/omistajamaa"/>	<!-- Tahan tulee 2. vaunun omistajamaa -->
																</fo:inline>
															</xsl:if>
														</fo:block>
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[3]/vaununro"/>		<!-- Tahan tulee 3. vaunun vaununro -->
															
															<xsl:if test="vaunu[3]/omistajamaa!=''">
																<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																	/<xsl:value-of select="vaunu[3]/omistajamaa"/>	<!-- Tahan tulee 3. vaunun omistajamaa -->
																</fo:inline>
															</xsl:if>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[2]/kantavuus"/>
														</fo:block>
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[3]/kantavuus"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="6mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[2]/akseliluku"/>
														</fo:block>
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[3]/akseliluku"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[2]/taarapaino"/>
														</fo:block>
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
															<xsl:value-of select="vaunu[3]/taarapaino"/>
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="8mm" width="14mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 9,10,11,12,13,14,15,33 seka jos vaunuja on yli 2 niin myos vaunujen tietoja.
		Taulukon toisen rivin sisalto maaraytyy sen mukaan, onko kyseessa palautus- vai vientirahtikirja. -->
		<fo:table height="65mm" width="184mm">
			<fo:table-column column-width="25mm"/>
			<fo:table-column column-width="13mm"/>
			<fo:table-column column-width="16mm"/>
			<fo:table-column column-width="54mm"/>
			<fo:table-column column-width="16mm"/>
			<fo:table-column column-width="15mm"/>
			<fo:table-column column-width="24mm"/>
			<fo:table-column column-width="21mm"/>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell height="5mm" width="25mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							9 Merkit ja numerot
						</fo:block>
					</fo:table-cell>
						
					<fo:table-cell height="5mm" width="13mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							10 Kollil.
						</fo:block>
					</fo:table-cell>

					<fo:table-cell height="5mm" width="16mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							11 P&#228;&#228;llys
						</fo:block>
					</fo:table-cell>

					<fo:table-cell height="5mm" width="54mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							12 L&#228;hetyksen sis&#228;lt&#246;
						</fo:block>
					</fo:table-cell>

					<fo:table-cell height="5mm" width="16mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							13 Koodi
						</fo:block>
					</fo:table-cell>

					<fo:table-cell height="5mm" width="15mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid"
							padding-before="1mm" padding-start="0.4mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							14 Tilavuus
						</fo:block>
					</fo:table-cell>

					<fo:table-cell height="5mm" width="24mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							15 l&#228;hett&#228;j&#228;n ilm.
						</fo:block>
					</fo:table-cell>

					<fo:table-cell height="5mm" width="21mm" padding="1mm"
							border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
							border-before-color="green" border-start-color="green" border-end-color="green"
							border-before-style="solid" border-start-style="solid" border-end-style="solid" >
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							33 rautat. todettu
						</fo:block>
					</fo:table-cell>
				</fo:table-row>

				<xsl:choose>
					<!-- Tama koodi hoitaa itaisen palautusrahtikirjan tiedot-->
					<xsl:when test="rahtikirjan_tyyppi='PALAUTUS'">
							<fo:table-row>
							
								<fo:table-cell height="60mm" width="25mm" padding="1mm"
										border-after-width="1pt" border-start-width="1pt" border-end-width="1pt"
										border-after-color="green" border-start-color="green" border-end-color="green"
										border-after-style="solid" border-start-style="solid" border-end-style="solid">
									<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
										<xsl:value-of select="merkit_ja_numerot"/>
									</fo:block>
								</fo:table-cell>
								
								<fo:table-cell height="60mm" width="13mm" padding="1mm"
										border-after-width="1pt" border-start-width="1pt" border-end-width="1pt"
										border-after-color="green" border-start-color="green" border-end-color="green"
										border-after-style="solid" border-start-style="solid" border-end-style="solid">
									<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
										<xsl:value-of select="kollilukumaara"/>
									</fo:block>
								</fo:table-cell>
								
								<fo:table-cell number-columns-spanned="4" height="60mm" padding="1mm"
										border-before-width="1pt" border-start-width="1pt" border-end-width="1pt"
										border-before-color="green" border-start-color="green" border-end-color="green"
										border-before-style="solid" border-start-style="solid" border-end-style="solid">
									<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold"  padding="1mm">
										Kenttien 11 - 15 tiedot 
									</fo:block>
									<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
										Tyhj&#228; vaunu.
									</fo:block>
									<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
										Ei kuulu rautateille tai annettu vuokralle.
									</fo:block>
									<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
										Purettu
										<fo:inline font-family="Courier" font-size="10pt" font-weight="bold" font-style="normal">
											<xsl:for-each select="lahetyksen_tiedot/tavara/nimi">
												<xsl:value-of select="."/>
												<xsl:if test="position()!=last()">, </xsl:if>
												<xsl:if test="position()=last()">. </xsl:if>
											</xsl:for-each>
										</fo:inline>
									</fo:block>
										<!-- Tassa on ehto-operaatiot jotka eivat kutsu templatea jos xml dokumentin tagi on tyhja -->
										
										<xsl:if test="lahetyksen_tiedot/idan_vak!=''">
											<xsl:apply-templates select="lahetyksen_tiedot/idan_vak"/>									
										</xsl:if>
										
										<xsl:if test="lahetyksen_tiedot/lipukenro!=''">
											<xsl:apply-templates select="lahetyksen_tiedot/lipukenro"/>
										</xsl:if>
										
										<xsl:if test="lahetyksen_tiedot/vaarallisuustieto/leimahduspiste!=''">
											<xsl:apply-templates select="lahetyksen_tiedot/vaarallisuustieto/leimahduspiste"/>
										</xsl:if>
								</fo:table-cell>
								
								<fo:table-cell height="60mm" width="24mm" padding="1mm"
										border-after-width="1pt" border-start-width="1pt" border-end-width="1pt"
										border-after-color="green" border-start-color="green" border-end-color="green"
										border-after-style="solid" border-start-style="solid" border-end-style="solid">
									<fo:block>
									</fo:block>
								</fo:table-cell>
								
								<fo:table-cell height="60mm" width="21mm" padding="1mm"
										border-after-width="1pt" border-start-width="1pt" border-end-width="1pt"
										border-after-color="green" border-start-color="green" border-end-color="green"
										border-after-style="solid" border-start-style="solid" border-end-style="solid">
									<fo:block>
									</fo:block>
								</fo:table-cell>
								
						</fo:table-row>
					</xsl:when>
					<xsl:when test="rahtikirjan_tyyppi='IT&#x00C4;INEN'">
						<!-- Tama template luo taulukkoon rivin, jolla on itaisen vientirahtikirjan tiedot.  -->
						<xsl:apply-templates select="lahetyksen_tiedot"/>
					</xsl:when>
				</xsl:choose>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 16,17,18 -->
		<fo:table height="20mm" width="184mm">
			<fo:table-column column-width="70mm"/>
			<fo:table-column column-width="70mm"/>
			<fo:table-column column-width="44mm"/>
			<fo:table-body>
	  			<fo:table-row>
	  				<!-- Tama cell sisaltaa kohdan 16 -->
					<fo:table-cell height="20mm" width="70mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="20mm" width="70mm">
							<fo:table-column column-width="70mm"/>
							<fo:table-body>
				  				<fo:table-row>
									<fo:table-cell height="18mm" width="70mm" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											16 Yhteens&#228; kolleja (kirjaimin)
										</fo:block>
										<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
											<xsl:value-of select="lahetyksen_tiedot/kolleja_yhteensa"/>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
					<!-- Tama cell sisaltaa kohdan 17 -->
					<fo:table-cell height="20mm" width="70mm">
						<fo:table height="20mm" width="70mm">
							<fo:table-column column-width="70mm"/>
							<fo:table-body>
				  				<fo:table-row>
									<fo:table-cell height="20mm" width="70mm">
										<fo:table height="18mm" width="70mm">
											<fo:table-column column-width="70mm"/>
											<fo:table-body>
								  				<fo:table-row>
													<fo:table-cell height="18mm" width="70mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															17 Paino yhteens&#228; (kirjaimin)
														</fo:block>
														<fo:block font-family="Courier" font-size="10pt" font-weight="bold" language="fi" hyphenate="true">
															<!-- hyphenate: tavutetaan sisalto. FOP-BUGI: xsl:value-of arvoa ei osata tavuttaa -->
															<xsl:value-of select="lahetyksen_tiedot/paino_yhteensa"/>
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
					<!-- Tama cell sisaltaa kohdan 18 -->
					<fo:table-cell height="20mm" width="44mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="20mm" width="44mm">
							<fo:table-column column-width="44mm"/>
							<fo:table-body>
				  				<fo:table-row>
									<fo:table-cell height="18mm" width="44mm" padding="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											18 L&#228;hett&#228;j&#228;n allekirjoitus
										</fo:block>
										<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
											<xsl:value-of select="lahettaja/nimi"/>:n psta	<!-- Hakee lahettajan nimen xml dokumentista -->
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 19, 20, 21, 22, 23 -->
		<fo:table height="26mm" width="184mm">
			<fo:table-column column-width="23mm"/>
			<fo:table-column column-width="73mm"/>
			<fo:table-column column-width="88mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="26mm" width="23mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							21 Kuljetusmaksut suorittaa
						</fo:block>
					</fo:table-cell>
					<fo:table-cell height="13mm" width="73mm">
						<xsl:apply-templates select="rahdin_maksaja"/>
					</fo:table-cell>
					<fo:table-cell height="26mm" width="88mm">
						<fo:table height="3mm" width="88mm">
							<fo:table-column column-width="88mm"/>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell height="3mm" width="88mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											Konteinerit/Kuljetuslaitteet
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:table height="26mm" width="88mm">
							<fo:table-column column-width="44mm"/>
							<fo:table-column column-width="44mm"/>
							<fo:table-body>
		  						<fo:table-row>
									<fo:table-cell height="23mm" width="44mm">
										<fo:table height="23mm" width="44mm">
											<fo:table-column column-width="44mm"/>
											<fo:table-body>
		  										<fo:table-row>
													<fo:table-cell height="23mm" width="44mm">
														<fo:table height="10mm" width="44mm">
															<fo:table-column column-width="44mm"/>
															<fo:table-body>
						  										<fo:table-row>
																	<fo:table-cell height="10mm" width="44mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			19 Laji
																		</fo:block>
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="kontti/kontin_laji"/>	<!-- Hakee kontin_lajin tiedon xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
														<xsl:apply-templates select="lahetyksen_tiedot/lahetyksen_laji"/>	<!-- Hakee lahetyksen_laji tiedot erillisesta tempeleitista -->
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="26mm" width="44mm">
										<fo:table height="26mm" width="44mm">
											<fo:table-column column-width="44mm"/>
											<fo:table-body>
		  										<fo:table-row>
													<fo:table-cell height="26mm" width="44mm">
														<fo:table height="10mm" width="44mm">
															<fo:table-column column-width="44mm"/>
															<fo:table-body>
						  										<fo:table-row>
																	<fo:table-cell height="10mm" width="44mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			20 Omistaja ja nro
																		</fo:block>
																		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																			<xsl:value-of select="kontti/kontin_omistajan_tunnus"/>	<!-- Hakee kontin_omistajan_tunnus tiedon xml dokumentista -->
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
														<xsl:apply-templates select="lahetyksen_tiedot/kuormaaja"/>	<!-- //kuormaaja--> <!-- Hakee kuormaaja tiedot erillisesta tempeleitista -->
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		
		<!-- Tama taulukko sisaltaa kohdat 24, 25, 45 -->
		<fo:table height="25mm" width="184mm">
			<fo:table-column column-width="96mm"/>
			<fo:table-column column-width="88mm"/>
			<fo:table-body>
	  			<fo:table-row>
					<fo:table-cell height="25mm" width="96mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							24 L&#228;hett&#228;j&#228;n liitteet
						</fo:block>
						<xsl:apply-templates select="rahdin_maksaja/maksaja_huom"/>
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
							<xsl:value-of select="lahettajan_liitteet"/>	<!-- Hakee lahettajan_liitteet xml dokumentista -->
						</fo:block>
					</fo:table-cell>
					
					<fo:table-cell height="25mm" width="88mm">
						<fo:table height="25mm" width="88mm">
							<fo:table-column column-width="88mm"/>
							<fo:table-body>
	  							<fo:table-row>
									<fo:table-cell height="5mm" width="88mm">
										<fo:table height="4mm" width="88mm">
											<fo:table-column column-width="88mm"/>
											<fo:table-body>
	  											<fo:table-row>
													<fo:table-cell height="	4mm" width="88mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															25 Hankintaetu
															<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																<xsl:value-of select="lahetyksen_tiedot/hankintaetu"/>
															</fo:inline>
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
										<fo:table height="4mm" width="88mm">
											<fo:table-column column-width="88mm"/>
											<fo:table-body>
	  											<fo:table-row>
													<fo:table-cell height="4mm" width="88mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															45 Lyijykkeet
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
										<fo:table height="12mm" width="88mm">
											<fo:table-column column-width="8mm"/>
											<fo:table-column column-width="80mm"/>
											<fo:table-body>
	  											<fo:table-row>
													<fo:table-cell height="4mm" width="8mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															Luku
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="4mm" width="80mm">
														<fo:table height="4mm" width="80mm">
															<fo:table-column column-width="80mm"/>
															<fo:table-body>
				  												<fo:table-row>
																	<fo:table-cell height="4mm" width="80mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																			Merkit
																			<fo:inline font-family="Courier" font-size="10pt" font-weight="bold">
																				<xsl:value-of select="sinetit"/>	<!-- Hakee sinetit xml dokumentista -->
																			</fo:inline>
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
												
	  											<fo:table-row>
													<fo:table-cell height="4mm" width="8mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="4mm" width="80mm">
														<fo:table height="4mm" width="80mm">
															<fo:table-column column-width="80mm"/>
															<fo:table-body>
				  												<fo:table-row>
																	<fo:table-cell height="4mm" width="80mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
												
	  											<fo:table-row>
													<fo:table-cell height="4mm" width="8mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
														</fo:block>
													</fo:table-cell>
													<fo:table-cell height="4mm" width="80mm">
														<fo:table height="4mm" width="80mm">
															<fo:table-column column-width="80mm"/>
															<fo:table-body>
				  												<fo:table-row>
																	<fo:table-cell height="4mm" width="80mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
																		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
																		</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>	<!-- Template "palautusrahtikirja" loppu -->
	
	
	<!-- Tahan tulee tempeleitit jotka hakevat oikean tiedon aina kuin pyynto tulee -->
	
	
	<!-- Tama templeitti hakee vastaanottajan tiedot -->
	<xsl:template match="vastaanottaja">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold" padding-before="1mm">
			<xsl:value-of select="nimi"/>		<!-- Hakee vastaanottajan nimen xml dokumentista -->
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="osoite1"/>	<!-- Hakee vastaanottajan lahiosoitteen xml dokumentista -->
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="osoite2"/>	<!-- Hakee vastaanottajan postitoimipaikan xml dokumentista -->
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="osoite3"/>	<!-- Hakee vastaanottajan postinumeron xml dokumentista -->
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="osoite4"/>	<!-- Hakee vastaanottajan maakoodin xml dokumentista -->
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="vastaanottajakoodi"/>
		</fo:block>
	</xsl:template>
	
	
	<xsl:template match="lahetyksen_tiedot/idan_vak">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold" font-style="normal">
			Tariffin liitteen n:o 8 tavara,
			<xsl:value-of select="."/>.
		</fo:block>
	</xsl:template>
	
	<xsl:template match="lahetyksen_tiedot/lipukenro">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold" font-style="normal">
			Lipuke n:o 
			<xsl:value-of select="."/>.
		</fo:block>
	</xsl:template>
		
	<xsl:template match="lahetyksen_tiedot/vaarallisuustieto/leimahduspiste">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold" font-style="normal">
			leimahduspiste
			<xsl:value-of select="."/>. <!-- samasta paikasta kuin idan_vak loytyy elementti lipukenro -->
		</fo:block>
	</xsl:template>
	
	
	
	<!-- Templatea "lahetyksen_tiedot" kutsutaan jos kyseessa on itainen vientirahtikirja.
		Template kutsuu myos muita templateja. Mikali vaunuja on yli 3 niiden tiedot tulostuu tanne. -->
		
	<xsl:template match="lahetyksen_tiedot">
		<fo:table-row>
			<fo:table-cell height="60mm" width="25mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="merkit_ja_numerot"/>
				</fo:block>
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="13mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="kollilukumaara"/>
				</fo:block>
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="16mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="paallys"/>
				</fo:block>
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="54mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[1]/nimi"/>
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[2]/nimi"/>
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[3]/nimi"/>
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[4]/nimi"/>
				</fo:block>
 				<xsl:apply-templates select="tavara[5]/nimi"/>	<!-- Tulostaa tekstin "Muut tavarat: tarkka erittely kauppalaskussa." erillisesta templeitista -->
 				<xsl:apply-templates select="../vaunu[4]/vaununro"/>	<!-- Tahan tulee 4. vaunun vaununro. Hakee tiedon erillisesta templeitista. -->
 				<xsl:apply-templates select="../vaunu[5]/vaununro"/>	<!-- Tahan tulee 5. vaunun vaununro. Hakee tiedon erillisesta templeitista. -->
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="16mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[1]/koodi"/>	<!-- Hakee koodin tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[2]/koodi"/>	<!-- Hakee koodin tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[3]/koodi"/>	<!-- Hakee koodin tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[4]/koodi"/>	<!-- Hakee koodin tiedon xml dokumentista -->
				</fo:block>
				<xsl:apply-templates select="../vaunu[4]/kantavuus"/>
				<xsl:apply-templates select="../vaunu[5]/kantavuus"/>
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="15mm" padding-before="1mm" padding-start="0.4mm"
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tilavuus"/>	<!-- Hakee tilavuus tiedon xml dokumentista -->
				</fo:block>
				<xsl:apply-templates select="../vaunu[4]/akseliluku"/>
				<xsl:apply-templates select="../vaunu[5]/akseliluku"/>
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="24mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[1]/paino"/>	<!-- Hakee paino 1. tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[2]/paino"/>	<!-- Hakee paino 2. tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[3]/paino"/>	<!-- Hakee paino 3. tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[4]/paino"/>	<!-- Hakee paino 4. tiedon xml dokumentista -->
				</fo:block>
				<xsl:apply-templates select="../vaunu[4]/taarapaino"/>
				<xsl:apply-templates select="../vaunu[5]/taarapaino"/>
			</fo:table-cell>
			
			<fo:table-cell height="60mm" width="21mm" padding="1mm" 
					border-after-width="1pt" border-start-width="1pt" border-end-width="1pt" 
					border-after-color="green" border-start-color="green" border-end-color="green" 
					border-after-style="solid" border-start-style="solid" border-end-style="solid" >
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[1]/todettu_paino"/>	<!-- Hakee paino 1. tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[2]/todettu_paino"/>	<!-- Hakee paino 2. tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[3]/todettu_paino"/>	<!-- Hakee paino 3. tiedon xml dokumentista -->
				</fo:block>
				<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
					<xsl:value-of select="tavara[4]/todettu_paino"/>	<!-- Hakee paino 4. tiedon xml dokumentista -->
				</fo:block>
			</fo:table-cell>
		</fo:table-row>
	</xsl:template>	<!-- Tahan loppui template lahetyksen_tiedot-->
	
	
	<!-- Tama templeitti tulostaa tekstin "tarkka erittely kauppalaskussa."
		jos lahetyksen tiedot esiintyy xml dokumentissa useimmin kuin 4 kertaa -->
	
	<xsl:template match="lahetyksen_tiedot/tavara[5]/nimi">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			Muut tavarat: tarkka erittely kauppalaskussa.
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti tulostaa tekstin "************************************"
		jos lahetyksen tiedot esiintyy xml dokumentissa useimmin kuin 4 kertaa -->
	
	<xsl:template match="lahetyksen_tiedot/tavara[5]/koodi">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			*******
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			*******
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti tulostaa tahdet ja tekstin "28 No", seka hakee vaununnro 4. tiedot. -->
	<xsl:template match="vaunu[4]/vaununro">
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			******************************************************
		</fo:block>
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			28 No
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti hakee vaununnro 5 tiedot. -->
	<xsl:template match="vaunu[5]/vaununro">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti tulostaa tahdet ja tekstin "29 t T", seka hakee kantavuus 4. tiedot. -->
	<xsl:template match="vaunu[4]/kantavuus">
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			***************
		</fo:block>
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			29 t
			<fo:inline font-family="Helvetica" font-size="5pt" font-weight="bold">
				T
			</fo:inline>
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti hakee kantavuus 5. tiedot. -->
	<xsl:template match="vaunu[5]/kantavuus">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti tulostaa tahdet ja tekstin "30", seka hakee akseliluku 4. tiedot. -->
	<xsl:template match="vaunu[4]/akseliluku">
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			***************
		</fo:block>
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			30
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti hakee akseliluku 5. tiedot. -->
	<xsl:template match="vaunu[5]/akseliluku">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti tulostaa tahdet ja tekstin "30", seka hakee akseliluku 4. tiedot. -->
	<xsl:template match="vaunu[4]/taarapaino">
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			***********************
		</fo:block>
		<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
			31 t
			<fo:inline font-family="Helvetica" font-size="5pt" font-weight="bold">
				T
			</fo:inline>
		</fo:block>
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<!-- Tama templeitti hakee akseliluku 5. tiedot. -->
	<xsl:template match="vaunu[5]/taarapaino">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<xsl:template match="rahdin_maksaja">
		<fo:table height="13mm" width="73mm">
			<fo:table-column column-width="50mm"/>
			<fo:table-column column-width="23mm"/>
			<fo:table-body>
			  	<fo:table-row>
					<fo:table-cell height="13mm" width="25mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
						VR:n osuudella
						</fo:block>
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
							<xsl:value-of select="maksajan_nimi"/>	<!-- Hakee maksajan_nimi tiedon xml dokumentista -->
						</fo:block>
					</fo:table-cell>
					<fo:table-cell height="13mm" width="10mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							Asiakas
						</fo:block>
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
							<xsl:value-of select="ovttunnus"/>	<!-- Hakee ovttunnus tiedon xml dokumentista -->
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		<fo:table height="13mm" width="73mm">
			<fo:table-column column-width="73mm"/>
			<fo:table-body>
			  	<fo:table-row>
					<fo:table-cell height="13mm" width="73mm" border-width="1pt" border-color="green" border-style="solid" padding="1mm">
						<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
							21 ven&#228;j&#228;n rautateiden osuudella
						</fo:block>
						<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
							<xsl:value-of select="venalaisen_rahdin_maksaja"/>	<!-- Hakee venalaisen_rahdin_maksaja tiedon xml dokumentista -->
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	
	
	<xsl:template match="maksaja_huom">
		<fo:block font-family="Courier" font-size="10pt" font-weight="bold" font-style="normal">
			<xsl:value-of select="."/>
		</fo:block>
	</xsl:template>
	
	
	<xsl:template match="lahetyksen_tiedot/lahetyksen_laji">
		<fo:table height="13mm" width="44mm">
			<fo:table-column column-width="44mm"/>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell height="13mm" width="44mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="5mm" width="44mm">
							<fo:table-column column-width="44mm"/>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell height="5mm" width="44mm" padding-before="1mm" padding-start="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											22 L&#228;hetyksen laji
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:table height="8mm" width="44mm">
							<fo:table-column column-width="2mm"/>
							<fo:table-column column-width="4mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-column column-width="1mm"/>
							<fo:table-column column-width="4mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell height="3mm" width="2mm">
										<fo:table height="3mm" width="2mm">
											<fo:table-column column-width="2mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="2mm" padding-before="1mm" padding-start="1mm">
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="4mm">
										<fo:table height="3mm" width="4mm">
											<fo:table-column column-width="4mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="4mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<xsl:choose>
															<xsl:when test=".='KAPPALETAVARA'">
																<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																	X
														 		</fo:block>
															</xsl:when>
														</xsl:choose>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="14mm">
										<fo:table height="3mm" width="14mm">
											<fo:table-column column-width="14mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="14mm" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															Kpl-tavara
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="1mm">
										<fo:table height="3mm" width="1mm">
											<fo:table-column column-width="1mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="1mm" padding-before="1mm" padding-start="1mm">
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="4mm">
										<fo:table height="3mm" width="4mm">
											<fo:table-column column-width="4mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="4mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<xsl:choose>
															<xsl:when test=".='VAUNUKUORMA'">
																<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																	X
																</fo:block>
															</xsl:when>
														</xsl:choose>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="14mm">
										<fo:table height="3mm" width="14mm">
											<fo:table-column column-width="14mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="14mm" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															Vaunukuorma
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	
	
	<xsl:template match="lahetyksen_tiedot/kuormaaja">
		<fo:table height="13mm" width="44mm">
			<fo:table-column column-width="44mm"/>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell height="13mm" width="44mm" border-width="1pt" border-color="green" border-style="solid">
						<fo:table height="5mm" width="44mm">
							<fo:table-column column-width="44mm"/>
							<fo:table-body>
						  		<fo:table-row>
									<fo:table-cell height="5mm" width="44mm" padding-before="1mm" padding-start="1mm">
										<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
											23 Kuormaaja
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:table height="8mm" width="44mm">
							<fo:table-column column-width="2mm"/>
							<fo:table-column column-width="4mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-column column-width="1mm"/>
							<fo:table-column column-width="4mm"/>
							<fo:table-column column-width="14mm"/>
							<fo:table-body>
						  		<fo:table-row>
									<fo:table-cell height="3mm" width="2mm">
										<fo:table height="3mm" width="2mm">
											<fo:table-column column-width="2mm"/>
											<fo:table-body>
						  						<fo:table-row>
													<fo:table-cell height="3mm" width="2mm" padding-before="1mm" padding-start="1mm">
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="4mm">
										<fo:table height="3mm" width="4mm">
											<fo:table-column column-width="4mm"/>
											<fo:table-body>
						  						<fo:table-row>
													<fo:table-cell height="3mm" width="4mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<xsl:choose>
															<xsl:when test=".='L&#x00c4;HETT&#x00c4;J&#x00c4;'"> <!-- LAHETTAJA skandeilla -->
																<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																	X
														 		</fo:block>
															</xsl:when>
														</xsl:choose>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="14mm">
										<fo:table height="3mm" width="14mm">
											<fo:table-column column-width="14mm"/>
											<fo:table-body>
						  						<fo:table-row>
													<fo:table-cell height="3mm" width="14mm" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															L&#228;hettaja
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="1mm">
										<fo:table height="3mm" width="1mm">
											<fo:table-column column-width="1mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="1mm" padding-before="1mm" padding-start="1mm">
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="4mm">
										<fo:table height="3mm" width="4mm">
											<fo:table-column column-width="4mm"/>
											<fo:table-body>
												<fo:table-row>
													<fo:table-cell height="3mm" width="4mm" border-width="1pt" border-color="green" border-style="solid" padding-before="1mm" padding-start="1mm">
														<xsl:choose>
															<xsl:when test=".='RAUTATIE'">
																<fo:block font-family="Courier" font-size="10pt" font-weight="bold">
																	X
														 		</fo:block>
															</xsl:when>
														</xsl:choose>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
									<fo:table-cell height="3mm" width="14mm">
										<fo:table height="3mm" width="14mm">
											<fo:table-column column-width="14mm"/>
											<fo:table-body>
	 											<fo:table-row>
													<fo:table-cell height="3mm" width="14mm" padding-before="1mm" padding-start="1mm">
														<fo:block font-family="Helvetica" font-size="7pt" font-weight="bold">
															Rautatie
														</fo:block>
													</fo:table-cell>
												</fo:table-row>
											</fo:table-body>
										</fo:table>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	
</xsl:stylesheet>
