tabular formatter: new option 'separateBy' to print horizontal separator on each change of given column
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, version 3 of the License.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 This XSLT can be used for viewing config files in a web browser (Firefox, rekonq etc.)
23 <xsl:stylesheet version="1.0"
24 xmlns="http://www.w3.org/1999/xhtml"
25 xmlns:h="http://www.w3.org/1999/xhtml"
26 xmlns:c="tag:globalcode.info,2018:sqldk/configuration"
27 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
28 xmlns:fn="http://www.w3.org/2005/xpath-functions"
29 xmlns:svg="http://www.w3.org/2000/svg"
30 xmlns:xs="http://www.w3.org/2001/XMLSchema"
31 exclude-result-prefixes="fn h p xs">
36 doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
37 doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/>
39 <xsl:param name="header" select="'SQL-DK configuration'"/>
41 <xsl:template match="/">
44 <title><xsl:value-of select="$header"/></title>
45 <style type="text/css">
48 background-color: #eee;
60 border: 1px solid #ddd;
61 background-color: #e8e8e8;
63 text-shadow: 2px 2px 2px #aaa;
76 border-collapse:collapse;
81 border: 1px solid #ddd;
94 background-color: #e9e9e9;
115 <h1><xsl:value-of select="$header"/></h1>
118 This file defines per-user configuration of <a href="https://sql-dk.globalcode.info/">SQL-DK</a>
119 – an SQL batch client.
123 <h2>Database connections</h2>
125 <p>This databases are configured:</p>
128 <xsl:when test="c:configuration/c:database">
140 <xsl:for-each select="c:configuration/c:database">
142 <td><xsl:value-of select="c:name"/></td>
143 <td><xsl:value-of select="c:userName"/></td>
144 <td><xsl:value-of select="c:url"/></td>
145 <td><xsl:value-of select="c:driver"/></td>
146 <td><ul><xsl:apply-templates select="c:property"/></ul></td>
152 <xsl:otherwise><p>no databases are configured</p></xsl:otherwise>
158 <li>passwords are hidden in this output</li>
159 <li>JDBC drivers are not mandatory – not needed in SQL-DK, but sometimes useful when <code>jdbc-dk-driver</code> is used in other applications to load SQL-DK's database connections</li>
164 <h2>Output formatters</h2>
169 <xsl:when test="c:configuration/c:defaultFormatter"><xsl:value-of select="c:configuration/c:defaultFormatter"/></xsl:when>
170 <xsl:otherwise>none (built-in default will be used)</xsl:otherwise>
175 <xsl:when test="c:configuration/c:formatter">
185 <xsl:for-each select="c:configuration/c:formatter">
187 <td><xsl:value-of select="c:name"/></td>
188 <td><xsl:value-of select="c:class"/></td>
189 <td><ul><xsl:apply-templates select="c:property"/></ul></td>
195 <xsl:otherwise><p>no additional formatters are defined (built-in defaults will be used)</p></xsl:otherwise>
202 <xsl:template match="c:property">
204 <xsl:value-of select="@name"/> = <xsl:value-of select="."/>