Debian Codegraph @

gavo/resources/web/xsl/dalierror-to-html.xsl

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- A stylesheet formatting DALI-style error messages in INFO elements
4 to look halfway reasonable in a browser window.
5
6 This stylesheet is made available under CC-0 by the GAVO project,
7 http://www.g-vo.org.
8 See http://creativecommons.org/publicdomain/zero/1.0/ for details.
9 -->
10
11 <xsl:stylesheet
12 xmlns:v="http://www.ivoa.net/xml/VOTable/v1.3"
13 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
14 xmlns="http://www.w3.org/1999/xhtml"
15 version="1.0">
16
17 <xsl:include href="dachs-xsl-config.xsl"/>
18
19 <xsl:output method="xml"
20 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
21 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
22
23
24 <xsl:template match="text()"/>
25
26 <xsl:template match="v:INFO[@name='QUERY_STATUS']">
27 <pre class="errmsg">
28 <xsl:value-of select="."/>
29 </pre>
30 </xsl:template>
31
32 <xsl:template match="v:INFO[@name='HINT']">
33 <p>The error came with a hint that may be helpful when fixing
34 things:</p><p><em><xsl:value-of select="."/></em></p>
35 </xsl:template>
36
37 <xsl:template match="/">
38 <html>
39 <head>
40 <title>DaCHS DALI Error</title>
41 <xsl:call-template name="localCompleteHead"/>
42 <style type="text/css">
43 pre.errmsg {
44 margin-top: 1ex;
45 border-top: 2pt solid red;
46 padding-top: 0.5ex;
47 padding-bottom: 0.5ex;
48 border-bottom: 2pt solid red;
49 margin-bottom: 1ex
50 }
51 </style>
52 </head>
53 <body>
54 <h1>DaCHS DALI Error</h1>
55
56 <p>Your request caused an error. This could be because you
57 put in bad parameters or because something is broken at our end.
58 Here is the reason given for the failure:</p>
59
60 <xsl:apply-templates/>
61
62 <xsl:call-template name="localMakeFoot"/>
63 </body>
64 </html>
65 </xsl:template>
66 </xsl:stylesheet>
67
68