-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstruct.xsl
More file actions
179 lines (168 loc) · 6.17 KB
/
Copy pathconstruct.xsl
File metadata and controls
179 lines (168 loc) · 6.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl">
<xsl:output method="html"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
<xsl:variable name="keywords">programming,extension,database,driver,interface,pgsql,pg,py,SQL,Python,python3,py-postgresql,pg-python,Postgres,postgres,PostgreSQL,postgresql,postgre,Postgre,procedural language,plpython,plpythonu,PL/Python,PL/PythonU,PL/Python3,psycopg,pygresql,psyco,bsd,mit</xsl:variable>
<xsl:variable name="project" select="'Python & Postgres'"/>
<xsl:variable name="frontend" select="exsl:node-set(document('frontend.xml'))"/>
<xsl:variable name="fe" select="$frontend/published/@name"/>
<!-- latest release *must* be the last element -->
<xsl:variable name="fe-default_main_version"
select="$frontend/published/branch[position()=1]/@version"/>
<xsl:variable name="fe-default_version"
select="$frontend/published/branch[position()=1]/release[position()=1]/@version"/>
<xsl:variable name="fe-default_date"
select="$frontend/published/branch[position()=1]/release[position()=1]/@date"/>
<xsl:variable name="fe-branch_version"
select="$frontend/published/branch[position()=1]/@version"/>
<xsl:variable name="backend" select="exsl:node-set(document('backend.xml'))"/>
<xsl:variable name="be" select="$backend/published/@name"/>
<!-- latest release *must* be the last element -->
<xsl:variable name="be-default_main_version"
select="$backend/published/branch[position()=1]/@version"/>
<xsl:variable name="be-default_version"
select="$backend/published/branch[position()=1]/release[position()=1]/@version"/>
<xsl:variable name="be-default_date"
select="$backend/published/branch[position()=1]/release[position()=1]/@date"/>
<xsl:variable name="be-branch_version"
select="$backend/published/branch[position()=1]/@version"/>
<xsl:template name="release-tree">
<xsl:for-each select="/published/branch/release[position()=1]">
<tr>
<td style="padding-right: 4px;"><a href="docs/{../@version}">v<xsl:value-of select="@version"/></a></td>
<td>[<xsl:value-of select="@date"/>]</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template match="file">
<a title="{@id}" href="files/{@id}"><xsl:value-of select="@type"/>,</a>
</xsl:template>
<xsl:template match="platform">
<table>
<tr>
<td>
<xsl:choose>
<xsl:when test="platform">
<xsl:attribute name="class"><xsl:value-of select="'Rident'"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class"><xsl:value-of select="'Fident'"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(@id)"><xsl:value-of select="'source'"/></xsl:if>
<xsl:value-of select="@id"/>:
</td>
<td>
<xsl:apply-templates/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="release">
<xsl:param name="doc"/>
<div class="releases">
<xsl:for-each select="/published/branch[not(@hidden)]">
<table>
<tr>
<td class="Rident">
<xsl:if test="@state = 'unsupported'">
<img title="unsupported" src="warning.png"/>
<div/>
</xsl:if>
<xsl:value-of select="@id"/>
</td>
<td>
<div>
<xsl:for-each select="release[not(@hidden)]">
<table id="R{@id}" class="release_files">
<tr>
<td class="Rident">
<xsl:if test="errata">
<img title="{errata/text()}" src="warning.png"/><div/>
</xsl:if>
<xsl:value-of select="@id"/>
</td>
<td class="Rfiles">
<div><xsl:apply-templates select="*[local-name()!='errata']"/></div>
</td>
</tr>
</table>
</xsl:for-each>
</div>
</td>
</tr>
</table>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="$project"/></title>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<meta name="keywords" content="string($keywords)"/>
<meta name="description" content="Access Python 3 or PostgreSQL from Either Technology"/>
<link rel="icon" type="image/png" href="python.svg"/>
<link rel="stylesheet" type="text/css" href="main.css"/>
<script type="text/javascript" src="lib/jquery.js"></script>
<script type="text/javascript" src="lib/jquery.color.js"></script>
<xsl:copy-of select="document('ga.js.xml')/x/*"/>
</head>
<body>
<div id="offscreen"></div>
<div id="body">
<div id="content">
<table id="layout">
<tr>
<td>
<div class="pane" id="python">
<a title="Python Programming Language" href="http://python.org"
><img class="logo" src="python.svg"/></a>
</div>
<div class="pointer">↓</div>
<div>
<a title="PostgreSQL DBMS" href="http://postgresql.org"
><img class="logo" src="postgres.svg"/></a>
</div>
<div>
</div>
</td>
<td>
<div class="pane" id="postgres">
<a title="PostgreSQL DBMS" href="http://postgresql.org"
><img class="logo" src="postgres.svg"/></a>
</div>
<div class="pointer">↓</div>
<div>
<a title="Python Programming Language" href="http://python.org"
><img class="logo" src="python.svg"/></a>
</div>
<div>
</div>
</td>
</tr>
</table>
</div>
<div id="footer">
<table style="width: 100%">
<tr>
<td><a href="license.txt">License: BSD, PostgreSQL, Python, MIT.</a></td>
<td><a href="http://lists.pgfoundry.org/mailman/listinfo/python-general">Mailing List</a></td>
<td><a href="https://github.com/jwp/py-postgresql">Source Control</a></td>
<td><a href="http://github.com/jwp/py-postgresql/issues">Bug Tracker</a></td>
<td><a href="http://pypi.python.org/pypi/py-postgresql">PyPI</a></td>
<td><a href="old">Old Site</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<!--
! vim: sw=1:et:ts=1:
!-->