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.
205 lines
5.8 KiB
205 lines
5.8 KiB
<?xml version="1.0" encoding="UTF-8" ?> |
|
<xsl:stylesheet version="1.0" |
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
<xsl:template name="legende"> |
|
<p class="legende"> |
|
<xsl:for-each select="/ergebnisse/ergebnis/felder/feld"> |
|
<xsl:if test="wert !=''"> |
|
|
|
<span class="feldname"><xsl:value-of select="wert/@varname" /></span>:  |
|
<xsl:if test="string-length(wert/caption) < 50"> |
|
<span class="feldwert"><xsl:value-of select="wert/caption" /></span> |
|
</xsl:if> |
|
<xsl:if test="string-length(wert/caption) > 49"> |
|
<span class="feldwert"><xsl:value-of select="substring(wert/caption,0,50)" />...</span> |
|
</xsl:if> |
|
; |
|
</xsl:if> |
|
</xsl:for-each> |
|
</p> |
|
|
|
<xsl:for-each select="/ergebnisse/ergebnis/felder/msgs/msg"> |
|
<xsl:if test="wert !=''"> |
|
<p class="errmsg"><xsl:value-of select="wert" /></p> |
|
</xsl:if> |
|
</xsl:for-each> |
|
|
|
</xsl:template> |
|
<xsl:template name="header"> |
|
<xsl:param name="derwert" /> |
|
<th class="header" scope="col"> |
|
<!--max. 2 Umbrüche pro Zelle --> |
|
<xsl:variable name="header1"> |
|
<xsl:choose> |
|
<xsl:when test="(contains(string($derwert),'\n'))"> |
|
<xsl:value-of select="substring-before($derwert,'\n') "/> |
|
<br /> |
|
<xsl:value-of select="substring-after($derwert,'\n') "/> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:copy-of select="$derwert" /> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:variable> |
|
<xsl:choose> |
|
<xsl:when test="(contains(string($header1),'\n'))"> |
|
<xsl:value-of select="substring-before($header1,'\n') "/> |
|
<br /> |
|
<xsl:value-of select="substring-after($header1,'\n') "/> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:copy-of select="$header1" /> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
|
|
</th> |
|
|
|
</xsl:template> |
|
<xsl:template name="navigationsfuss"> |
|
<p class="klein"><!--<xsl:value-of select="sqlerg/msg" /><br />--> |
|
<xsl:for-each select="felder/msgs/msg"> |
|
<xsl:value-of select="wert" /> |
|
<br /> |
|
</xsl:for-each> |
|
</p> |
|
<!-- In Makros keine Offset-Fkt. --> |
|
<xsl:if test="string-length(string(/ergebnisse/makro/@id)) = 0"> |
|
<p class="legende"> |
|
<input type="hidden" name="offset"> |
|
</input> |
|
<xsl:if test="(sqlerg/@offset > 0)"> |
|
<a> |
|
<xsl:attribute name="href">javascript:document.forms[0].target='_self'; document.forms[0].offset.value='<xsl:value-of select="((sqlerg/@offset) - (sqlerg/@maxOffset))" />'; document.forms[0].submit(); |
|
</xsl:attribute> |
|
Vorherige Seite</a> | |
|
</xsl:if> |
|
<xsl:call-template name="datensatzzaehler" /> |
|
<xsl:if test="(sqlerg/@offset + sqlerg/@maxOffset) < sqlerg/@max"> |
|
<a> |
|
<xsl:attribute name="href">javascript:document.forms[0].target='_self'; document.forms[0].offset.value='<xsl:value-of select="((sqlerg/@offset) + (sqlerg/@maxOffset))" />'; document.forms[0].submit(); |
|
</xsl:attribute> | Nächste Seite |
|
</a> |
|
</xsl:if> |
|
|
|
|
|
</p> |
|
</xsl:if> |
|
|
|
|
|
<xsl:if test="errmsg !=''"><p class="errmsg"><xsl:copy-of select="errmsg" /></p></xsl:if> |
|
</xsl:template> |
|
<xsl:template name="field_type"> |
|
|
|
<xsl:choose> |
|
<xsl:when test="@id='0'"> |
|
<xsl:attribute name="class">themenspalte</xsl:attribute> |
|
</xsl:when> |
|
|
|
<xsl:when test="@typ='3'"> <!-- DecimalFormat --> |
|
<xsl:attribute name="class">decimal</xsl:attribute> |
|
</xsl:when> |
|
<xsl:when test="@typ='4' or @typ='-5'"> <!-- Integer --> |
|
<xsl:attribute name="class">integer</xsl:attribute> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<!--Typ=1 ist string und wird defaultmäßig behandelt --> |
|
<xsl:attribute name="class">ergfeld</xsl:attribute> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
|
|
</xsl:template> |
|
<xsl:template name="field_value"> |
|
<!--<xsl:value-of select="@typ" />--> |
|
|
|
<xsl:choose> |
|
<xsl:when test="@id='0'"> |
|
<xsl:value-of select="wert" /> |
|
</xsl:when> |
|
|
|
<xsl:when test="@typ='3'"> <!-- DecimalFormat --> |
|
<xsl:value-of select="format-number(wert,'###.###.###.###.##0,00','German')" /> |
|
</xsl:when> |
|
<xsl:when test="@typ='4' or @typ='-5'"> <!-- Integer --> |
|
<xsl:value-of select="format-number(wert,'###.###.###.###.###','German')" /> |
|
</xsl:when> |
|
<xsl:when test="@typ='-7'"> <!-- Boolean --> |
|
<input type="checkbox" readonly="true"> |
|
<xsl:if test="wert = 'true'"> |
|
<xsl:attribute name="checked">true</xsl:attribute> |
|
</xsl:if> |
|
|
|
<xsl:attribute name="name"><xsl:value-of select="f_name" /></xsl:attribute> |
|
</input> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<!--Typ=1 ist string und wird defaultmäßig behandelt --> |
|
<xsl:value-of select="wert" /> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
|
|
</xsl:template> |
|
<xsl:template name="datensatzzaehler"> |
|
<xsl:choose> |
|
<xsl:when test="sqlerg/@max=0"> |
|
Kein Satz gefunden |
|
</xsl:when> |
|
<xsl:otherwise> |
|
Datensatz <xsl:choose> |
|
<xsl:when test="sqlerg/@offset=0 and sqlerg/@max=0">0</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="sqlerg/@offset+1"/> |
|
</xsl:otherwise> |
|
</xsl:choose> - |
|
<xsl:choose> |
|
<xsl:when test="(sqlerg/@offset + sqlerg/@maxOffset) < sqlerg/@max"> |
|
<xsl:value-of select="(sqlerg/@offset + sqlerg/@maxOffset)"/> von insgesamt |
|
<xsl:choose> |
|
<xsl:when test="sqlerg/@max =1 "> |
|
<xsl:value-of select="sqlerg/@max"/> Satz |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="sqlerg/@max"/> Sätzen |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
|
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="sqlerg/@max"/> von insgesamt |
|
<xsl:choose> |
|
<xsl:when test="sqlerg/@max =1 "> |
|
<xsl:value-of select="sqlerg/@max"/> Satz. |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="sqlerg/@max"/> Sätzen. |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:template> |
|
<xsl:template name="get_colvalue"> |
|
<xsl:param name="colname"/> |
|
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement/sqlerg/row/col"> |
|
<xsl:if test="f_name =$colname"> |
|
<xsl:value-of select="wert" /> |
|
</xsl:if> |
|
</xsl:for-each> |
|
</xsl:template> |
|
<xsl:template name="get_val_or_nbsp"> |
|
<xsl:param name="zs4" /> |
|
<xsl:copy-of select="$zs4" /> |
|
<!-- der folgende Code klappt mit xalan 2.6 nicht mehr: |
|
<xsl:choose> |
|
<xsl:when test="text()[$zs4] != ''"> |
|
<xsl:when test="$zs4 != ''"> |
|
|
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="' '" /> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
--> |
|
</xsl:template> |
|
</xsl:stylesheet> |
|
|
|
|