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
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'>
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>
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,'
', ' '), '	', ' '))"/>
25
<xsl:variable name="refid">
26
<xsl:value-of select="@id" />
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">
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>
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>
45
<para>SQL-MM defines the default SRID of all geometry constructors as 0.
46
PostGIS uses a default SRID of -1.</para>
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,'
', ' '), '	', ' '))"/>
55
<xsl:variable name="refid">
56
<xsl:value-of select="@id" />
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">
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>
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>
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,'
', ' '), '	', ' '))"/>
83
<xsl:variable name="refid">
84
<xsl:value-of select="@id" />
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">
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>
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>
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,'
', ' '), '	', ' '))"/>
111
<xsl:variable name="refid">
112
<xsl:value-of select="@id" />
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">
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>
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>
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,'
', ' '), '	', ' '))"/>
141
<xsl:variable name="refid">
142
<xsl:value-of select="@id" />
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">
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>
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>
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,'
', ' '), '	', ' '))"/>
168
<xsl:variable name="refid">
169
<xsl:value-of select="@id" />
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">
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>
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) > 0">args: </xsl:if>
195
<xsl:for-each select="paramdef">
197
<xsl:when test="count(parameter) > 0">
198
<xsl:value-of select="parameter" />
201
<xsl:if test="position()<last()"><xsl:text>, </xsl:text></xsl:if>
203
<xsl:if test="count(paramdef/parameter) > 0"> - </xsl:if>