You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
180 lines
5.8 KiB
180 lines
5.8 KiB
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
<xsl:stylesheet version="1.0" xmlns:sx="http://memtext.de" |
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
<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" /> |
|
<xml:output method="html" /> |
|
<xsl:variable name="webapp-url" select="'../'" /> |
|
|
|
<!--For Download-and Print Versions, use an absolute path:, e.g. <xsl:variable name="webapp-url" select="'http://miles:8080/superx/'" />--> |
|
<xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," /> |
|
<xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" |
|
doctype-system="DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes" encoding="UTF-8"/> |
|
<xsl:template match="/"> |
|
<html> |
|
|
|
<xsl:call-template name="head" ><xsl:with-param name="title" select="concat('Ergebnis ',/ergebnisse/ergebnis[ position()=1]/maskenname)" /></xsl:call-template> |
|
|
|
|
|
<xsl:if test="/ergebnisse/@isMakro!='true'"> |
|
|
|
</xsl:if> |
|
<style type="text/css"> |
|
@media print{ |
|
.dontprint{display:none;} |
|
} |
|
img.dontprint_svg_icon {height:16px;} |
|
</style> |
|
<body> |
|
<xsl:call-template name="customheader"/> |
|
<xsl:call-template name="header_p"/> |
|
|
|
<xsl:choose> |
|
<xsl:when test="/ergebnisse/makro/@id !=''"> |
|
<h1><xsl:value-of select="/ergebnisse/makro/name" /></h1> |
|
<p><input type="hidden" name="tid"> |
|
<xsl:attribute name="value"><xsl:value-of select="/ergebnisse/makro/@id" /></xsl:attribute> |
|
</input> |
|
</p></xsl:when> |
|
<xsl:otherwise> |
|
<p><input type="hidden" name="tid"> |
|
<xsl:attribute name="value"><xsl:value-of select="/ergebnisse/ergebnis/maskenname/@id" /></xsl:attribute> |
|
</input></p> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
|
|
|
|
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement"> |
|
<xsl:choose> |
|
<xsl:when test="@typ='image'"> |
|
<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'"> |
|
|
|
<p class="maskentitel"><xsl:value-of select="../maskenname" /></p> |
|
<!-- MB legende bei jeder Tabelle --> |
|
<xsl:call-template name="legende" /> |
|
<div> |
|
<table id="table1" class="ergtabelle"> |
|
<thead> |
|
<!--Spaltenüberschriften: zunächst wird geprüft, ob Spaltenüberschriften verknüpft werden sollen --> |
|
|
|
<xsl:variable name="headers_str"> |
|
<xsl:for-each select="sqlerg/headers/header[starts-with(f_name,'hidden')=false and starts-with(f_name,'next')=false]"> |
|
<xsl:value-of select="concat('^',wert)" /> |
|
</xsl:for-each> |
|
</xsl:variable> |
|
<!--Zurückgegeben werden html-<tr>-Tags --> |
|
|
|
<xsl:value-of select="sx:headers2html($headers_str)" disable-output-escaping="yes"/> |
|
|
|
</thead> |
|
<tbody> |
|
<xsl:variable name="erglevelmax"> |
|
<xsl:if test="count(sqlerg/row/col [ f_name = 'ebene' ]) > 0"> |
|
<xsl:choose> |
|
<xsl:when test="count(sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '4']) > 0"> |
|
<xsl:text>4</xsl:text> |
|
</xsl:when> |
|
<xsl:when test="count(sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '3']) > 0"> |
|
<xsl:text>3</xsl:text> |
|
</xsl:when> |
|
<xsl:when test="count(sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '2']) > 0"> |
|
<xsl:text>2</xsl:text> |
|
</xsl:when> |
|
<xsl:when test="count(sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '1']) > 0"> |
|
<xsl:text>1</xsl:text> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:text>5</xsl:text> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:if> |
|
</xsl:variable> |
|
<xsl:for-each select="sqlerg/row"> |
|
<xsl:call-template name="displayrow"> |
|
<xsl:with-param name="erglevelmax" select="$erglevelmax" /> |
|
</xsl:call-template> |
|
</xsl:for-each> |
|
</tbody> |
|
</table> |
|
</div> |
|
|
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:text> |
|
Nicht unterstützter Ergebnistyp </xsl:text><xsl:value-of select="@type" /> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
<p> |
|
<xsl:call-template name="datensatzzaehler" /> |
|
</p> |
|
</xsl:for-each> |
|
|
|
|
|
</body> |
|
</html> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template name="displayrow"> |
|
<xsl:param name="erglevelmax" /> |
|
<tr> |
|
<!-- wenn tr andere Attribute als class/id erhält kann es beim Nachladen von Tabellenzeilen im IE Probleme geben--> |
|
<xsl:choose> |
|
<xsl:when test="col/f_name = 'ebene'"> |
|
<!-- DQ 9.12.07 --> |
|
<xsl:choose> |
|
<xsl:when test="$erglevelmax != 5"> |
|
<xsl:attribute name="class"><xsl:value-of select="concat('erglevel',$erglevelmax,'_',col[ f_name = 'ebene' ] /wert)" /></xsl:attribute> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:attribute name="class"><xsl:text>erglevel_</xsl:text><xsl:value-of select="col[ f_name = 'ebene' ] /wert" /></xsl:attribute> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:when> |
|
<xsl:when test="@issumme='true'"> |
|
<xsl:attribute name="class"><xsl:text>issumme</xsl:text></xsl:attribute> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<!-- odd und even --> |
|
<xsl:choose> |
|
<xsl:when test="position() mod 2 = 1"> |
|
<xsl:attribute name="class"><xsl:text>listRowOdd</xsl:text></xsl:attribute> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:attribute name="class"><xsl:text>listRowEven</xsl:text></xsl:attribute> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
<xsl:for-each select="col[starts-with(f_name,'hidden')=false and starts-with(f_name,'next')=false]"> |
|
<xsl:variable name="tdClass"><xsl:call-template name="tdCssClassErgfeld"><xsl:with-param name="checkname"><xsl:value-of select="concat('hidden',f_name,'css')"/></xsl:with-param></xsl:call-template></xsl:variable> |
|
<xsl:call-template name="tablecell"><xsl:with-param name="showlinks"><xsl:value-of select="'false'"/></xsl:with-param> |
|
</xsl:call-template> |
|
|
|
</xsl:for-each> |
|
</tr> |
|
</xsl:template> |
|
<xsl:template name="tabwert"> |
|
<xsl:choose> |
|
<xsl:when test="wert/@type='numeric'"><xsl:value-of select="wert" /> |
|
<!--<xsl:value-of select="format-number(wert,'#.###.##0,00','de_DE')" />--> |
|
</xsl:when> |
|
<xsl:otherwise><xsl:value-of select="wert" /></xsl:otherwise> |
|
</xsl:choose> |
|
|
|
</xsl:template> |
|
|
|
</xsl:stylesheet>
|
|
|