Formatters: structural change – new level „statement“ → query and parameters are no more duplicated into each result set or updates result
1 <?xml version="1.0" encoding="UTF-8"?>
4 Copyright © 2013 František Kučera (frantovo.cz)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 This XSLT can be used for viewing config files in a web browser (Firefox, rekonq etc.)
24 <xsl:stylesheet version="1.0"
25 xmlns="http://www.w3.org/1999/xhtml"
26 xmlns:h="http://www.w3.org/1999/xhtml"
27 xmlns:c="https://sql-dk.globalcode.info/xmlns/configuration"
28 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
29 xmlns:fn="http://www.w3.org/2005/xpath-functions"
30 xmlns:svg="http://www.w3.org/2000/svg"
31 xmlns:xs="http://www.w3.org/2001/XMLSchema"
32 exclude-result-prefixes="fn h p xs">
37 doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
38 doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
40 <xsl:param name="header" select="'SQL-DK configuration'"/>
42 <xsl:template match="/">
45 <title><xsl:value-of select="$header"/></title>
46 <style type="text/css">
49 background-color: #eee;
61 border: 1px solid #ddd;
62 background-color: #e8e8e8;
64 text-shadow: 2px 2px 2px #aaa;
77 border-collapse:collapse;
82 border: 1px solid #ddd;
95 background-color: #e9e9e9;
109 <h1><xsl:value-of select="$header"/></h1>
112 This file defines per-user configuration of <a href="https://sql-dk.globalcode.info/">SQL-DK</a>
113 – an SQL batch client.
117 <h2>Database connections</h2>
119 <p>This databases are configured:</p>
122 <xsl:when test="c:configuration/c:database">
133 <xsl:for-each select="c:configuration/c:database">
135 <td><xsl:value-of select="c:name"/></td>
136 <td><xsl:value-of select="c:userName"/></td>
137 <td><xsl:value-of select="c:url"/></td>
138 <td><ul><xsl:apply-templates select="c:property"/></ul></td>
144 <xsl:otherwise><p>no databases are configured</p></xsl:otherwise>
147 <p>(passwords are hidden in this output)</p>
150 <h2>Output formatters</h2>
155 <xsl:when test="c:configuration/c:defaultFormatter"><xsl:value-of select="c:configuration/c:defaultFormatter"/></xsl:when>
156 <xsl:otherwise>none (built-in default will be used)</xsl:otherwise>
161 <xsl:when test="c:configuration/c:formatter">
171 <xsl:for-each select="c:configuration/c:formatter">
173 <td><xsl:value-of select="c:name"/></td>
174 <td><xsl:value-of select="c:class"/></td>
175 <td><ul><xsl:apply-templates select="c:property"/></ul></td>
181 <xsl:otherwise><p>no additional formatters are defined (built-in defaults will be used)</p></xsl:otherwise>
188 <xsl:template match="c:property">
190 <xsl:value-of select="@name"/> = <xsl:value-of select="."/>