<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

	<xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>

	<xsl:template match="maquina">
		<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
			<fo:layout-master-set>
				<fo:simple-page-master master-name="master1"
				                       page-height="29.7cm"
				                       page-width="21cm"
				                       margin-top="1cm"
				                       margin-bottom="2cm"
				                       margin-left="2.5cm"
				                       margin-right="2.5cm">
					<fo:region-body/>
				</fo:simple-page-master>
			</fo:layout-master-set>

			<fo:page-sequence master-reference="master1">
				<fo:flow flow-name="xsl-region-body">
					<fo:block font-size="20pt" font-family="serif" text-align="center">
						<xsl:value-of select="nombre"/>
					</fo:block>

					<fo:block font-size="11pt" font-family="serif" space-before="20pt">
						<xsl:value-of select="descripcion"/>
					</fo:block>

					<xsl:apply-templates select="caracteristicas"/>

					<xsl:apply-templates select="imagen"/>

					<fo:block font-size="10pt" font-family="serif" space-before="30pt">
						(c) 2005 Avelino Herrera Morales
					</fo:block>
				</fo:flow>
			</fo:page-sequence>
		</fo:root>
	</xsl:template>

	<xsl:template match="caracteristicas">
		<fo:block font-size="11pt" font-family="serif" space-before="12pt">
			Características:
			<xsl:for-each select="caracteristica">
				<fo:block text-indent="2pc" font-size="10pt" font-family="serif">
					- <xsl:value-of select="."/>
				</fo:block>
			</xsl:for-each>
		</fo:block>
	</xsl:template>

	<xsl:template match="imagen">
		<fo:block text-align="center" space-before="15pt">
			<fo:external-graphic src="{@fichero}"/>
		</fo:block>
	</xsl:template>

</xsl:stylesheet>
