[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1218-g2c159bc11

git at osgeo.org git at osgeo.org
Wed Jul 12 06:49:17 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  2c159bc11da0a5e62c4f8a68f07dbf3815e39dbc (commit)
      from  77dc645cfc9b252f768fdf14499a421b92b20f0f (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 2c159bc11da0a5e62c4f8a68f07dbf3815e39dbc
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Jul 12 15:48:39 2023 +0200

    Fix cheatsheet conformance labeling for translated versions
    
    References #5435

diff --git a/doc/xsl/common_cheatsheet.xsl b/doc/xsl/common_cheatsheet.xsl
index bf17b37aa..85f757841 100644
--- a/doc/xsl/common_cheatsheet.xsl
+++ b/doc/xsl/common_cheatsheet.xsl
@@ -3,8 +3,12 @@
 
 <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>
-<xsl:variable name='enhanced_tag'>Enhanced: <xsl:value-of select="$postgis_version" /></xsl:variable>
+<xsl:variable name='new_tag' select='"availability"' />
+<xsl:variable name='enhanced_tag' select='"enhanced"' />
+<xsl:variable name='sqlmm_conformance_tag' select='"sqlmm"' />
+<xsl:variable name='Z_conformance_tag' select='"3d"' />
+<xsl:variable name='geography_tag' select='"geography_support"' />
+
 <xsl:variable name='include_examples'>false</xsl:variable>
 <xsl:variable name='output_purpose'>true</xsl:variable>
 <xsl:variable name='linkstub'>https://postgis.net/docs/manual-<xsl:value-of select="$postgis_version" />/<xsl:value-of select="$postgis_language" /></xsl:variable>
@@ -76,6 +80,9 @@
 		<!-- end of section header beginning of function list -->
 		</th></tr>
 	<xsl:for-each select="current()//refentry">
+
+		<xsl:variable name="ref" select="." />
+
 		<!-- add row for each function and alternate colors of rows -->
 		<!-- , hyperlink to online manual -->
 		<tr>
@@ -95,22 +102,23 @@
 					<xsl:value-of select="refnamediv/refname" />
 				</a>
 			</span>
-		<xsl:if test="contains(.,$new_tag)">
+		<xsl:if test="$ref//para[@role=$new_tag and starts-with(./@conformance, $postgis_version)]">
 			 <sup>1</sup>
 		</xsl:if>
-		<xsl:if test="contains(.,$enhanced_tag)">
+		<xsl:if test="$ref//para[@role=$enhanced_tag and starts-with(./@conformance, $postgis_version)]">
 			 <sup>2</sup>
 		</xsl:if>
-		<xsl:if test="contains(.,'implements the SQL/MM')">
+		<xsl:if test="$ref/descendant::*[@conformance=$sqlmm_conformance_tag]">
 			 <sup>mm</sup>
 		</xsl:if>
 		<xsl:if test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')">
 			 <sup>G</sup>
 		</xsl:if>
+		<!-- TODO: make language-agnostic -->
 		<xsl:if test="contains(.,'GEOS >= 3.9')">
 			 <sup>g3.9</sup>
 		</xsl:if>
-		<xsl:if test="contains(.,'This function supports 3d')">
+		<xsl:if test="$ref/descendant::*[@conformance=$Z_conformance_tag]">
 			 <sup>3d</sup>
 		</xsl:if>
 
@@ -140,6 +148,7 @@
 	<table>
 		<tr>
 			<th colspan="2" class="example_heading">
+				<!-- TODO: make Examples translatable -->
 				<xsl:value-of select="title" /> Examples
 			</th>
 		</tr>

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

Summary of changes:
 doc/xsl/common_cheatsheet.xsl | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list