Format A4
<?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:output method="xml" indent="yes"/> <xsl:template match="objects"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="label" page-height="29.7cm" page-width="21cm" margin-left="1cm" margin-top="5cm" margin-bottom="1cm" margin-right="1cm"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="label"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:apply-templates select="object" /> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="object"> <fo:table table-layout="fixed" border-collapse="collapse" border-style="none" width="19cm" keep-together.within-page="always"> <fo:table-column column-width="19cm"/> <fo:table-body border-style="none" > <fo:table-row> <fo:table-cell min-height="7cm"> <fo:block text-align="center"><fo:inline font-weight="bold" font-size="36"><xsl:value-of select="id"/></fo:inline></fo:block> <fo:block text-align="center"><fo:inline font-weight="bold" font-size="18">(<xsl:value-of select="db"/>:<xsl:value-of select="uid"/>)</fo:inline></fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block text-align="center"> <fo:external-graphic> <xsl:attribute name="src"> <xsl:value-of select="concat(uid,'.png')" /> </xsl:attribute> <xsl:attribute name="content-height">scale-to-fit</xsl:attribute> <xsl:attribute name="height">10cm</xsl:attribute> <xsl:attribute name="content-width">10cm</xsl:attribute> <xsl:attribute name="scaling">uniform</xsl:attribute> </fo:external-graphic> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <fo:block page-break-after="always"/> </xsl:template> </xsl:stylesheet>