Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 100 lines (90 sloc) 2.923 kb
f671e8f David Sheets glom model clean-up, xml generation, begin gloxml->html xslt for glosse ...
dsheets authored
1 <?xml version="1.0"?>
2
3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns="http://www.w3.org/TR/xhtml1/strict">
6
7 <xsl:output method="html" />
8
9 <xsl:template name="glol_params">
10 <h2>glol</h2>
11 <form>
12 <ul>
13 <li><input type="text" /></li>
14 </ul>
15 </form>
16 </xsl:template>
17
18 <xsl:template name="glom_name">
19 <xsl:if test="@name">
20 <h3><xsl:value-of select="@name" /></h3>
21 </xsl:if>
22 </xsl:template>
23
24 <xsl:template name="glo_name">
25 <xsl:choose>
26 <xsl:when test="@name"><xsl:value-of select="@name" /></xsl:when>
27 <xsl:otherwise>[unknown]</xsl:otherwise>
28 </xsl:choose>
29 </xsl:template>
30
31 <xsl:template match="/">
32 <html>
33 <head>
34 <title>glosse : glo shader system editor</title>
35 <meta charset="utf-8" />
36 <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
37
50e80eb David Sheets gloc command functorization for posix and js platforms; gloc command int...
dsheets authored
38 <link rel="stylesheet" type="text/css" href="glocide.css" />
f671e8f David Sheets glom model clean-up, xml generation, begin gloxml->html xslt for glosse ...
dsheets authored
39 <link rel="stylesheet" type="text/css" href="../CodeMirror2/lib/codemirror.css" />
40 <script src="../CodeMirror2/lib/codemirror.js"></script>
41 <script src="../CodeMirror2/mode/clike/clike.js"></script>
42 <script src="../CodeMirror2/keymap/emacs.js"></script>
43 </head>
44 <body>
45 <xsl:choose>
46 <xsl:when test="glom">
47 <div id="sidebar">
48 <div id="glol">
49 <xsl:call-template name="glol_params" />
50 </div>
51 <div id="glom">
52 <h2>glom</h2>
53 <xsl:apply-templates mode="glom">
54 <xsl:with-param name="path" />
55 </xsl:apply-templates>
56 </div>
57 </div>
58 <div id="gloc">
59 <form>
60 <textarea id="source" name="source">
61 </textarea>
62 </form>
63 <div id="stderr">
64 stderr
65 </div>
66 <div id="stdout">
67 stdout
68 </div>
69 </div>
70 </xsl:when>
71 <xsl:otherwise>
72 <xsl:call-template name="format_error" />
73 </xsl:otherwise>
74 </xsl:choose>
75 <script type="text/javascript">
76 var editor = CodeMirror.fromTextArea(document.getElementById("source"), {
77 lineNumbers: true,
78 mode: "text/x-csrc",
79 keyMap: "emacs"
80 });
81 </script>
82 </body>
83 </html>
84 </xsl:template>
85
86 <xsl:template match="glom" mode="glom">
87 <xsl:param name="path" />
88 <xsl:call-template name="glom_name" />
89 <ul>
90 <xsl:for-each select="child::*">
91 <li><xsl:apply-templates select="." mode="glom" /></li>
92 </xsl:for-each>
93 </ul>
94 </xsl:template>
95
96 <xsl:template match="glo" mode="glom">
97 <a href="#"><xsl:call-template name="glo_name" /></a>
98 </xsl:template>
99 </xsl:stylesheet>
Something went wrong with that request. Please try again.