Daniel Quathamer
9 months ago
2 changed files with 75 additions and 0 deletions
Binary file not shown.
@ -0,0 +1,75 @@
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<xsl:stylesheet version="1.0" |
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
||||
<xsl:import href="resultset_html.xsl" /> |
||||
<xsl:output method="text" encoding="iso-8859-1"/> |
||||
<xsl:variable name="delim" select="';'"/> |
||||
<xsl:strip-space elements="*" /> |
||||
<xsl:template match="/"> |
||||
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement"> |
||||
<xsl:choose> |
||||
<xsl:when test="@typ='tabelle'"> |
||||
<xsl:if test="@ordnr > 0"> |
||||
<xsl:call-template name="tableseparator" /> |
||||
</xsl:if> |
||||
<xsl:for-each select="sqlerg/headers/header"> |
||||
<xsl:call-template name="remove_linebreaks"> |
||||
<xsl:with-param name="volltext" select="wert" /> |
||||
</xsl:call-template><xsl:value-of select="$delim"/> |
||||
</xsl:for-each><xsl:text> |
||||
</xsl:text> |
||||
<xsl:for-each select="sqlerg/row"> |
||||
<xsl:for-each select="col"> |
||||
<xsl:choose> |
||||
<xsl:when test="starts-with(f_name,'next')"> |
||||
<xsl:value-of select="$delim"/> |
||||
</xsl:when> |
||||
|
||||
<xsl:otherwise> |
||||
<xsl:call-template name="remove_linebreaks"> |
||||
<xsl:with-param name="volltext" select="wert" /> |
||||
</xsl:call-template><xsl:value-of select="$delim"/> |
||||
|
||||
</xsl:otherwise> |
||||
</xsl:choose> |
||||
</xsl:for-each> |
||||
<xsl:text> |
||||
</xsl:text> |
||||
|
||||
</xsl:for-each> |
||||
<xsl:text> |
||||
</xsl:text> |
||||
</xsl:when> |
||||
<xsl:otherwise> |
||||
<xsl:text> |
||||
Nicht unterstuetzter Ergebnistyp </xsl:text><xsl:value-of select="@type" /> |
||||
</xsl:otherwise> |
||||
</xsl:choose> |
||||
|
||||
</xsl:for-each> |
||||
|
||||
</xsl:template> |
||||
<xsl:template name="remove_linebreaks"> |
||||
<xsl:param name="volltext" /> |
||||
<xsl:choose> |
||||
<xsl:when test="contains($volltext,'\n')"> |
||||
<xsl:value-of select="substring-before($volltext,'\n')"/><xsl:text> </xsl:text> |
||||
<xsl:call-template name="remove_linebreaks"> |
||||
<xsl:with-param name="volltext"><xsl:value-of select="substring-after($volltext,'\n')" /> |
||||
</xsl:with-param> |
||||
</xsl:call-template> |
||||
</xsl:when> |
||||
<xsl:otherwise> |
||||
<xsl:copy-of select="$volltext" /> |
||||
</xsl:otherwise> |
||||
</xsl:choose> |
||||
|
||||
</xsl:template> |
||||
<xsl:template name="tableseparator" > |
||||
<xsl:text> |
||||
|
||||
|
||||
</xsl:text> |
||||
</xsl:template> |
||||
|
||||
</xsl:stylesheet> |
Loading…
Reference in new issue