diff options
author | Hans Nilsson <[email protected]> | 2018-03-29 11:57:11 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-03-29 11:57:11 +0200 |
commit | c7ae37130690648f2934e033c4d8ab9551d61ac9 (patch) | |
tree | 5acd81f869ae20c508b19b6ade143e2f97e2899f | |
parent | 0903ff40fa2e07c4a82e575ec577136b83ef999a (diff) | |
parent | 9c74f13b4d6476fecf80a0fc37e266997c7f3c44 (diff) | |
download | otp-c7ae37130690648f2934e033c4d8ab9551d61ac9.tar.gz otp-c7ae37130690648f2934e033c4d8ab9551d61ac9.tar.bz2 otp-c7ae37130690648f2934e033c4d8ab9551d61ac9.zip |
Merge branch 'hans/erl_docgen/datatype_title/OTP-15000'
* hans/erl_docgen/datatype_title/OTP-15000:
erl_docgen: Add datatype-title tag to datatype tag
-rw-r--r-- | lib/erl_docgen/priv/css/otp_doc.css | 2 | ||||
-rw-r--r-- | lib/erl_docgen/priv/dtd/common.refs.dtd | 3 | ||||
-rw-r--r-- | lib/erl_docgen/priv/xsl/db_html.xsl | 18 | ||||
-rw-r--r-- | lib/erl_docgen/priv/xsl/db_man.xsl | 6 | ||||
-rw-r--r-- | lib/erl_docgen/priv/xsl/db_pdf.xsl | 7 |
5 files changed, 29 insertions, 7 deletions
diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css index 844aad2945..66ea09b53a 100644 --- a/lib/erl_docgen/priv/css/otp_doc.css +++ b/lib/erl_docgen/priv/css/otp_doc.css @@ -242,7 +242,7 @@ th { font-size: small; } -h3>a{ +h3>a, h4>a{ color: #1a1a1a !important; } diff --git a/lib/erl_docgen/priv/dtd/common.refs.dtd b/lib/erl_docgen/priv/dtd/common.refs.dtd index 4f87007a09..172cd16ad4 100644 --- a/lib/erl_docgen/priv/dtd/common.refs.dtd +++ b/lib/erl_docgen/priv/dtd/common.refs.dtd @@ -42,7 +42,8 @@ <!ELEMENT email (#PCDATA) > <!ELEMENT section (marker*,title,(%block;|quote|br|marker| warning|note|dont|do|section)*) > -<!ELEMENT datatypes (datatype)+ > +<!ELEMENT datatypes (datatype_title?,datatype)+ > +<!ELEMENT datatype_title (#PCDATA) > <!ELEMENT datatype (name+,desc?) > <!ELEMENT type_desc (#PCDATA|anno|c|seealso)* > <!ATTLIST type_desc variable CDATA #IMPLIED diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index 5b7eae4f73..f9f3a356be 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -406,15 +406,23 @@ <h3> <a name="data-types" href="#data-types"><xsl:text>Data Types</xsl:text></a> </h3> - <div class="data-types-body"> - <xsl:apply-templates/> - </div> + <xsl:apply-templates/> + </xsl:template> + + <!-- Datatype Title--> + <xsl:template match="datatype_title"> + <xsl:variable name="title" select="."/> + <h4> + <a name="{$title}" href="#{$title}"><xsl:apply-templates/></a> + </h4> </xsl:template> <!-- Datatype --> <xsl:template match="datatype"> - <div class="data-type-name"><xsl:apply-templates select="name"/></div> - <div class="data-type-desc"><xsl:apply-templates select="desc"/></div> + <div class="data-types-body"> + <div class="data-type-name"><xsl:apply-templates select="name"/></div> + <div class="data-type-desc"><xsl:apply-templates select="desc"/></div> + </div> </xsl:template> <!-- The "mode" attribute of apply has been used to separate the case diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl index 03b6b0691d..a5ad7ed5ae 100644 --- a/lib/erl_docgen/priv/xsl/db_man.xsl +++ b/lib/erl_docgen/priv/xsl/db_man.xsl @@ -271,6 +271,12 @@ <xsl:apply-templates/> </xsl:template> + <!-- Datatype Title--> + <xsl:template match="datatype_title"> + <xsl:text> .SS </xsl:text> + <xsl:apply-templates/> + </xsl:template> + <!-- Datatype --> <xsl:template match="datatype"> <xsl:apply-templates/> diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl index 46de66bcd8..05fc79ed71 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl @@ -299,6 +299,13 @@ <xsl:apply-templates/> </xsl:template> + <!-- Datatype Title--> + <xsl:template match="datatype_title"> + <fo:block xsl:use-attribute-sets="h4"> + <xsl:apply-templates/> + </fo:block> + </xsl:template> + <!-- Datatype --> <xsl:template match="datatype"> <fo:block xsl:use-attribute-sets="function-name"> |