Debian Codegraph @

gavo/resources/web/xsl/tap-joblist-to-html.xsl

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!-- A stylesheet to convert a UWS joblist into HTML.
4
5 TODO: See if there's a way to unify this with dlasync-joblist-to-html.xsl
6 and useruws-joblist-to-html.xsl.
7
8 This stylesheet is made available under CC-0 by the GAVO project,
9 http://www.g-vo.org.
10 See http://creativecommons.org/publicdomain/zero/1.0/ for details.
11 -->
12
13 <xsl:stylesheet
14 xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0"
15 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
16 xmlns="http://www.w3.org/1999/xhtml"
17 version="1.0">
18
19
20 <xsl:output method="xml"
21 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
22 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
23
24 <xsl:template match="uws:jobref">
25 <li>
26 <a>
27 <xsl:attribute name="href">async/<xsl:value-of select="@id"/>
28 </xsl:attribute>
29 <xsl:value-of select="@id"/>
30 </a>
31 (<xsl:apply-templates/>)</li>
32 </xsl:template>
33
34 <xsl:template match="/">
35 <html>
36 <head>
37 <title>UWS job list</title></head>
38 <meta name="robots" content="nofollow"/>
39 <body>
40 <h1>UWS jobs</h1>
41 <ul>
42 <xsl:apply-templates/>
43 </ul>
44 <form action="async" method="POST">
45 <h2>Create a new async job</h2>
46 <input type="submit" value="New job..."/>
47 <input type="hidden" name="LANG" value="ADQL"/>
48 <input type="hidden" name="REQUEST" value="doQuery"/>
49 </form>
50
51 <form action="sync" method="GET">
52 <h2>Run a sync job</h2>
53 <input type="hidden" name="LANG" value="ADQL"/>
54 <input type="hidden" name="REQUEST" value="doQuery"/>
55 <textarea name="QUERY" style="width:100%"/>
56 <p>
57 <label for="formatbutton">Output Format: </label>
58 <select name="FORMAT" id="formatbutton">
59 <option value="application/x-votable+xml">VOTable</option>
60 <option value="text/html">HTML</option>
61 <option value="application/fits">FITS</option>
62 <option value="text/csv">CSV</option>
63 <option value="text/plain">Tab separated</option>
64 </select>
65 </p>
66 <p><input type="submit" value="Run"/></p>
67 </form>
68 </body>
69 </html>
70 </xsl:template>
71 </xsl:stylesheet>