[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1216-gd92ef780d

git at osgeo.org git at osgeo.org
Wed Jul 12 04:01:13 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  d92ef780d2183eb70fd831125657ffa01bea6edb (commit)
       via  f8adda875cdf101423ce340308ad96b43121ee93 (commit)
      from  b7e9771603f21ee28fcca99f4cf0de268e470b0a (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 d92ef780d2183eb70fd831125657ffa01bea6edb
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Jul 12 13:01:01 2023 +0200

    Refactor sfcgal cheatsheet to use shared templates
    
    References #5435

diff --git a/doc/xsl/common_cheatsheet.xsl b/doc/xsl/common_cheatsheet.xsl
index af4a8e92b..782ac582d 100644
--- a/doc/xsl/common_cheatsheet.xsl
+++ b/doc/xsl/common_cheatsheet.xsl
@@ -55,63 +55,80 @@
     <!--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:apply-templates select="." />
+
+		</xsl:for-each>
+	</div>
+
+</xsl:template>
+
+<xsl:template match="sect1">
+	<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 ">
-					</div><div id="content_functions_right">
-			</xsl:if>
+	<xsl:if test="$col_cur >$col_func_count and count(preceding-sibling::*//funcprototype) < $col_func_count ">
+			</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>
+	<!--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>
-
-				<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:value-of select="refnamediv/refname" />
+				</a>
+			</span>
+		<xsl:if test="contains(.,$new_tag)">
+			 <sup>1</sup>
+		</xsl:if>
+		<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:template>
 
 
diff --git a/doc/xsl/sfcgal_cheatsheet.html.xsl b/doc/xsl/sfcgal_cheatsheet.html.xsl
index 929347f90..3a3fc6303 100644
--- a/doc/xsl/sfcgal_cheatsheet.html.xsl
+++ b/doc/xsl/sfcgal_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 SFCGAL Cheat Sheet</title>
-	<style type="text/css">
-<!--
+	<html>
+		<head>
+			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+			<title>PostGIS SFCGAL Cheatsheet</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 }
@@ -50,9 +56,9 @@ body {
 
 .section {
 	border: 1px solid #000; float:left;
-	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[	}
+	margin: 4px;
+	<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;
 	color: #fff;
@@ -86,90 +92,35 @@ h1 {
 	padding: 0px;
 	font-size: 14pt;
 }
-
+			</style>
+		</head>
+		<body><h1 style='text-align:center'>PostGIS <xsl:value-of select="$postgis_version" /> SFCGAL 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>  
 -->
-</style>
-	</head><body><h1 style='text-align:center'>PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /><xsl:text><![CDATA[ PostGIS SFCGAL Cheatsheet</h1>]]></xsl:text>
-		<!--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:apply-templates select="/book/chapter/sect1[@id='reference_sfcgal']" name="function_list" />
-		<!--close section -->
-	 	<![CDATA[</table>]]>
-			<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/sect1[@id='reference_sfcgal']/refentry[count(//refsection//programlisting) > 0]" />
-			</xsl:if>
-			<xsl:text><![CDATA[</div>]]></xsl:text>
-			<xsl:text><![CDATA[</body></html>]]></xsl:text>
+				<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/sect1[@id='reference_sfcgal']" />
+			</div>
+		</body>
+	</html>
 </xsl:template>
 
 
-    <xsl:template match="refentry" name="function_list">
-		<!-- 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.4')"><![CDATA[<sup>g3.4</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:template>
-
-	 <xsl:template match="//refentry//refsection[contains(title,'Example')]">
-	 		<!-- 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="contains(., 'Example')">
-			<!--Beginning of section -->
-				<xsl:text><![CDATA[<table><tr><th colspan="2" class="example_heading">]]></xsl:text>
-				<xsl:value-of select="title" /> Examples
-				<!--only pull the first example section 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>
-		 	<![CDATA[</table>]]>
-		 	</xsl:if>
-		 	<!--close section -->
-
-
-	</xsl:template>
-
 </xsl:stylesheet>

commit f8adda875cdf101423ce340308ad96b43121ee93
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Jul 12 12:30:20 2023 +0200

    Encode dependency on common stylesheets for cheatsheets

diff --git a/doc/Makefile.in b/doc/Makefile.in
index efa1a400f..545d5d40e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -304,7 +304,7 @@ endif
 $(GENERATED_COMMENT_FILES): %.sql: xsl/%.sql.xsl $(XML_INPUTS) postgis-out.xml
 	$(XSLTPROC) --novalid $(XSLTPROC_PATH_OPT) -o $@ $< postgis-out.xml
 
-$(GENERATED_CHEATSHEET_FILES): html/%$(DOCSUFFIX).html: xsl/%.html.xsl $(XML_INPUTS) postgis-out.xml
+$(GENERATED_CHEATSHEET_FILES): html/%$(DOCSUFFIX).html: xsl/%.html.xsl $(XML_INPUTS) postgis-out.xml xsl/common_cheatsheet.xsl xsl/common_utils.xsl
 	$(XSLTPROC) --novalid $(XSLTPROC_PATH_OPT) $(XSLTPROC_CUSTOM_VARS) -o $@ $< postgis-out.xml
 
 # TODO: use a postgis_release_version variable passed via --stringparam

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

Summary of changes:
 doc/Makefile.in                    |   2 +-
 doc/xsl/common_cheatsheet.xsl      | 121 ++++++++++++++++++--------------
 doc/xsl/sfcgal_cheatsheet.html.xsl | 137 ++++++++++++-------------------------
 3 files changed, 114 insertions(+), 146 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list