[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1212-g157855783

git at osgeo.org git at osgeo.org
Wed Jul 12 02:37:50 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  1578557830fe1e020eb8fb5cfd528815b0b5a440 (commit)
      from  4632321f1498e35cdc5c53cdcd122c571eb990d1 (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 1578557830fe1e020eb8fb5cfd528815b0b5a440
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Jul 12 11:37:01 2023 +0200

    Make raster cheatsheet legend translatable, share template

diff --git a/doc/xsl/common_cheatsheet.xsl b/doc/xsl/common_cheatsheet.xsl
index 6ee0faa64..9453eb061 100644
--- a/doc/xsl/common_cheatsheet.xsl
+++ b/doc/xsl/common_cheatsheet.xsl
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
+
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:variable name='new_tag'>Availability: <xsl:value-of select="$postgis_version" /></xsl:variable>
@@ -44,5 +46,73 @@
 	</xsl:choose>
 </xsl:template>
 
+<xsl:template match="chapter" name="function_list_html">
+
+	<div id="content_functions_left">
+
+		<xsl:variable name="col_func_count"><xsl:value-of select="count(descendant::*//funcprototype) div 1.65" /></xsl:variable>
+
+    <!--count(preceding-sibling::*/refentry/refsynopsisdiv/funcsynopsis/funcprototype)-->
+		<xsl:for-each select="sect1[count(//funcprototype) > 0 and not( contains(@id,'sfcgal') )]">
+
+			<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" />
+				<!-- end of section header beginning of function list -->
+				</th></tr>
+			<xsl:for-each select="current()//refentry">
+				<!-- add row for each function and alternate colors of rows -->
+				<!-- , hyperlink to online manual -->
+				<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 colspan='2'>
+					<span class='func'>
+						<a target="_blank">
+							<xsl:attribute name="href">
+								<xsl:value-of select="concat(concat($linkstub, @id), '.html')" />
+							</xsl:attribute>
+							<xsl:value-of select="refnamediv/refname" />
+						</a>
+					</span>
+				<xsl:if test="contains(.,$new_tag)"><sup>1</sup> </xsl:if>
+		 		<!-- enhanced tag -->
+		 		<xsl:if test="contains(.,$enhanced_tag)"><sup>2</sup> </xsl:if>
+		 		<xsl:if test="contains(.,'implements the SQL/MM')"><sup>mm</sup> </xsl:if>
+		 		<xsl:if test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')"><sup>G</sup>  </xsl:if>
+		 		<xsl:if test="contains(.,'GEOS >= 3.9')"><sup>g3.9</sup> </xsl:if>
+		 		<xsl:if test="contains(.,'This function supports 3d')"><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>
+
+		 		  
+		 		<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"><span class='func_args'><ol><xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype"><li><xsl:call-template name="list_in_params"><xsl:with-param name="func" select="." /></xsl:call-template><xsl:if test=".//paramdef[contains(type,' set')] or .//paramdef[contains(type,'geography set')] or
+						.//paramdef[contains(type,'raster set')]"><sup> agg</sup> </xsl:if><xsl:if test=".//paramdef[contains(type,'winset')]"> <sup>W</sup> </xsl:if></li></xsl:for-each>
+		 		</ol></span></xsl:if>
+		 		</td></tr>
+		 		</xsl:for-each>
+		 		</table><br />
+		 		<!--close section -->
+		 	</xsl:for-each>
+		</div>
+
+</xsl:template>
+
 
 </xsl:stylesheet>
diff --git a/doc/xsl/postgis_cheatsheet.html.xsl b/doc/xsl/postgis_cheatsheet.html.xsl
index 699c99341..decd0fa31 100644
--- a/doc/xsl/postgis_cheatsheet.html.xsl
+++ b/doc/xsl/postgis_cheatsheet.html.xsl
@@ -152,73 +152,4 @@ code {font-size: 8pt}
 	</html>
 </xsl:template>
 
-
-    <xsl:template match="chapter" name="function_list">
-
-			<div id="content_functions_left">
-
-    	<xsl:variable name="col_func_count"><xsl:value-of select="count(descendant::*//funcprototype) div 1.65" /></xsl:variable>
-
-    <!--count(preceding-sibling::*/refentry/refsynopsisdiv/funcsynopsis/funcprototype)-->
-		<xsl:for-each select="sect1[count(//funcprototype) > 0 and not( contains(@id,'sfcgal') )]">
-
-			<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" />
-				<!-- end of section header beginning of function list -->
-				</th></tr>
-			<xsl:for-each select="current()//refentry">
-				<!-- add row for each function and alternate colors of rows -->
-				<!-- , hyperlink to online manual -->
-				<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 colspan='2'>
-					<span class='func'>
-						<a target="_blank">
-							<xsl:attribute name="href">
-								<xsl:value-of select="concat(concat($linkstub, @id), '.html')" />
-							</xsl:attribute>
-							<xsl:value-of select="refnamediv/refname" />
-						</a>
-					</span>
-				<xsl:if test="contains(.,$new_tag)"><sup>1</sup> </xsl:if>
-		 		<!-- enhanced tag -->
-		 		<xsl:if test="contains(.,$enhanced_tag)"><sup>2</sup> </xsl:if>
-		 		<xsl:if test="contains(.,'implements the SQL/MM')"><sup>mm</sup> </xsl:if>
-		 		<xsl:if test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')"><sup>G</sup>  </xsl:if>
-		 		<xsl:if test="contains(.,'GEOS >= 3.9')"><sup>g3.9</sup> </xsl:if>
-		 		<xsl:if test="contains(.,'This function supports 3d')"><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>
-
-		 		  
-		 		<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"><span class='func_args'><ol><xsl:for-each select="refsynopsisdiv/funcsynopsis/funcprototype"><li><xsl:call-template name="list_in_params"><xsl:with-param name="func" select="." /></xsl:call-template><xsl:if test=".//paramdef[contains(type,' set')] or .//paramdef[contains(type,'geography set')] or
-						.//paramdef[contains(type,'raster set')]"><sup> agg</sup> </xsl:if><xsl:if test=".//paramdef[contains(type,'winset')]"> <sup>W</sup> </xsl:if></li></xsl:for-each>
-		 		</ol></span></xsl:if>
-		 		</td></tr>
-		 		</xsl:for-each>
-		 		</table><br />
-		 		<!--close section -->
-		 	</xsl:for-each>
-		</div>
-
-	</xsl:template>
-
 </xsl:stylesheet>
diff --git a/doc/xsl/raster_cheatsheet.html.xsl b/doc/xsl/raster_cheatsheet.html.xsl
index 38ce371ba..0f158a046 100644
--- a/doc/xsl/raster_cheatsheet.html.xsl
+++ b/doc/xsl/raster_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,18 @@
 	<xsl:include href="common_utils.xsl" />
 	<xsl:include href="common_cheatsheet.xsl" />
 
-	<xsl:output method="text" />
+  <xsl:variable name="chapter_id" select='"RT_reference"' />
+
+	<xsl:output method="html" />
 
 <xsl:template match="/">
-	<xsl:text><![CDATA[<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>PostGIS Raster Cheat Sheet</title>
-	<style type="text/css">
-<!--
+	<html>
+		<head>
+			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+			<title>PostGIS Raster Cheat Sheet</title>
+
+<!-- TODO: share a parametrizable stylecheet -->
+			<style type="text/css">
 table { page-break-inside:avoid; page-break-after:auto }
 tr    { page-break-inside:avoid; page-break-after:avoid }
 thead { display:table-header-group }
@@ -52,9 +58,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[		float: left;
+	<xsl:choose><xsl:when test="$output_purpose = 'false'">width: 100%</xsl:when><xsl:otherwise>width: 100%;</xsl:otherwise></xsl:choose>
+	float: left;
 }
 
 .example {
@@ -103,96 +108,33 @@ h1 {
 	font-size: 14pt;
 }
 code {font-size: 8pt}
--->
-</style>
-	</head><body><h1 style='text-align:center'>PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /><xsl:text><![CDATA[ Raster Cheatsheet</h1>]]></xsl:text>
-		<xsl:text><![CDATA[<span class='notes'>New in this release <sup>1</sup> Enhanced in this release <sup>2</sup> Requires GEOS 3.9 or higher<sup>g3.9</sup>  aggregate <sup>agg</sup>      2.5/3D support<sup>3d</sup> SQL-MM<sup>mm</sup>  Supports geography <sup>G</sup></span> <div id="content_functions">]]></xsl:text>
-			<xsl:apply-templates select="/book/chapter[@id='RT_reference']" name="function_list" />
-			<xsl:text><![CDATA[</div>]]></xsl:text>
-			<xsl:text><![CDATA[<div id="content_examples">]]></xsl:text>
-			<!-- examples go here -->
-			<xsl:if test="$include_examples='true'">
-				<xsl:apply-templates select="/book/chapter[@id='RT_reference']/sect1[count(//refentry//refsection//programlisting) > 0]"  />
-			</xsl:if>
-			<xsl:text><![CDATA[</div>]]></xsl:text>
-			<xsl:text><![CDATA[</body></html>]]></xsl:text>
+			</style>
+		</head>
+		<body><h1 style='text-align:center'>PostGIS <xsl:value-of select="$postgis_version" /> Raster 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>
+			</span>
+			<div id="content_functions">
+				<xsl:apply-templates select="/book/chapter[@id=$chapter_id]" />
+			</div>
+		</body>
+	</html>
 </xsl:template>
 
 
-  <xsl:template match="chapter" name="function_list">
-		<xsl:for-each select="sect1[//funcprototype]">
-			<!--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="current()//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.9')"><![CDATA[<sup>g3.9</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 test=".//paramdef[contains(type,'setof')] or .//paramdef[contains(type,'geography set')] or
-						.//paramdef[contains(type,'raster set')]"><![CDATA[<sup> agg</sup> ]]></xsl:if><xsl:if test=".//paramdef[contains(type,'winset')]"><![CDATA[ <sup>W</sup> ]]></xsl:if>)
-		 		</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><xsl:if test=".//paramdef[contains(type,' set')] or .//paramdef[contains(type,'setof')] or .//paramdef[contains(type,'geography set')] or
-						.//paramdef[contains(type,'raster set') ]"><![CDATA[<sup> agg</sup> ]]></xsl:if><xsl:if test=".//paramdef[contains(type,'winset')]"><![CDATA[ <sup>W</sup> ]]></xsl:if><![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[//refentry//refsection/programlisting]">
-	 		<!-- less than needed for converting html tags in listings so they are printable -->
-	 		<xsl:variable name="lt"><xsl:text><![CDATA[<]]></xsl:text></xsl:variable>
-	 		<!-- only print section header if it has examples - not sure why this is necessary -->
-	 		<xsl:if test="refentry/refsection/programlisting">
-			<!--Beginning of section -->
-				<xsl:text><![CDATA[<table class='example'><tr><th colspan="2" class="example_heading">]]></xsl:text>
-				<xsl:value-of select="title" /> Examples
-				<!-- end of section header beginning of function list -->
-				<xsl:text><![CDATA[</th></tr>]]></xsl:text>
-				<!--only pull the first example section of each function -->
-			<xsl:for-each select="refentry//refsection[contains(title,'Example')][1]/programlisting[1]">
-
-				 <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>
-		 	<![CDATA[</table>]]>
-		 	</xsl:if>
-		 	<!--close section -->
-
-
-	</xsl:template>
-
 </xsl:stylesheet>

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

Summary of changes:
 doc/xsl/common_cheatsheet.xsl       |  70 ++++++++++++++++++
 doc/xsl/postgis_cheatsheet.html.xsl |  69 ------------------
 doc/xsl/raster_cheatsheet.html.xsl  | 142 +++++++++++-------------------------
 3 files changed, 112 insertions(+), 169 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list