[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1208-g4c7fc0145
git at osgeo.org
git at osgeo.org
Wed Jul 12 01:19:14 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 4c7fc01454a3ae81ef03952e5d7715f937451c11 (commit)
from a53150336c03aa34887a0f451240e9aaf6ee3d56 (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 4c7fc01454a3ae81ef03952e5d7715f937451c11
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Jul 12 10:17:46 2023 +0200
Use html output rather than text for postgis_cheatsheet
Moves toward easier internationalization of headers
References #5435
diff --git a/doc/xsl/postgis_cheatsheet.html.xsl b/doc/xsl/postgis_cheatsheet.html.xsl
index a37d1c5ce..7a587ed8b 100644
--- a/doc/xsl/postgis_cheatsheet.html.xsl
+++ b/doc/xsl/postgis_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,14 @@
<xsl:include href="common_utils.xsl" />
<xsl:include href="common_cheatsheet.xsl" />
- <xsl:output method="text" />
+ <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 Cheat Sheet</title>
- <style type="text/css">
-<!--
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>PostGIS Cheat Sheet</title>
+ <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 }
@@ -32,7 +34,12 @@ body {
@media screen { a , a:hover, a:focus, a:active{text-decoration: underline} }
.comment {font-size:x-small;color:green;font-family:"courier new"}
-.notes {font-size:x-small;color:#dd1111;font-weight:500;font-family:verdana}
+.notes {
+ font-size:x-small;
+ color:#dd1111;
+ font-weight:500;
+ font-family:verdana;
+}
#example_heading {
border-bottom: 1px solid #000;
margin: 10px 15px 10px 85px;
@@ -64,9 +71,9 @@ body {
.section {
border: 1px solid #000;
margin: 4px;
- ]]></xsl:text>
- <xsl:choose><xsl:when test="$output_purpose = 'false'"><![CDATA[width: 100%]]></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>
+
float: left;
}
@@ -117,25 +124,31 @@ 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[ Cheatsheet</h1>]]></xsl:text>
- <xsl:text><![CDATA[<span class='notes'>New in this release <sup>1</sup> Enhanced in this release <sup>2</sup> aggregate <sup>agg</sup> window function <sup>W</sup> Requires GEOS 3.9 or higher<sup>g3.9</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='reference']" />
- <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="//chapter[@id='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" /> Cheatsheet</h1>
+ <span class='notes'>
+ <!-- TODO: make text equally distributed horizontally ? -->
+ New in this release <sup>1</sup>
+ Enhanced in this release <sup>2</sup>
+ Aggregate <sup>agg</sup>
+ Window function <sup>W</sup>
+ Requires GEOS 3.9 or higher<sup>g3.9</sup>
+ 2.5/3D support<sup>3d</sup>
+ SQL-MM<sup>mm</sup>
+ Supports geography <sup>G</sup>
+ </span>
+ <div id="content_functions">
+ <xsl:apply-templates select="/book/chapter[@id='reference']" />
+ </div>
+ </body>
+ </html>
</xsl:template>
<xsl:template match="chapter" name="function_list">
- <![CDATA[<div id="content_functions_left">]]>
+
+ <div id="content_functions_left">
<xsl:variable name="col_func_count"><xsl:value-of select="count(descendant::*//funcprototype) div 1.65" /></xsl:variable>
@@ -145,80 +158,59 @@ code {font-size: 8pt}
<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">]]>
+ <![CDATA[
+ </div><div id="content_functions_right">
+ ]]>
</xsl:if>
<!--Beginning of section -->
- <xsl:text><![CDATA[<table class="section"><tr><th colspan="2">]]></xsl:text><xsl:value-of select="title" />
+ <table class="section"><tr><th colspan="2"><xsl:value-of select="title" />
<!-- end of section header beginning of function list -->
- <xsl:text><![CDATA[</th></tr>]]></xsl:text>
+ </th></tr>
<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>
+ <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)"><![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>
+ <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>
- <![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,'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: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>
- <![CDATA[</table><br />]]>
+ </table><br />
<!--close section -->
</xsl:for-each>
- <![CDATA[</div>]]>
-
- </xsl:template>
-
- <xsl:template match="sect1[//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="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="'<'"/>
- </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 -->
-
+ </div>
</xsl:template>
-----------------------------------------------------------------------
Summary of changes:
doc/xsl/postgis_cheatsheet.html.xsl | 158 +++++++++++++++++-------------------
1 file changed, 75 insertions(+), 83 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list