]> granicus.if.org Git - postgis/commitdiff
First draft of garden test sql generator. This version just searches the docs and...
authorRegina Obe <lr@pcorp.us>
Thu, 11 Dec 2008 16:56:53 +0000 (16:56 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 11 Dec 2008 16:56:53 +0000 (16:56 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3378 b70326c6-7e19-0410-871a-916f4a2858ee

doc/xsl/postgis_gardentest.sql.xsl [new file with mode: 0644]

diff --git a/doc/xsl/postgis_gardentest.sql.xsl b/doc/xsl/postgis_gardentest.sql.xsl
new file mode 100644 (file)
index 0000000..ef423d9
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
+<!-- ********************************************************************\r
+ * $Id: 0.1 postgis_gardentest.sql.xsl 3377 2008-12-11 15:56:18Z robe $\r
+ ********************************************************************\r
+        Copyright 2008, Regina Obe\r
+     License: BSD\r
+        Purpose: This is an xsl transform that generates an sql test script from xml docs to test all the functions we have documented\r
+                       using a garden variety of geometries.  Its intent is to flag major crashes.\r
+     ******************************************************************** -->\r
+       <xsl:output method="text" />\r
+       <xsl:template match='/chapter'>\r
+<!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->\r
+               <xsl:for-each select='sect1/refentry'>\r
+<!-- For each function prototype generate a test sql statement\r
+       Test functions that take no arguments  -->\r
+                       <xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype">\r
+<xsl:if test="count(paramdef/parameter) = 0">SELECT  <xsl:value-of select="funcdef/function" />();\r
+</xsl:if>\r
+                       </xsl:for-each>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+</xsl:stylesheet>\r