~ubuntu-branches/ubuntu/trusty/postgis/trusty-security

« back to all changes in this revision

Viewing changes to doc/xsl/postgis_aggs_mm.xml.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-12-11 13:10:34 UTC
  • mfrom: (1.1.9 upstream) (5.2.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20091211131034-wmsz69wxvt95pe5r
Tags: 1.4.0-2
* Upload to unstable.
* Better parameterized debian/rules against postgis $(VERSION).
* Added dblatex and libcunit1-dev among build-deps.
* Added postgis_comments.sql to contrib/ SQL templates.
* Dropping 8.3 support, no more supported for squeeze.
  (closes: #559587)
* Do not stop on error in postrm if the target dir does not exist.
  (closes: #560409)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
3
<!-- ********************************************************************
 
4
         $Id: postgis_aggs_mm.xml.xsl 4005 2009-04-16 05:54:04Z robe $
 
5
         ********************************************************************
 
6
         Copyright 2008, Regina Obe
 
7
         License: BSD
 
8
         Purpose: This is an xsl transform that generates index listing of aggregate functions and mm /sql compliant functions xml section from reference_new.xml to then
 
9
         be processed by doc book
 
10
         ******************************************************************** -->
 
11
        <xsl:output method="xml" indent="yes" encoding="utf-8"/>
 
12
        <xsl:template match='/chapter'>
 
13
        <chapter>
 
14
                <title>PostGIS Special Functions Index</title>
 
15
                <sect1 id="PostGIS_Aggregate_Functions">
 
16
                        <title>PostGIS Aggregate Functions</title>
 
17
                        <para>The functions given below are spatial aggregate functions provided with PostGIS that can be used just like any other sql aggregate function such as sum, average.</para>
 
18
                        <itemizedlist>
 
19
                        <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 
20
                        <xsl:for-each select='sect1/refentry'>
 
21
                                <xsl:sort select="@id"/>
 
22
                                <xsl:variable name='comment'>
 
23
                                        <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
 
24
                                </xsl:variable>
 
25
                                <xsl:variable name="refid">
 
26
                                        <xsl:value-of select="@id" />
 
27
                                </xsl:variable>
 
28
 
 
29
                        <!-- For each function prototype if it takes a geometry set then catalog it as an aggregate function  -->
 
30
                                <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">
 
31
                                        <xsl:choose>
 
32
                                                <xsl:when test="contains(paramdef/type,'geometry set')">
 
33
                                                         <listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></listitem>
 
34
                                                </xsl:when>
 
35
                                        </xsl:choose>
 
36
                                </xsl:for-each>
 
37
                        </xsl:for-each>
 
38
                        </itemizedlist>
 
39
                </sect1>
 
40
 
 
41
                <sect1 id="PostGIS_SQLMM_Functions">
 
42
                        <title>PostGIS SQL-MM Compliant Functions</title>
 
43
                        <para>The functions given below are PostGIS functions that conform to the SQL/MM 3 standard</para>
 
44
                        <note>
 
45
                          <para>SQL-MM defines the default SRID of all geometry constructors as 0.
 
46
                          PostGIS uses a default SRID of -1.</para>
 
47
                        </note>
 
48
                                <itemizedlist>
 
49
                        <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 
50
                                <xsl:for-each select='sect1/refentry'>
 
51
                                        <xsl:sort select="@id"/>
 
52
                                        <xsl:variable name='comment'>
 
53
                                                <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
 
54
                                        </xsl:variable>
 
55
                                        <xsl:variable name="refid">
 
56
                                                <xsl:value-of select="@id" />
 
57
                                        </xsl:variable>
 
58
 
 
59
                        <!-- For each section if there is note that it implements SQL/MM catalog it -->
 
60
                                                <xsl:for-each select="refsection">
 
61
                                                        <xsl:for-each select="para">
 
62
                                                                <xsl:choose>
 
63
                                                                        <xsl:when test="contains(.,'implements the SQL/MM')">
 
64
                                                                                <listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:value-of select="." /></listitem>
 
65
                                                                        </xsl:when>
 
66
                                                                </xsl:choose>
 
67
                                                        </xsl:for-each>
 
68
                                                </xsl:for-each>
 
69
                                </xsl:for-each>
 
70
                                </itemizedlist>
 
71
                </sect1>
 
72
 
 
73
                <sect1 id="PostGIS_3D_Functions">
 
74
                        <title>PostGIS Functions that support 3D</title>
 
75
                        <para>The functions given below are PostGIS functions that do not throw away the Z-Index.</para>
 
76
                                <itemizedlist>
 
77
                        <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 
78
                                <xsl:for-each select='sect1/refentry'>
 
79
                                        <xsl:sort select="@id"/>
 
80
                                        <xsl:variable name='comment'>
 
81
                                                <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
 
82
                                        </xsl:variable>
 
83
                                        <xsl:variable name="refid">
 
84
                                                <xsl:value-of select="@id" />
 
85
                                        </xsl:variable>
 
86
 
 
87
                        <!-- For each section if there is note that it supports 3d catalog it -->
 
88
                                                <xsl:for-each select="refsection">
 
89
                                                        <xsl:for-each select="para">
 
90
                                                                <xsl:choose>
 
91
                                                                        <xsl:when test="contains(.,'This function supports 3d')">
 
92
                                                                                <listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></listitem>
 
93
                                                                        </xsl:when>
 
94
                                                                </xsl:choose>
 
95
                                                        </xsl:for-each>
 
96
                                                </xsl:for-each>
 
97
                                </xsl:for-each>
 
98
                                </itemizedlist>
 
99
                </sect1>
 
100
 
 
101
                <sect1 id="PostGIS_Curved_GeometryFunctions">
 
102
                        <title>PostGIS Curved Geometry Support Functions</title>
 
103
                        <para>The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEDPOLYGON, and other curved geometry types</para>
 
104
                                <itemizedlist>
 
105
                        <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 
106
                                <xsl:for-each select='sect1/refentry'>
 
107
                                        <xsl:sort select="@id"/>
 
108
                                        <xsl:variable name='comment'>
 
109
                                                <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
 
110
                                        </xsl:variable>
 
111
                                        <xsl:variable name="refid">
 
112
                                                <xsl:value-of select="@id" />
 
113
                                        </xsl:variable>
 
114
 
 
115
                        <!-- For each section if there is note that it implements Circular String catalog it -->
 
116
                                                <xsl:for-each select="refsection">
 
117
                                                        <xsl:for-each select="para">
 
118
                                                                <xsl:choose>
 
119
                                                                        <xsl:when test="contains(.,'supports Circular Strings')">
 
120
                                                                                <listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /></listitem>
 
121
                                                                        </xsl:when>
 
122
                                                                </xsl:choose>
 
123
                                                        </xsl:for-each>
 
124
                                                </xsl:for-each>
 
125
                                </xsl:for-each>
 
126
                                </itemizedlist>
 
127
                </sect1>
 
128
 
 
129
                <sect1 id="NewFunctions">
 
130
                        <title>New PostGIS Functions</title>
 
131
                        <sect2 id="NewFunctions_1_4">
 
132
                        <title>PostGIS Functions new in 1.4</title>
 
133
                        <para>The functions given below are PostGIS functions that were introduced in this major release.</para>
 
134
                        <itemizedlist>
 
135
                        <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 
136
                                <xsl:for-each select='sect1/refentry'>
 
137
                                        <xsl:sort select="@id"/>
 
138
                                        <xsl:variable name='comment'>
 
139
                                                <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
 
140
                                        </xsl:variable>
 
141
                                        <xsl:variable name="refid">
 
142
                                                <xsl:value-of select="@id" />
 
143
                                        </xsl:variable>
 
144
 
 
145
                        <!-- For each section if there is note about availability in this version -->
 
146
                                                <xsl:for-each select="refsection">
 
147
                                                        <xsl:for-each select="para">
 
148
                                                                <xsl:choose>
 
149
                                                                        <xsl:when test="contains(.,'Availability: 1.4')">
 
150
                                                                                <listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:text> </xsl:text><xsl:value-of select="." /></listitem>
 
151
                                                                        </xsl:when>
 
152
                                                                </xsl:choose>
 
153
                                                        </xsl:for-each>
 
154
                                                </xsl:for-each>
 
155
                                </xsl:for-each>
 
156
                                </itemizedlist>
 
157
                        </sect2>
 
158
                        <sect2 id="NewFunctions_1_3">
 
159
                                <title>PostGIS Functions new in 1.3</title>
 
160
                                <para>The functions given below are PostGIS functions that were introduced in the 1.3 release.</para>
 
161
                                <itemizedlist>
 
162
                                <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 
163
                                <xsl:for-each select='sect1/refentry'>
 
164
                                        <xsl:sort select="@id"/>
 
165
                                        <xsl:variable name='comment'>
 
166
                                                <xsl:value-of select="normalize-space(translate(translate(refnamediv/refpurpose,'&#x0d;&#x0a;', ' '), '&#09;', ' '))"/>
 
167
                                        </xsl:variable>
 
168
                                        <xsl:variable name="refid">
 
169
                                                <xsl:value-of select="@id" />
 
170
                                        </xsl:variable>
 
171
 
 
172
                                <!-- For each section if there is note about availability in this version -->
 
173
                                                <xsl:for-each select="refsection">
 
174
                                                        <xsl:for-each select="para">
 
175
                                                                <xsl:choose>
 
176
                                                                        <xsl:when test="contains(.,'Availability: 1.3')">
 
177
                                                                                <listitem><link linkend="{$refid}"><xsl:value-of select="$refid" /></link> - <xsl:value-of select="$comment" /> <xsl:text> </xsl:text><xsl:value-of select="." /></listitem>
 
178
                                                                        </xsl:when>
 
179
                                                                </xsl:choose>
 
180
                                                        </xsl:for-each>
 
181
                                                </xsl:for-each>
 
182
                                </xsl:for-each>
 
183
                                </itemizedlist>
 
184
                        </sect2>
 
185
                </sect1>
 
186
 
 
187
        </chapter>
 
188
        </xsl:template>
 
189
 
 
190
        <!--macro to pull out function parameter names so we can provide a pretty arg list prefix for each function -->
 
191
        <xsl:template name="listparams">
 
192
                <xsl:param name="func" />
 
193
                <xsl:for-each select="$func">
 
194
                        <xsl:if test="count(paramdef/parameter) &gt; 0">args: </xsl:if>
 
195
                        <xsl:for-each select="paramdef">
 
196
                                <xsl:choose>
 
197
                                        <xsl:when test="count(parameter) &gt; 0">
 
198
                                                <xsl:value-of select="parameter" />
 
199
                                        </xsl:when>
 
200
                                </xsl:choose>
 
201
                                <xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
 
202
                        </xsl:for-each>
 
203
                        <xsl:if test="count(paramdef/parameter) &gt; 0"> - </xsl:if>
 
204
                </xsl:for-each>
 
205
        </xsl:template>
 
206
 
 
207
</xsl:stylesheet>