[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1214-gb7e977160

git at osgeo.org git at osgeo.org
Wed Jul 12 03:19:46 PDT 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  b7e9771603f21ee28fcca99f4cf0de268e470b0a (commit)
      from  f33f2fb52b406d87078671f641720d7dc8c647c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b7e9771603f21ee28fcca99f4cf0de268e470b0a
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Jul 12 12:19:26 2023 +0200

    Refactor tiger geocoder cheatsheet to use shared templates
    
    References #5435

diff --git a/doc/xsl/common_cheatsheet.xsl b/doc/xsl/common_cheatsheet.xsl
index 9453eb061..af4a8e92b 100644
--- a/doc/xsl/common_cheatsheet.xsl
+++ b/doc/xsl/common_cheatsheet.xsl
@@ -57,11 +57,11 @@
 
 			<xsl:variable name="col_cur"><xsl:value-of select="count(current()//funcprototype) + count(preceding-sibling::*//funcprototype)"/></xsl:variable>
 
+<!--
 			<xsl:if test="$col_cur >$col_func_count and count(preceding-sibling::*//funcprototype) < $col_func_count ">
-				<![CDATA[
 					</div><div id="content_functions_right">
-				]]>
 			</xsl:if>
+-->
 
 			<!--Beginning of section -->
 			<table class="section"><tr><th colspan="2"><xsl:value-of select="title" />
diff --git a/doc/xsl/raster_cheatsheet.html.xsl b/doc/xsl/raster_cheatsheet.html.xsl
index e9d57fa89..6759bd06e 100644
--- a/doc/xsl/raster_cheatsheet.html.xsl
+++ b/doc/xsl/raster_cheatsheet.html.xsl
@@ -22,7 +22,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 	<html>
 		<head>
 			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-			<title>PostGIS Raster Cheat Sheet</title>
+			<title>PostGIS Raster Cheatsheet</title>
 
 <!-- TODO: share a parametrizable stylecheet -->
 			<style type="text/css">
diff --git a/doc/xsl/tiger_geocoder_cheatsheet.html.xsl b/doc/xsl/tiger_geocoder_cheatsheet.html.xsl
index 44695479d..e09d9497e 100644
--- a/doc/xsl/tiger_geocoder_cheatsheet.html.xsl
+++ b/doc/xsl/tiger_geocoder_cheatsheet.html.xsl
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
+
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <!-- ********************************************************************
      ********************************************************************
 	 Copyright 2011, Regina Obe
@@ -11,15 +14,19 @@
 	<xsl:include href="common_utils.xsl" />
 	<xsl:include href="common_cheatsheet.xsl" />
 
-	<xsl:output method="text" />
+  <xsl:variable name="chapter_id" select='"Extras"' />
+
+	<xsl:output method="html" />
 
+<!-- TODO: share this -->
 <xsl:template match="/">
-	<xsl:text><![CDATA[<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /> Tiger Geocoder Cheat Sheet <xsl:text><![CDATA[</title>
-	<style type="text/css">
-<!--
+	<html>
+		<head>
+			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+			<title>PostGIS Tiger Geocoder Cheatsheet</title>
+
+<!-- TODO: share a parametrizable stylesheet -->
+			<style type="text/css">
 body {
 	font-family: Arial, sans-serif;
 	font-size: 8.5pt;
@@ -48,9 +55,8 @@ body {
 .section {
 	border: 1px solid #000;
 	margin: 4px;
-	]]></xsl:text>
-	<xsl:choose><xsl:when test="$output_purpose = 'false'"><![CDATA[width: 45%;]]></xsl:when><xsl:otherwise><![CDATA[width: 100%;]]></xsl:otherwise></xsl:choose>
-<xsl:text><![CDATA[	}
+	<xsl:choose><xsl:when test="$output_purpose = 'false'">width: 100%</xsl:when><xsl:otherwise>width: 100%;</xsl:otherwise></xsl:choose>
+}
 
 .section th {
 	border: 1px solid #000;
@@ -86,88 +92,80 @@ h1 {
 	font-size: 14pt;
 }
 
+			</style>
+		</head>
+		<body>
+			<h1 style='text-align:center'>PostGIS <xsl:value-of select="$postgis_version" /> Tiger Geocoder Cheatsheet</h1>
+			<span class='notes'>
+				<!-- TODO: make text equally distributed horizontally ? -->
+				<xsl:value-of select="$cheatsheets_config/para[@role='new_in_release']" />
+					<sup>1</sup>
+				<xsl:value-of select="$cheatsheets_config/para[@role='enhanced_in_release']" />
+					<sup>2</sup>  
+<!--
+				<xsl:value-of select="$cheatsheets_config/para[@role='aggregate']" />
+					<sup>agg</sup>   
+				<xsl:value-of select="$cheatsheets_config/para[@role='window_function']" />
+					<sup>W</sup>  
+				<xsl:value-of select="$cheatsheets_config/para[@role='requires_geos_3.9_or_higher']" />
+					<sup>g3.9</sup>  
+				<xsl:value-of select="$cheatsheets_config/para[@role='z_support']" />
+					<sup>3d</sup>  
+				SQL-MM<sup>mm</sup>  
+				<xsl:value-of select="$cheatsheets_config/para[@role='geography_support']" />
+					<sup>G</sup>
 -->
-</style>
-	</head><body><h1 style='text-align:center'>PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /><xsl:text><![CDATA[ Tiger Geocoder Cheatsheet</h1>]]></xsl:text>
-		<xsl:text><![CDATA[<div id="content_functions"><span class='notes'>New in this release <sup>1</sup> Enhanced in this release<sup>2</sup></span>]]></xsl:text>
-			<xsl:apply-templates select="/book/chapter[@id='Extras']" name="function_list" />
-			<xsl:text><![CDATA[</div>]]></xsl:text>
-			<xsl:text><![CDATA[<div id="content_examples">]]></xsl:text>
-			<!-- examples go here -->
-			<xsl:apply-templates select="/book/chapter[@id='Extras']/sect1[count(//refentry//refsection//programlisting) > 0]"  />
-			<xsl:text><![CDATA[</div>]]></xsl:text>
-			<xsl:text><![CDATA[</body></html>]]></xsl:text>
+			</span>
+			<div id="content_functions">
+				<xsl:apply-templates select="/book/chapter[@id=$chapter_id]" />
+
+				<!-- examples go here -->
+				<xsl:apply-templates select="/book/chapter[@id=$chapter_id]/sect1[count(//refentry//refsection//programlisting) > 0]"  />
+			</div>
+		</body>
+	</html>
 </xsl:template>
 
+<!-- TODO: move in common_cheatsheet.xsl -->
+<xsl:template match="sect1[count(//refentry//refsection//programlisting) > 0]" name="examples_list">
+
+	<!--Beginning of section -->
+	<xsl:variable name="lt"><xsl:text><![CDATA[<]]></xsl:text></xsl:variable>
+
+	<xsl:if test="contains(., 'Example')">
+	<table>
+		<tr>
+			<th colspan="2" class="example_heading">
+				<xsl:value-of select="title" /> Examples
+			</th>
+		</tr>
+
+		<!--only pull the first example section of each function -->
+		<xsl:for-each select="refentry//refsection[contains(title,'Example')][1]/programlisting[1]">
+			<!-- add row for each function and alternate colors of rows -->
+			<tr>
+				<xsl:attribute name="class">
+					<xsl:choose>
+						<xsl:when test="position() mod 2 = 0">evenrow</xsl:when>
+						<xsl:otherwise>oddrow</xsl:otherwise>
+					</xsl:choose>
+				</xsl:attribute>
+				<td>
+					<b>
+						<xsl:value-of select="ancestor::refentry/refnamediv/refname" />
+					</b>
+					<br />
+					<pre>
+						<xsl:value-of select="."  disable-output-escaping="no"/>
+					</pre>
+				</td>
+			</tr>
+
+			</xsl:for-each>
+	<!--close section -->
+	</table>
+	</xsl:if>
 
-    <xsl:template match="chapter" name="function_list">
-		<xsl:for-each select="sect1">
-			<!--Beginning of section -->
-			<xsl:text><![CDATA[<table class="section"><tr><th colspan="2">]]></xsl:text>
-				<xsl:value-of select="title" />
-				<!-- end of section header beginning of function list -->
-				<xsl:text><![CDATA[</th></tr>]]></xsl:text>
-			<xsl:for-each select="refentry">
-				<!-- add row for each function and alternate colors of rows -->
-				<!-- , hyperlink to online manual -->
-		 		<![CDATA[<tr]]> class="<xsl:choose><xsl:when test="position() mod 2 = 0">evenrow</xsl:when><xsl:otherwise>oddrow</xsl:otherwise></xsl:choose>" <![CDATA[><td colspan='2'><span class='func'>]]><xsl:text><![CDATA[<a href="]]></xsl:text><xsl:value-of select="$linkstub" /><xsl:value-of select="@id" />.html<xsl:text><![CDATA[" target="_blank">]]></xsl:text><xsl:value-of select="refnamediv/refname" /><xsl:text><![CDATA[</a>]]></xsl:text><![CDATA[</span>]]><xsl:if test="contains(.,$new_tag)"><![CDATA[<sup>1</sup> ]]></xsl:if>
-		 		<!-- enhanced tag -->
-		 		<xsl:if test="contains(.,$enhanced_tag)"><![CDATA[<sup>2</sup> ]]></xsl:if>
-		 		<xsl:if test="contains(.,'implements the SQL/MM')"><![CDATA[<sup>mm</sup> ]]></xsl:if>
-		 		<xsl:if test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')"><![CDATA[<sup>G</sup>  ]]></xsl:if>
-		 		<xsl:if test="contains(.,'GEOS >= 3.3')"><![CDATA[<sup>g3.3</sup> ]]></xsl:if>
-		 		<xsl:if test="contains(.,'This function supports 3d')"><![CDATA[<sup>3D</sup> ]]></xsl:if>
-		 		<!-- if only one proto just dispaly it on first line -->
-		 		<xsl:if test="count(refsynopsisdiv/funcsynopsis/funcprototype) = 1">
-		 			(<xsl:call-template name="list_in_params"><xsl:with-param name="func" select="refsynopsisdiv/funcsynopsis/funcprototype" /></xsl:call-template>)
-		 		</xsl:if>
-
-		 		<![CDATA[  ]]>
-		 		<xsl:if test="$output_purpose = 'true'"><xsl:value-of select="refnamediv/refpurpose" /></xsl:if>
-		 		<!-- output different proto arg combos -->
-		 		<xsl:if test="count(refsynopsisdiv/funcsynopsis/funcprototype) > 1"><![CDATA[<span class='func_args'><ol>]]><xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype"><![CDATA[<li>]]><xsl:call-template name="list_in_params"><xsl:with-param name="func" select="." /></xsl:call-template><![CDATA[</li>]]></xsl:for-each>
-		 		<![CDATA[</ol></span>]]></xsl:if>
-		 		<![CDATA[</td></tr>]]>
-		 	</xsl:for-each>
-		 	<!--close section -->
-		 	<![CDATA[</table>]]>
-		</xsl:for-each>
-	</xsl:template>
-
-	 <xsl:template match="sect1[count(//refentry//refsection//programlisting) > 0]">
-			<!--Beginning of section -->
-			<xsl:variable name="lt"><xsl:text><![CDATA[<]]></xsl:text></xsl:variable>
-			<xsl:if test="contains(., 'Example')">
-			<xsl:text><![CDATA[<table><tr><th colspan="2" class="example_heading">]]></xsl:text>
-			<xsl:value-of select="title" /> Examples
-
-				<!--only pull the first example seciton of each function -->
-			<xsl:for-each select="refentry//refsection[contains(title,'Example')][1]/programlisting[1]">
-				<!-- end of section header beginning of function list -->
-				<xsl:text><![CDATA[</th></tr>]]></xsl:text>
-				 <xsl:variable name='plainlisting'>
-					<xsl:call-template name="globalReplace">
-						<xsl:with-param name="outputString" select="."/>
-						<xsl:with-param name="target" select="$lt"/>
-						<xsl:with-param name="replacement" select="'&lt;'"/>
-					</xsl:call-template>
-				</xsl:variable>
-
-				<xsl:variable name='listing'>
-					<xsl:call-template name="break">
-						<xsl:with-param name="text" select="$plainlisting" />
-					</xsl:call-template>
-				</xsl:variable>
-
-				<!-- add row for each function and alternate colors of rows -->
-		 		<![CDATA[<tr]]> class="<xsl:choose><xsl:when test="position() mod 2 = 0">evenrow</xsl:when><xsl:otherwise>oddrow</xsl:otherwise></xsl:choose>"<![CDATA[>]]>
-		 		<![CDATA[<td><b>]]><xsl:value-of select="ancestor::refentry/refnamediv/refname" /><![CDATA[</b><br /><code>]]><xsl:value-of select="$listing"  disable-output-escaping="no"/><![CDATA[</code></td></tr>]]>
-
-		 	</xsl:for-each>
-		 	<!--close section -->
-		 	<![CDATA[</table>]]>
-		 	</xsl:if>
-
-	</xsl:template>
+</xsl:template>
 
 </xsl:stylesheet>
diff --git a/doc/xsl/topology_cheatsheet.html.xsl b/doc/xsl/topology_cheatsheet.html.xsl
index 24562e38f..9783c3a07 100644
--- a/doc/xsl/topology_cheatsheet.html.xsl
+++ b/doc/xsl/topology_cheatsheet.html.xsl
@@ -23,7 +23,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 	<html>
 		<head>
 			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-			<title>PostGIS Topology Cheat Sheet</title>
+			<title>PostGIS Topology Cheatsheet</title>
 
 <!-- TODO: share a parametrizable stylesheet -->
 			<style type="text/css">

-----------------------------------------------------------------------

Summary of changes:
 doc/xsl/common_cheatsheet.xsl              |   4 +-
 doc/xsl/raster_cheatsheet.html.xsl         |   2 +-
 doc/xsl/tiger_geocoder_cheatsheet.html.xsl | 178 ++++++++++++++---------------
 doc/xsl/topology_cheatsheet.html.xsl       |   2 +-
 4 files changed, 92 insertions(+), 94 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list