[postgis-commits] svn - r3400 - trunk/doc/xsl

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Sun Dec 14 07:14:44 PST 2008


Author: robe
Date: 2008-12-14 07:14:43 -0800 (Sun, 14 Dec 2008)
New Revision: 3400

Modified:
   trunk/doc/xsl/postgis_gardentest.sql.xsl
Log:
Add circular string and curved polygon to garden set.  Also start work on dealing with functions that take floats and integers as additional params

Modified: trunk/doc/xsl/postgis_gardentest.sql.xsl
===================================================================
--- trunk/doc/xsl/postgis_gardentest.sql.xsl	2008-12-14 07:24:32 UTC (rev 3399)
+++ trunk/doc/xsl/postgis_gardentest.sql.xsl	2008-12-14 15:14:43 UTC (rev 3400)
@@ -11,6 +11,10 @@
 	<xsl:output method="text" />
 	<!--Exclude this from testing - it crashes with geometry collection -->
 	<xsl:variable name='fnexclude'>ST_CurveToLine</xsl:variable>
+	<xsl:variable name='var_integer'>4269</xsl:variable>
+	<xsl:variable name='var_float1'>0.5</xsl:variable>
+	<xsl:variable name='var_float2'>0.75</xsl:variable>
+	<xsl:variable name='var_version'>2</xsl:variable>
 	<pgis:gardens>
 		<pgis:gset ID='PointSet' GeometryType='POINT'>(SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom 
 		FROM generate_series(-10,50,15) As i 
@@ -56,6 +60,10 @@
 			CROSS JOIN generate_series(50,70, 20) As j
 			CROSS JOIN generate_series(1,2) As m
 			GROUP BY m)</pgis:gset>
+			
+		<pgis:gset ID='CurvePolySet' GeometryType='CURVEPOLYGON'>(SELECT ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))  As the_geom 
+		FROM generate_series(-10,50,10) As i 
+			CROSS JOIN generate_series(40,70, 20) As j)</pgis:gset>
 	</pgis:gardens>
 
 	<xsl:template match='/chapter'>
@@ -147,4 +155,19 @@
 			</xsl:for-each>
 		</xsl:for-each>
 	</xsl:template>
+	
+	<!--macro to replace func args with dummy var args -->
+	<xsl:template name="replaceparams">
+		<xsl:param name="func" />
+		<xsl:for-each select="$func">
+			<xsl:for-each select="paramdef">
+				<xsl:choose>
+					<xsl:when test="count(parameter) &gt; 0"> 
+						<xsl:value-of select="parameter" />
+					</xsl:when>
+				</xsl:choose>
+				<xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
+			</xsl:for-each>
+		</xsl:for-each>	
+	</xsl:template>
 </xsl:stylesheet>



More information about the postgis-commits mailing list