diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/erl_docgen/priv/xsl/db_html.xsl | 123 |
1 files changed, 64 insertions, 59 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index 9730845aac..3b52e17551 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -200,13 +200,12 @@ <xsl:template match="head"> <xsl:param name="local_types"/> <xsl:param name="global_types"/> - <span class="bold_code"> + <span class="bold_code bc-1"> <xsl:apply-templates mode="local_type"> <xsl:with-param name="local_types" select="$local_types"/> <xsl:with-param name="global_types" select="$global_types"/> </xsl:apply-templates> </span> - <br/> </xsl:template> <!-- The *last* <name name="..." arity=".."/> --> @@ -234,7 +233,8 @@ <!-- It is assumed there is no support for overloaded specs (there is no spec with more than one clause) --> <xsl:if test="count($clause/guard) > 0 or count($type) > 0"> - <div class="REFBODY"><p>Types:</p> + <div class="REFBODY fun-types"> + <h3 class="func-types-title">Types:</h3> <xsl:choose> <xsl:when test="$output_subtypes"> @@ -327,13 +327,13 @@ <xsl:for-each select="$subtype"> <xsl:variable name="tname" select="typename"/> - <div class="REFTYPES"> - <span class="bold_code"> - <xsl:apply-templates select="string" mode="local_type"> - <xsl:with-param name="local_types" select="$local_types"/> - <xsl:with-param name="global_types" select="$global_types"/> - </xsl:apply-templates> - </span> + <div class="REFTYPES rt-1"> + <span class="bold_code bc-2"> + <xsl:apply-templates select="string" mode="local_type"> + <xsl:with-param name="local_types" select="$local_types"/> + <xsl:with-param name="global_types" select="$global_types"/> + </xsl:apply-templates> + </span> </div> <xsl:apply-templates select="$type_desc[@variable = $tname]"/> </xsl:for-each> @@ -345,7 +345,7 @@ <xsl:param name="global_types"/> <xsl:for-each select="$local_types"> - <div class="REFTYPES"> + <div class="REFTYPES rt-2"> <xsl:call-template name="type_name"> <xsl:with-param name="mode" select="'local_type'"/> <xsl:with-param name="local_types" select="$local_types"/> @@ -366,7 +366,7 @@ <!-- Similar to <d> --> <xsl:template match="type_desc"> - <div class="REFBODY"> + <div class="REFBODY rb-1"> <xsl:apply-templates/> </div> </xsl:template> @@ -375,7 +375,7 @@ <xsl:template match="all_etypes"> <xsl:for-each select= "$i//type"> <pre> - <span class="bold_code"> + <span class="bold_code bc-3"> <xsl:apply-templates select="typedecl"/> </span><xsl:text> </xsl:text> @@ -388,13 +388,15 @@ <h3> <a name="data-types" href="#data-types"><xsl:text>Data Types</xsl:text></a> </h3> - <xsl:apply-templates/> + <div class="data-types-body"> + <xsl:apply-templates/> + </div> </xsl:template> <!-- Datatype --> <xsl:template match="datatype"> - <p><xsl:apply-templates select="name"/></p> - <xsl:apply-templates select="desc"/> + <div class="data-type-name"><xsl:apply-templates select="name"/></div> + <div class="data-type-desc"><xsl:apply-templates select="desc"/></div> </xsl:template> <!-- The "mode" attribute of apply has been used to separate the case @@ -454,7 +456,7 @@ </xsl:template> <xsl:template match="typehead"> - <span class="bold_code"> + <span class="bold_code bc-4"> <xsl:apply-templates/> </span><br/> </xsl:template> @@ -462,7 +464,7 @@ <xsl:template match="typehead" mode="local_type"> <xsl:param name="local_types"/> <xsl:param name="global_types"/> - <span class="bold_code"> + <span class="bold_code bc-5"> <xsl:apply-templates mode="local_type"> <xsl:with-param name="local_types" select="$local_types"/> <xsl:with-param name="global_types" select="$global_types"/> @@ -473,7 +475,7 @@ <!-- Not used right now --> <!-- local_defs --> <xsl:template match="local_defs"> - <div class="REFBODY"> + <div class="REFBODY rb-2"> <xsl:apply-templates> </xsl:apply-templates> </div> @@ -481,8 +483,8 @@ <!-- Not used right now --> <xsl:template match="local_def"> - <div class="REFTYPES"> - <span class="bold_code"> + <div class="REFTYPES rt-3"> + <span class="bold_code bc-6"> <xsl:apply-templates/> </span> </div> @@ -943,7 +945,7 @@ <xsl:value-of select="title"/> </a> </h3> - <div class="REFBODY"> + <div class="REFBODY rb-3"> <xsl:apply-templates> <xsl:with-param name="chapnum" select="$chapnum"/> </xsl:apply-templates> @@ -957,7 +959,7 @@ <h4> <xsl:value-of select="title"/> </h4> - <div class="REFBODY"> + <div class="REFBODY rb-4"> <xsl:apply-templates> <xsl:with-param name="chapnum" select="$chapnum"/> </xsl:apply-templates> @@ -1777,7 +1779,7 @@ <xsl:template match="module"> <xsl:param name="partnum"/> <h3><a name="module" href="#module">Module</a></h3> - <div class="REFBODY"> + <div class="REFBODY module-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1789,7 +1791,7 @@ <xsl:template match="modulesummary"> <xsl:param name="partnum"/> <h3><a name="module-sumary" href="#module-sumary">Module Summary</a></h3> - <div class="REFBODY"> + <div class="REFBODY module-summary-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1800,7 +1802,7 @@ <xsl:template match="lib"> <xsl:param name="partnum"/> <h3><a name="c-library" href="#c-library">C Library</a></h3> - <div class="REFBODY"> + <div class="REFBODY c-library-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1812,7 +1814,7 @@ <xsl:template match="libsummary"> <xsl:param name="partnum"/> <h3><a name="library-sumary" href="#library-sumary">Library Summary</a></h3> - <div class="REFBODY"> + <div class="REFBODY library-summary-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1823,7 +1825,7 @@ <xsl:template match="com"> <xsl:param name="partnum"/> <h3><a name="command" href="#command">Command</a></h3> - <div class="REFBODY"> + <div class="REFBODY command-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1835,7 +1837,7 @@ <xsl:template match="comsummary"> <xsl:param name="partnum"/> <h3><a name="command-summary" href="#command-summary">Command Summary</a></h3> - <div class="REFBODY"> + <div class="REFBODY command-summary-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1846,7 +1848,7 @@ <xsl:template match="file"> <xsl:param name="partnum"/> <h3><a name="file" href="#file">File</a></h3> - <div class="REFBODY"> + <div class="REFBODY file-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1858,7 +1860,7 @@ <xsl:template match="filesummary"> <xsl:param name="partnum"/> <h3><a name="file-summary" href="#file-summary">File Summary</a></h3> - <div class="REFBODY"> + <div class="REFBODY file-summary-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1870,7 +1872,7 @@ <xsl:template match="app"> <xsl:param name="partnum"/> <h3><a name="application" href="#application">Application</a></h3> - <div class="REFBODY"> + <div class="REFBODY application-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1882,7 +1884,7 @@ <xsl:template match="appsummary"> <xsl:param name="partnum"/> <h3><a name="application-summary" href="#application-summary">Application Summary</a></h3> - <div class="REFBODY"> + <div class="REFBODY application-summary-body"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -1893,7 +1895,7 @@ <xsl:template match="description"> <xsl:param name="partnum"/> <h3><a name="description" href="#description">Description</a></h3> - <div class="REFBODY"> + <div class="REFBODY description-body"> <p> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> @@ -1908,9 +1910,11 @@ <h3><a name="exports" href="#exports"><xsl:text>Exports</xsl:text></a></h3> - <xsl:apply-templates> - <xsl:with-param name="partnum" select="$partnum"/> - </xsl:apply-templates> + <div class="exports-body"> + <xsl:apply-templates> + <xsl:with-param name="partnum" select="$partnum"/> + </xsl:apply-templates> + </div> </xsl:template> @@ -1981,7 +1985,7 @@ <xsl:choose> <xsl:when test="ancestor::cref"> <a name="{substring-before(nametext, '(')}"> - <span class="bold_code"> + <span class="bold_code bc-7"> <xsl:value-of select="ret"/> <xsl:call-template name="maybe-space-after-ret"> <xsl:with-param name="s" select="ret"/> @@ -2008,15 +2012,15 @@ </xsl:variable> <xsl:choose> <xsl:when test="ancestor::datatype"> - <a name="type-{$fname}"></a><span class="bold_code"><xsl:apply-templates/></span><br/> + <a name="type-{$fname}"></a><span class="bold_code bc-8"><xsl:apply-templates/></span><br/> </xsl:when> <xsl:otherwise> - <a name="{$fname}-{$arity}"></a><span class="bold_code"><xsl:apply-templates/></span><br/> + <a name="{$fname}-{$arity}"></a><span class="bold_code bc-9"><xsl:apply-templates/></span><br/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> - <span class="bold_code"><xsl:value-of select="."/></span> + <span class="bold_code bc-10"><xsl:value-of select="."/></span> </xsl:otherwise> </xsl:choose> @@ -2041,12 +2045,13 @@ <!-- The case where @name != 0 is taken care of in "type_name" --> <xsl:if test="string-length(@name) = 0 and string-length(@variable) = 0"> - <div class="REFBODY"><p>Types:</p> + <div class="REFBODY rb-5"> + <h3>Types:</h3> - <xsl:apply-templates> - <xsl:with-param name="partnum" select="$partnum"/> - </xsl:apply-templates> - </div> + <xsl:apply-templates> + <xsl:with-param name="partnum" select="$partnum"/> + </xsl:apply-templates> + </div> </xsl:if> @@ -2056,8 +2061,8 @@ <!-- V --> <xsl:template match="v"> <xsl:param name="partnum"/> - <div class="REFTYPES"> - <span class="bold_code"> + <div class="REFTYPES rt-4"> + <span class="bold_code bc-11"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -2068,7 +2073,7 @@ <!-- D --> <xsl:template match="d"> <xsl:param name="partnum"/> - <div class="REFBODY"> + <div class="REFBODY rb-6"> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> </xsl:apply-templates> @@ -2078,7 +2083,7 @@ <!-- Desc --> <xsl:template match="desc"> <xsl:param name="partnum"/> - <div class="REFBODY"> + <div class="REFBODY rb-7"> <p> <xsl:apply-templates> <xsl:with-param name="partnum" select="$partnum"/> @@ -2095,7 +2100,7 @@ <xsl:template match="input"> - <span class="bold_code"><xsl:apply-templates/></span> + <span class="bold_code bc-12"><xsl:apply-templates/></span> </xsl:template> <xsl:template match="seealso"> @@ -2114,7 +2119,7 @@ <xsl:when test="string-length($app_part) > 0"> <!-- "AppPart:ModPart#Linkpart" --> <xsl:variable name="mod_part"><xsl:value-of select="substring-after($filepart, ':')"/></xsl:variable> - <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$app_part}','{$mod_part}.html#{$linkpart}');"><xsl:apply-templates/></a></span> + <span class="bold_code bc-13"><a href="javascript:erlhref('{$topdocdir}/../','{$app_part}','{$mod_part}.html#{$linkpart}');"><xsl:apply-templates/></a></span> </xsl:when> <xsl:otherwise> <!-- "Filepart#Linkpart (there is no ':' in Filepart) --> @@ -2134,7 +2139,7 @@ <xsl:variable name="app" select="key('mod2app', $filepart)"/> <xsl:choose> <xsl:when test="string-length($app) > 0"> - <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$app}','{$filepart}.html#{$linkpart}');"><xsl:value-of select="$this"/></a></span> + <span class="bold_code bc-14"><a href="javascript:erlhref('{$topdocdir}/../','{$app}','{$filepart}.html#{$linkpart}');"><xsl:value-of select="$this"/></a></span> </xsl:when> <xsl:otherwise> <!-- Unknown application --> @@ -2147,11 +2152,11 @@ </xsl:when> <xsl:when test="string-length($linkpart) > 0"> <!-- Still Filepart#Linkpart (there is no ':' in Filepart --> - <span class="bold_code"><a href="{$filepart}.html#{$linkpart}"><xsl:apply-templates/></a></span> + <span class="bold_code bc-15"><a href="{$filepart}.html#{$linkpart}"><xsl:apply-templates/></a></span> </xsl:when> <xsl:otherwise> <!-- "Filepart#" (there is no ':' in Filepart --> - <span class="bold_code"><a href="{$filepart}.html"><xsl:apply-templates/></a></span> + <span class="bold_code bc-16"><a href="{$filepart}.html"><xsl:apply-templates/></a></span> </xsl:otherwise> </xsl:choose> </xsl:otherwise> @@ -2159,7 +2164,7 @@ </xsl:when> <!-- string-length($filepart) > 0 --> <xsl:when test="string-length($linkpart) > 0"> <!-- "#Linkpart" --> - <span class="bold_code"><a href="#{$linkpart}"><xsl:apply-templates/></a></span> + <span class="bold_code bc-17"><a href="#{$linkpart}"><xsl:apply-templates/></a></span> </xsl:when> <xsl:otherwise> <!-- "AppPart:Mod" or "Mod" (there is no '#') --> @@ -2169,11 +2174,11 @@ <xsl:when test="string-length($app_part) > 0"> <!-- "App:Mod" --> <xsl:variable name="mod_part"><xsl:value-of select="substring-after(@marker, ':')"/></xsl:variable> - <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$app_part}','{$mod_part}.html');"><xsl:apply-templates/></a></span> + <span class="bold_code bc-18"><a href="javascript:erlhref('{$topdocdir}/../','{$app_part}','{$mod_part}.html');"><xsl:apply-templates/></a></span> </xsl:when> <xsl:otherwise> <!-- "Mod" --> - <span class="bold_code"><a href="{@marker}.html"><xsl:apply-templates/></a></span> + <span class="bold_code bc-19"><a href="{@marker}.html"><xsl:apply-templates/></a></span> </xsl:otherwise> </xsl:choose> </xsl:otherwise> @@ -2182,7 +2187,7 @@ </xsl:template> <xsl:template match="url"> - <span class="bold_code"><a href="{@href}"><xsl:apply-templates/></a></span> + <span class="bold_code bc-20"><a href="{@href}"><xsl:apply-templates/></a></span> </xsl:template> <xsl:template match="marker"> |