[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1217-g77dc645cf
git at osgeo.org
git at osgeo.org
Wed Jul 12 06:10:03 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 77dc645cfc9b252f768fdf14499a421b92b20f0f (commit)
from d92ef780d2183eb70fd831125657ffa01bea6edb (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 77dc645cfc9b252f768fdf14499a421b92b20f0f
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Jul 12 15:09:40 2023 +0200
Share example_list template and fix tiger_geocoder sheet
diff --git a/doc/xsl/common_cheatsheet.xsl b/doc/xsl/common_cheatsheet.xsl
index 782ac582d..bf17b37aa 100644
--- a/doc/xsl/common_cheatsheet.xsl
+++ b/doc/xsl/common_cheatsheet.xsl
@@ -131,5 +131,45 @@
<!--close section -->
</xsl:template>
+<xsl:template 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>
</xsl:stylesheet>
diff --git a/doc/xsl/tiger_geocoder_cheatsheet.html.xsl b/doc/xsl/tiger_geocoder_cheatsheet.html.xsl
index e09d9497e..44ef45031 100644
--- a/doc/xsl/tiger_geocoder_cheatsheet.html.xsl
+++ b/doc/xsl/tiger_geocoder_cheatsheet.html.xsl
@@ -117,55 +117,17 @@ h1 {
-->
</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]" />
+ <!-- examples go here | TODO: move this logic to the chapter template ?-->
+ <xsl:for-each select="/book/chapter[@id=$chapter_id]/sect1[count(//refentry//refsection//programlisting) > 0]" >
+ <xsl:call-template name="examples_list" />
+ </xsl:for-each>
+
</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>
-
</xsl:stylesheet>
-----------------------------------------------------------------------
Summary of changes:
doc/xsl/common_cheatsheet.xsl | 40 ++++++++++++++++++++++++
doc/xsl/tiger_geocoder_cheatsheet.html.xsl | 50 ++++--------------------------
2 files changed, 46 insertions(+), 44 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list