|
|
|
<?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:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," />
|
|
|
|
<xsl:template match="/">
|
|
|
|
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
|
|
|
<fo:layout-master-set>
|
|
|
|
<fo:simple-page-master master-name="first"
|
|
|
|
page-height="210mm" page-width="297mm"
|
|
|
|
margin-top="10mm" margin-bottom="10mm"
|
|
|
|
margin-left="8mm" margin-right="8mm">
|
|
|
|
|
|
|
|
<fo:region-body
|
|
|
|
margin-top="0mm" margin-bottom="20mm"
|
|
|
|
margin-left="0mm" margin-right="0mm"/>
|
|
|
|
<fo:region-before extent="10mm"/>
|
|
|
|
<fo:region-after extent="10mm"/>
|
|
|
|
</fo:simple-page-master>
|
|
|
|
<fo:simple-page-master master-name="rest"
|
|
|
|
page-height="210mm" page-width="297mm"
|
|
|
|
margin-top="10mm" margin-bottom="10mm"
|
|
|
|
margin-left="8mm" margin-right="8mm">
|
|
|
|
|
|
|
|
<fo:region-body
|
|
|
|
margin-top="0mm" margin-bottom="20mm"
|
|
|
|
margin-left="0mm" margin-right="0mm"/>
|
|
|
|
<fo:region-before extent="10mm"/>
|
|
|
|
<fo:region-after extent="10mm"/>
|
|
|
|
</fo:simple-page-master>
|
|
|
|
<!--
|
|
|
|
<fo:simple-page-master master-name="sequence"
|
|
|
|
page-height="200mm" page-width="300mm"
|
|
|
|
margin-top="10mm" margin-bottom="10mm"
|
|
|
|
margin-left="8mm" margin-right="8mm">
|
|
|
|
<fo:repeatable-page-master-alternatives>
|
|
|
|
|
|
|
|
|
|
|
|
<fo:region-body
|
|
|
|
margin-top="0mm" margin-bottom="10mm"
|
|
|
|
margin-left="0mm" margin-right="0mm"/>
|
|
|
|
|
|
|
|
<fo:region-after extent="10mm"/>
|
|
|
|
</fo:repeatable-page-master-alternatives>
|
|
|
|
</fo:simple-page-master>-->
|
|
|
|
<fo:page-sequence-master master-name="sequence">
|
|
|
|
<fo:repeatable-page-master-alternatives>
|
|
|
|
<fo:conditional-page-master-reference master-reference="first"
|
|
|
|
/>
|
|
|
|
<fo:conditional-page-master-reference master-reference="rest"
|
|
|
|
page-position="rest" />
|
|
|
|
</fo:repeatable-page-master-alternatives>
|
|
|
|
</fo:page-sequence-master>
|
|
|
|
</fo:layout-master-set>
|
|
|
|
<fo:page-sequence master-name="sequence" master-reference="sequence">
|
|
|
|
<fo:static-content flow-name="xsl-region-after">
|
|
|
|
<fo:block text-align="center" font-size="12pt">Seite <fo:page-number />
|
|
|
|
</fo:block>
|
|
|
|
</fo:static-content>
|
|
|
|
<fo:flow flow-name="xsl-region-body">
|
|
|
|
|
|
|
|
<fo:block font-family="Times, serif" line-height="20pt" font-size="20pt" font-weight="bolder" color="rgb(0,0,255)" margin-bottom="20mm" text-align="end">
|
|
|
|
<!-- dq bei jfor ist das akt. Verzeichnis tomcat/bin/ -->
|
|
|
|
<!--leider klappt jpeg-encoding nicht bei headless-Betrieb dq
|
|
|
|
<fo:external-graphic src="../webapps/superx/images/logo.gif" />-->
|
|
|
|
SuperX</fo:block>
|
|
|
|
<xsl:if test="/ergebnisse/makro/@id !=''">
|
|
|
|
<fo:block font-family="sans-serif" line-height="20pt" font-size="20pt" font-weight="bolder" margin-bottom="20mm">
|
|
|
|
<xsl:value-of select="/ergebnisse/makro/name" />
|
|
|
|
</fo:block>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@typ='image'">
|
|
|
|
<!-- klappt noch nciht<img>
|
|
|
|
<xsl:attribute name="src"><xsl:value-of select="@url" /></xsl:attribute>
|
|
|
|
</img>
|
|
|
|
<hr/>-->
|
|
|
|
<xsl:text>
|
|
|
|
|
|
|
|
</xsl:text>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="@typ='tabelle'">
|
|
|
|
<fo:block font-family="sans-serif" line-height="48pt" font-size="20pt" font-weight="bold" color="rgb(0,0,255)" space-after="10mm">
|
|
|
|
<xsl:value-of select="../maskenname" /></fo:block>
|
|
|
|
<xsl:call-template name="legende_fo" />
|
|
|
|
|
|
|
|
<xsl:if test="errmsg !=''">
|
|
|
|
<fo:block font-family="sans-serif" line-height="20pt" font-size="20pt">
|
|
|
|
<xsl:copy-of select="errmsg" /></fo:block></xsl:if>
|
|
|
|
|
|
|
|
<fo:table border="solid" border-collapse="collapse" table-layout="fixed"><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<xsl:for-each select="sqlerg/headers/header"><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<fo:table-column>
|
|
|
|
<xsl:attribute name="column-width">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="@width != ''" >
|
|
|
|
<!--FOP versteht em nicht, daher Umrechnung in px -->
|
|
|
|
<xsl:variable name="spbreite"><xsl:value-of select="@width * 140" />
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:value-of select="$spbreite" />
|
|
|
|
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="'auto'" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="column-number">
|
|
|
|
<xsl:value-of select="@id" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</fo:table-column>
|
|
|
|
</xsl:for-each>
|
|
|
|
<fo:table-body>
|
|
|
|
<fo:table-row>
|
|
|
|
<xsl:for-each select="sqlerg/headers/header">
|
|
|
|
<xsl:call-template name="foheader">
|
|
|
|
<xsl:with-param name="derwert" select="wert" />
|
|
|
|
</xsl:call-template>
|
|
|
|
|
|
|
|
</xsl:for-each>
|
|
|
|
</fo:table-row>
|
|
|
|
<xsl:for-each select="sqlerg/row">
|
|
|
|
<fo:table-row><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<xsl:for-each select="col">
|
|
|
|
<xsl:call-template name="spalte" /><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
</xsl:for-each>
|
|
|
|
</fo:table-row><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
</xsl:for-each>
|
|
|
|
</fo:table-body>
|
|
|
|
</fo:table>
|
|
|
|
</xsl:when>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:for-each>
|
|
|
|
</fo:flow>
|
|
|
|
</fo:page-sequence>
|
|
|
|
</fo:root>
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template name="spalte">
|
|
|
|
<fo:table-cell border-width="0.5mm" border-style="solid" padding-left="1mm">
|
|
|
|
<xsl:if test="starts-with(f_name,'next') = false">
|
|
|
|
|
|
|
|
<fo:block font-size="10pt" font-family="serif" line-height="13pt" space-before.optimum="12pt" space-after.optimum="8pt" text-align="start">
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
|
|
|
|
<xsl:when test="@typ='2' or @typ='8' or @typ='3'"> <!-- DecimalFormat -->
|
|
|
|
<xsl:attribute name="text-align">end</xsl:attribute>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:value-of select="format-number(wert,'###.###.###.###.##0,00','German')" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="@typ='4'"> <!-- Integer -->
|
|
|
|
<xsl:attribute name="text-align">end</xsl:attribute>
|
|
|
|
<!--<xsl:attribute name="class">integer</xsl:attribute>-->
|
|
|
|
<!--<xsl:value-of select="wert" />-->
|
|
|
|
<xsl:value-of select="format-number(wert,'###.###.###.###.###','German')" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<!--Typ=1 ist string und wird defaultmäßig behandelt -->
|
|
|
|
<xsl:attribute name="text-align">start</xsl:attribute>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="f_name='email'">
|
|
|
|
|
|
|
|
<xsl:value-of select="wert" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="f_name='url'">
|
|
|
|
<!--<a target="_blank"><xsl:attribute name="href"><xsl:value-of select="wert" /></xsl:attribute>-->
|
|
|
|
<xsl:value-of select="wert" /><!--</a>-->
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="f_name='nextmask'">
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:when test="f_name='nexttable'">
|
|
|
|
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="wert" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
|
|
|
|
|
|
|
|
</fo:block>
|
|
|
|
</xsl:if>
|
|
|
|
</fo:table-cell><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="legende_fo">
|
|
|
|
<fo:block font-family="sans-serif" line-height="20pt" font-size="14pt" border-width="0.5mm" border-style="solid" border-color="gray" space-after="10mm">
|
|
|
|
<xsl:for-each select="../felder/feld">
|
|
|
|
<xsl:if test="value !='' 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">
|
|
|
|
<xsl:if test="string-length(value_caption) < 50">
|
|
|
|
<![CDATA[]]><xsl:value-of select="value_caption" /><![CDATA[]]>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="string-length(value_caption) > 49">
|
|
|
|
<![CDATA[]]><xsl:value-of select="substring(value_caption,0,50)" />...<![CDATA[]]>
|
|
|
|
</xsl:if>
|
|
|
|
; </fo:inline>
|
|
|
|
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
</xsl:for-each>
|
|
|
|
Stand: <xsl:value-of select="../stand" />
|
|
|
|
</fo:block>
|
|
|
|
<!--
|
|
|
|
<xsl:for-each select="/ergebnis/felder/msgs/msg">
|
|
|
|
<xsl:if test="wert !=''">
|
|
|
|
<fo:block space-after="10mm" font-family="sans-serif" line-height="16pt" font-size="14pt">
|
|
|
|
<xsl:value-of select="wert" />
|
|
|
|
</fo:block>
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>-->
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template name="foheader">
|
|
|
|
<xsl:param name="derwert" />
|
|
|
|
<fo:table-cell border-width="0.5mm" padding-left="4mm" border-style="solid"><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<fo:block font-size="10pt"
|
|
|
|
font-weight="bold">
|
|
|
|
<xsl:variable name="header1">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="(contains(string($derwert),'\n'))">
|
|
|
|
<xsl:value-of select="substring-before($derwert,'\n') "/>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<xsl:value-of select="substring-after($derwert,'\n') "/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$derwert" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="header2">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="(contains(string($header1),'\n'))">
|
|
|
|
<xsl:value-of select="substring-before($header1,'\n') "/>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<xsl:value-of select="substring-after($header1,'\n') "/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="$header1" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="(contains(string($header2),'\000'))">
|
|
|
|
<xsl:value-of select="substring-before($header2,'\000') "/>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
<xsl:value-of select="substring-after($header2,'\000') "/>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:copy-of select="$header2" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
</fo:block>
|
|
|
|
</fo:table-cell><xsl:text>
|
|
|
|
</xsl:text>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|
|
|
|
|