diff options
author | defanor <defanor@uberspace.net> | 2018-12-30 13:05:36 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2018-12-30 13:05:36 +0300 |
commit | 1b3ea5d48e049c595f90eb8b9fb11f8149927519 (patch) | |
tree | 979b85238d5f40f05284993c40b98428ca63a8a8 /example/common.xsl |
Initial commit
The initial working version, an example, and brief description are
included.
Error handling and reporting, perhaps HTTP headers, CLI arguments, and
documentation can still be improved, but that's for future commits.
Diffstat (limited to 'example/common.xsl')
-rw-r--r-- | example/common.xsl | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/example/common.xsl b/example/common.xsl new file mode 100644 index 0000000..1db0229 --- /dev/null +++ b/example/common.xsl @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xhtml="http://www.w3.org/1999/xhtml" + xmlns="http://www.w3.org/1999/xhtml" + version="1.0"> + <xsl:output method="xml" indent="yes"/> + + <xsl:template match="/"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Bugs</title> + </head> + <body> + <xsl:apply-templates select="*" /> + </body> + </html> + </xsl:template> + + <xsl:template match="sql_error"> + <h1>SQL error</h1> + <dl> + <dt>State</dt> + <dd><xsl:copy-of select="@state/text()" /></dd> + <dt>Status</dt> + <dd><xsl:copy-of select="@status/text()" /></dd> + <dt>Message</dt> + <dd><xsl:copy-of select="@message/text()" /></dd> + <dt>Detail</dt> + <dd><xsl:copy-of select="@detail/text()" /></dd> + <dt>Hint</dt> + <dd><xsl:copy-of select="@hint/text()" /></dd> + <dt>Query template</dt> + <dd><xsl:copy-of select="@template/text()" /></dd> + <dt>Query parameters</dt> + <dd><xsl:copy-of select="@parameters/text()" /></dd> + </dl> + </xsl:template> + +</xsl:stylesheet> |