]> granicus.if.org Git - postgis/commitdiff
more formatting experiments
authorRegina Obe <lr@pcorp.us>
Wed, 2 Nov 2011 06:50:00 +0000 (06:50 +0000)
committerRegina Obe <lr@pcorp.us>
Wed, 2 Nov 2011 06:50:00 +0000 (06:50 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8079 b70326c6-7e19-0410-871a-916f4a2858ee

doc/xsl/postgis_cheatsheet.html.xsl
doc/xsl/raster_cheatsheet.html.xsl

index b8a3e340ef147d5054e2c9b9a675947c0aaf1f88..eca1a87db70573b858e844edb23a668de0af5bf5 100644 (file)
@@ -13,7 +13,7 @@
        <xsl:variable name='new_tag'>Availability: <xsl:value-of select="$postgis_version" /></xsl:variable>\r
        <xsl:variable name='enhanced_tag'>Enhanced: <xsl:value-of select="$postgis_version" /></xsl:variable>\r
        <xsl:variable name='include_examples'>false</xsl:variable>\r
-       <xsl:variable name='output_purpose'>false</xsl:variable>\r
+       <xsl:variable name='output_purpose'>true</xsl:variable>\r
 <xsl:template match="/">\r
        <xsl:text><![CDATA[<html><head><title>PostGIS Cheat Sheet</title>\r
        <style type="text/css">\r
@@ -39,14 +39,13 @@ body {
 #content_examples {\r
        float: left;\r
        width: 100%;\r
-       page-break-before: auto\r
 }\r
 \r
 .section {\r
        border: 1px solid #000;\r
        margin: 4px;\r
        ]]></xsl:text>\r
-       <xsl:choose><xsl:when test="$output_purpose = 'false'"><![CDATA[width: 45%;]]></xsl:when><xsl:otherwise><![CDATA[width: 100%;]]></xsl:otherwise></xsl:choose>\r
+       <xsl:choose><xsl:when test="$output_purpose = 'false'"><![CDATA[width: 425px;]]></xsl:when><xsl:otherwise><![CDATA[width: 100%;]]></xsl:otherwise></xsl:choose>\r
 <xsl:text><![CDATA[    \r
        float: left;\r
 }\r
@@ -82,9 +81,7 @@ body {
 \r
 .func {font-weight: 600}\r
 .func {font-weight: 600}\r
-.func_args {font-size: 7.5pt;font-family:courier;}\r
-.func_args ol {margin: 2px}\r
-.func_args ol li {margin: 5px}\r
+.func_args {font-size: 8pt;font-family:"courier new";float:left}\r
 \r
 .evenrow {\r
        background-color: #eee;\r
@@ -103,7 +100,7 @@ code {font-size: 8pt}
 -->\r
 </style>\r
        </head><body><h1 style='text-align:center'>PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /><xsl:text><![CDATA[ Cheatsheet</h1>]]></xsl:text>\r
-               <xsl:text><![CDATA[<span class='notes'>New in this release <sup>1</sup> Enhanced in this release <sup>2</sup> Requires GEOS 3.3 or higher<sup>g3.3</sup>    &nbsp;2.5/3D support<sup>3g</sup>&nbsp;SQL-MM<sup>mm</sup> &nbsp;Supports geography <sup>G</sup></span><br /><div id="content_functions">]]></xsl:text>\r
+               <xsl:text><![CDATA[<span class='notes'>New in this release <sup>1</sup> Enhanced in this release <sup>2</sup> Requires GEOS 3.3 or higher<sup>g3.3</sup>    &nbsp;2.5/3D support<sup>3d</sup>&nbsp;SQL-MM<sup>mm</sup> &nbsp;Supports geography <sup>G</sup></span><div id="content_functions">]]></xsl:text>\r
                        <xsl:apply-templates select="/book/chapter[@id='reference']" name="function_list" />\r
                        <xsl:text><![CDATA[</div>]]></xsl:text>\r
                        <xsl:text><![CDATA[<div id="content_examples">]]></xsl:text>\r
@@ -117,10 +114,10 @@ code {font-size: 8pt}
                        \r
         \r
     <xsl:template match="chapter" name="function_list">\r
-               <xsl:for-each select="sect1">\r
+               <xsl:for-each select="sect1[count(//funcprototype) &gt; 0]">\r
+                       \r
                        <!--Beginning of section -->\r
-                       <xsl:text><![CDATA[<table class="section"><tr><th colspan="2">]]></xsl:text>\r
-                               <xsl:value-of select="title" />\r
+                       <xsl:text><![CDATA[<table class="section"><tr><th colspan="2">]]></xsl:text><xsl:value-of select="title" />\r
                                <!-- end of section header beginning of function list -->\r
                                <xsl:text><![CDATA[</th></tr>]]></xsl:text>\r
                        <xsl:for-each select="refentry">\r
index 322f55cd775a88338eeca98bc3cc908eb9888ff5..09d5fc93b745a41ea32f44d2cfceb3a5738e24d4 100644 (file)
@@ -12,6 +12,8 @@
        <xsl:variable name='postgis_version'>2.0</xsl:variable>\r
        <xsl:variable name='new_tag'>Availability: <xsl:value-of select="$postgis_version" /></xsl:variable>\r
        <xsl:variable name='enhanced_tag'>Enhanced: <xsl:value-of select="$postgis_version" /></xsl:variable>\r
+       <xsl:variable name='include_examples'>false</xsl:variable>\r
+       <xsl:variable name='output_purpose'>false</xsl:variable>\r
 <xsl:template match="/">\r
        <xsl:text><![CDATA[<html><head><title>PostGIS Raster Cheat Sheet</title>\r
        <style type="text/css">\r
@@ -43,8 +45,9 @@ body {
 .section {\r
        border: 1px solid #000;\r
        margin: 4px;\r
-       width: 50%;\r
-       page-break-after: auto\r
+       ]]></xsl:text>\r
+       <xsl:choose><xsl:when test="$output_purpose = 'false'"><![CDATA[width: 45%;]]></xsl:when><xsl:otherwise><![CDATA[width: 100%;]]></xsl:otherwise></xsl:choose>\r
+<xsl:text><![CDATA[            float: left;\r
 }\r
 \r
 .example {\r
@@ -96,7 +99,7 @@ code {font-size: 8pt}
 -->\r
 </style>\r
        </head><body><h1 style='text-align:center'>PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /><xsl:text><![CDATA[ Raster Cheatsheet</h1>]]></xsl:text>\r
-               <xsl:text><![CDATA[<span class='notes'>New in this release <sup>1</sup> Enhanced in this release <sup>2</sup> Requires GEOS 3.3 or higher<sup>3.3</sup></span><br /><div id="content_functions">]]></xsl:text>\r
+               <xsl:text><![CDATA[<span class='notes'>New in this release <sup>1</sup> Enhanced in this release <sup>2</sup> Requires GEOS 3.3 or higher<sup>g3.3</sup>    &nbsp;2.5/3D support<sup>3d</sup>&nbsp;SQL-MM<sup>mm</sup> &nbsp;Supports geography <sup>G</sup></span> <div id="content_functions">]]></xsl:text>\r
                        <xsl:apply-templates select="/book/chapter[@id='RT_reference']" name="function_list" />\r
                        <xsl:text><![CDATA[</div>]]></xsl:text>\r
                        <xsl:text><![CDATA[<div id="content_examples">]]></xsl:text>\r
@@ -107,7 +110,7 @@ code {font-size: 8pt}
 </xsl:template>\r
                        \r
         \r
-    <xsl:template match="chapter" name="function_list">\r
+  <xsl:template match="chapter" name="function_list">\r
                <xsl:for-each select="sect1">\r
                        <!--Beginning of section -->\r
                        <xsl:text><![CDATA[<table class="section"><tr><th colspan="2">]]></xsl:text>\r
@@ -119,14 +122,17 @@ code {font-size: 8pt}
                                <![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:value-of select="refnamediv/refname" /><![CDATA[</span>]]><xsl:if test="contains(.,$new_tag)"><![CDATA[<sup>1</sup> ]]></xsl:if> \r
                                <!-- enhanced tag -->\r
                                <xsl:if test="contains(.,$enhanced_tag)"><![CDATA[<sup>2</sup> ]]></xsl:if>\r
-                               <xsl:if test="contains(.,'GEOS 3.3')"><![CDATA[<sup>1</sup>]]></xsl:if>\r
+                               <xsl:if test="contains(.,'implements the SQL/MM')"><![CDATA[<sup>mm</sup> ]]></xsl:if>\r
+                               <xsl:if test="contains(refsynopsisdiv/funcsynopsis,'geography') or contains(refsynopsisdiv/funcsynopsis/funcprototype/funcdef,'geography')"><![CDATA[<sup>G</sup>  ]]></xsl:if>\r
+                               <xsl:if test="contains(.,'GEOS &gt;= 3.3')"><![CDATA[<sup>g3.3</sup> ]]></xsl:if>\r
+                               <xsl:if test="contains(.,'This function supports 3d')"><![CDATA[<sup>3D</sup> ]]></xsl:if>\r
                                <!-- if only one proto just dispaly it on first line -->\r
                                <xsl:if test="count(refsynopsisdiv/funcsynopsis/funcprototype) = 1">\r
                                        (<xsl:call-template name="list_in_params"><xsl:with-param name="func" select="refsynopsisdiv/funcsynopsis/funcprototype" /></xsl:call-template>)\r
                                </xsl:if>\r
                                \r
                                <![CDATA[&nbsp;&nbsp;]]>\r
-                               <xsl:value-of select="refnamediv/refpurpose" />\r
+                               <xsl:if test="$output_purpose = 'true'"><xsl:value-of select="refnamediv/refpurpose" /></xsl:if>\r
                                <!-- output different proto arg combos -->\r
                                <xsl:if test="count(refsynopsisdiv/funcsynopsis/funcprototype) &gt; 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>\r
                                <![CDATA[</ol></span>]]></xsl:if>\r