<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:import href="pageComponents_html.xsl" /> <!--In diesem Stylesheet können Sie individuelle templates unterbringen, die in ihrer Präzedenz das normale Stylesheet pageComponents_html.xsl überragt. --> <xsl:import href="pageComponents_html_final.xsl" /> <xsl:import href="resultset_html.xsl" /> <xsl:import href="tabelle_fo_pdf.xsl" /> <xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," /> <!--Wenn Sie ein eigenes PDF-Stylesheet erstellen, sollten Sie die u. aufgeführte Routine zur Berechnung der Spaltenbreite übernehmen Wenn Sie nur das Seitenlayout ändern wollen, z.B. auf A4, dann reicht es, hier die Variablen seitenbreite_mm, die druckbreite_mm und das Attribut page-height anzupassen. --> <xsl:variable name="seitenbreite_mm">208</xsl:variable> <!--Die Breite der Tabelle in mm bei A4 Querformat:--> <xsl:variable name="druckbreite_mm">180</xsl:variable> <!-- Wenn keine Spaltenbreite definiert ist, wird 12 (Einheit Applet-Breite) verwendet. --> <xsl:variable name="std_spaltenbreite">12</xsl:variable> <xsl:template match="/"> <xsl:call-template name="pdfpages"/> </xsl:template> <xsl:template name="pdfergebnis"> <xsl:call-template name="pdftabletitle"/> <!--TODO warum wird width nicht übernommen??--> <xsl:call-template name="pdftable"><xsl:with-param name="width">50%</xsl:with-param></xsl:call-template> </xsl:template> <xsl:template name="pdfaftertable"> <xsl:call-template name="legende_fo" /> </xsl:template> <xsl:template name="pdftablerows"> <xsl:param name="erglevelmax"/> <xsl:for-each-group select="sqlerg/row" group-by="col[f_name='hiddengrouping']/wert"> <xsl:if test="current-grouping-key()!=''"> <!-- Ausser beim ersten Groupingnamen eine Leerzeile einfuegen --> <xsl:variable name="pos"><xsl:number/></xsl:variable> <fo:table-row><fo:table-cell border-width="0.1mm" border-style="solid" padding-left="0.5mm" padding-right="0.5mm"> <fo:block font-size="10pt" font-weight="bold" font-family="serif" language="en" hyphenate="true"> <xsl:choose> <xsl:when test="$pos=1"> </xsl:when> <xsl:otherwise> <xsl:attribute name="space-before">12pt</xsl:attribute> <xsl:attribute name="line-height">16pt</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select="current-grouping-key()"/></fo:block></fo:table-cell> <fo:table-cell border-width="0.1mm" border-style="solid" padding-left="0.5mm" padding-right="0.5mm"> <fo:block font-size="10pt" font-family="serif" language="en" hyphenate="true"> <xsl:choose> <xsl:when test="$pos=1"> </xsl:when> <xsl:otherwise> <xsl:attribute name="space-before">12pt</xsl:attribute> <xsl:attribute name="line-height">16pt</xsl:attribute> </xsl:otherwise> </xsl:choose> </fo:block></fo:table-cell></fo:table-row> <xsl:for-each select="../row[col[f_name='hiddengrouping']/wert=current-grouping-key() and col[f_name='hiddenlinkmenusub']/wert='']"> <xsl:call-template name="pdfsinglerow"><xsl:with-param name="erglevelmax">$erglevelmax</xsl:with-param></xsl:call-template> </xsl:for-each> </xsl:if> </xsl:for-each-group> </xsl:template> <xsl:template name="pdfcolumnwidths"> <fo:table-column> <xsl:attribute name="column-width">auto</xsl:attribute> </fo:table-column> <fo:table-column> <xsl:attribute name="column-width">2cm</xsl:attribute> </fo:table-column> </xsl:template> <xsl:template name="legende_fo"> <fo:block font-family="sans-serif" space-before="30pt" line-height="16pt" font-size="10pt" border-width="0.5mm" border-style="none" border-color="gray"> <xsl:for-each select="/ergebnisse/ergebnis/felder/feld"> <xsl:if test="(value !='' or sicht/@isFirstInGroup='false' or @isstandtoday='false') and @varname != 'sort' and @varname != 'maxoffset'"> <fo:inline> <xsl:choose> <xsl:when test="string-length(caption_short) > 0 and caption_short != 'null'" > <![CDATA[]]><xsl:value-of select="caption_short" /><![CDATA[]]> </xsl:when> <xsl:otherwise> <xsl:value-of select="@varname" /> </xsl:otherwise> </xsl:choose></fo:inline><fo:inline>: </fo:inline> <fo:inline font-style="italic" font-weight="bold"> <![CDATA[]]><xsl:value-of select="value_caption" /><![CDATA[]]> <xsl:if test="sicht!=''"> <![CDATA[]]><xsl:text> (</xsl:text><xsl:value-of select="sicht" /> <xsl:if test="@stand!=''"><xsl:text> - Stand:</xsl:text><xsl:value-of select="@stand"/></xsl:if> <xsl:text>)</xsl:text><![CDATA[]]> </xsl:if> ; </fo:inline> </xsl:if> </xsl:for-each> <xsl:text>User: </xsl:text><xsl:value-of select="/ergebnisse/user" /> <xsl:text>; Stand: </xsl:text><xsl:value-of select="/ergebnisse/ergebnis/stand" /> </fo:block> </xsl:template> <xsl:template name="pdflogo"> <fo:block text-align="center"> <fo:external-graphic> <xsl:choose> <xsl:when test="/ergebnisse/generalinfo/REPORT_LOGO_FILE!=''"> <xsl:attribute name="src"><xsl:value-of select="/ergebnisse/generalinfo/REPORT_LOGO_FILE"/></xsl:attribute> </xsl:when> <xsl:otherwise> <!-- <xsl:attribute name="src"><xsl:call-template name="logo_path"></xsl:call-template></xsl:attribute> --> </xsl:otherwise> </xsl:choose> </fo:external-graphic></fo:block> </xsl:template> </xsl:stylesheet>