aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/erl_docgen')
-rw-r--r--lib/erl_docgen/Makefile2
-rw-r--r--lib/erl_docgen/doc/src/Makefile2
-rw-r--r--lib/erl_docgen/doc/src/block_tags.xml2
-rw-r--r--lib/erl_docgen/doc/src/book.xml2
-rw-r--r--lib/erl_docgen/doc/src/character_entities.xml2
-rw-r--r--lib/erl_docgen/doc/src/doc-build.xml2
-rw-r--r--lib/erl_docgen/doc/src/docgen_xml_check.xml2
-rw-r--r--lib/erl_docgen/doc/src/erl_docgen_app.xml2
-rw-r--r--lib/erl_docgen/doc/src/fasc_dtds.xml2
-rw-r--r--lib/erl_docgen/doc/src/header_tags.xml2
-rw-r--r--lib/erl_docgen/doc/src/inline_tags.xml2
-rw-r--r--lib/erl_docgen/doc/src/notes.xml116
-rw-r--r--lib/erl_docgen/doc/src/overview.xml2
-rw-r--r--lib/erl_docgen/doc/src/part.xml2
-rw-r--r--lib/erl_docgen/doc/src/ref_man.xml2
-rw-r--r--lib/erl_docgen/doc/src/refman_dtds.xml2
-rw-r--r--lib/erl_docgen/doc/src/user_guide_dtds.xml2
-rw-r--r--lib/erl_docgen/priv/bin/Makefile2
-rwxr-xr-xlib/erl_docgen/priv/bin/codeline_preprocessing.escript2
-rw-r--r--lib/erl_docgen/priv/bin/specs_gen.escript2
-rwxr-xr-xlib/erl_docgen/priv/bin/xml_from_edoc.escript2
-rwxr-xr-xlib/erl_docgen/priv/bin/xref_mod_app.escript4
-rw-r--r--lib/erl_docgen/priv/css/Makefile5
-rw-r--r--lib/erl_docgen/priv/css/highlight.css96
-rw-r--r--lib/erl_docgen/priv/css/otp_doc.css229
-rw-r--r--lib/erl_docgen/priv/dtd/Makefile2
-rw-r--r--lib/erl_docgen/priv/dtd/common.dtd7
-rw-r--r--lib/erl_docgen/priv/dtd/erlref.dtd2
-rw-r--r--lib/erl_docgen/priv/dtd_html_entities/Makefile2
-rw-r--r--lib/erl_docgen/priv/dtd_man_entities/Makefile2
-rw-r--r--lib/erl_docgen/priv/fop.xconf2
-rw-r--r--lib/erl_docgen/priv/images/Makefile2
-rw-r--r--lib/erl_docgen/priv/images/erlang-logo.gifbin11588 -> 3342 bytes
-rw-r--r--lib/erl_docgen/priv/images/erlang-logo.pngbin14795 -> 5837 bytes
-rw-r--r--lib/erl_docgen/priv/js/flipmenu/Makefile3
-rw-r--r--lib/erl_docgen/priv/js/flipmenu/flip_closed.gifbin82 -> 79 bytes
-rw-r--r--lib/erl_docgen/priv/js/flipmenu/flip_open.gifbin86 -> 85 bytes
-rw-r--r--lib/erl_docgen/priv/js/flipmenu/flip_static.gifbin109 -> 132 bytes
-rw-r--r--lib/erl_docgen/priv/js/highlight.js39
-rw-r--r--lib/erl_docgen/priv/js/highlight.pack.js2
-rw-r--r--lib/erl_docgen/priv/xsl/Makefile2
-rw-r--r--lib/erl_docgen/priv/xsl/db_eix.xsl2
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl459
-rw-r--r--lib/erl_docgen/priv/xsl/db_html_params.xsl2
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl14
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl28
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf_params.xsl2
-rw-r--r--lib/erl_docgen/src/Makefile2
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl162
-rw-r--r--lib/erl_docgen/src/docgen_otp_specs.erl32
-rw-r--r--lib/erl_docgen/src/docgen_xmerl_xml_cb.erl2
-rw-r--r--lib/erl_docgen/src/erl_docgen.appup.src2
-rw-r--r--lib/erl_docgen/test/Makefile2
-rw-r--r--lib/erl_docgen/test/erl_docgen_SUITE.erl10
-rw-r--r--lib/erl_docgen/vsn.mk2
55 files changed, 935 insertions, 341 deletions
diff --git a/lib/erl_docgen/Makefile b/lib/erl_docgen/Makefile
index 2f62db3442..30ff2bf16e 100644
--- a/lib/erl_docgen/Makefile
+++ b/lib/erl_docgen/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1996-2011. All Rights Reserved.
+# Copyright Ericsson AB 1996-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/doc/src/Makefile b/lib/erl_docgen/doc/src/Makefile
index 3a6d3d04c6..a9110e4635 100644
--- a/lib/erl_docgen/doc/src/Makefile
+++ b/lib/erl_docgen/doc/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2011-2012. All Rights Reserved.
+# Copyright Ericsson AB 2011-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/doc/src/block_tags.xml b/lib/erl_docgen/doc/src/block_tags.xml
index cf8c425bc2..ceed9305f4 100644
--- a/lib/erl_docgen/doc/src/block_tags.xml
+++ b/lib/erl_docgen/doc/src/block_tags.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/book.xml b/lib/erl_docgen/doc/src/book.xml
index 2fa02e359a..b32ae42673 100644
--- a/lib/erl_docgen/doc/src/book.xml
+++ b/lib/erl_docgen/doc/src/book.xml
@@ -4,7 +4,7 @@
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<header titlestyle="normal">
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/character_entities.xml b/lib/erl_docgen/doc/src/character_entities.xml
index e189d7cb6c..65cb07cf7c 100644
--- a/lib/erl_docgen/doc/src/character_entities.xml
+++ b/lib/erl_docgen/doc/src/character_entities.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/doc-build.xml b/lib/erl_docgen/doc/src/doc-build.xml
index 76129128eb..3ea8798639 100644
--- a/lib/erl_docgen/doc/src/doc-build.xml
+++ b/lib/erl_docgen/doc/src/doc-build.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/docgen_xml_check.xml b/lib/erl_docgen/doc/src/docgen_xml_check.xml
index 2351463770..68253edef7 100644
--- a/lib/erl_docgen/doc/src/docgen_xml_check.xml
+++ b/lib/erl_docgen/doc/src/docgen_xml_check.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2007</year>
- <year>2013</year>
+ <year>2016</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/erl_docgen_app.xml b/lib/erl_docgen/doc/src/erl_docgen_app.xml
index 58c2a24f4b..8b36fd5a0a 100644
--- a/lib/erl_docgen/doc/src/erl_docgen_app.xml
+++ b/lib/erl_docgen/doc/src/erl_docgen_app.xml
@@ -4,7 +4,7 @@
<appref>
<header>
<copyright>
- <year>2011</year><year>2013</year>
+ <year>2011</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/fasc_dtds.xml b/lib/erl_docgen/doc/src/fasc_dtds.xml
index a212d58ef5..390ae6c5d1 100644
--- a/lib/erl_docgen/doc/src/fasc_dtds.xml
+++ b/lib/erl_docgen/doc/src/fasc_dtds.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2007</year><year>2013</year>
+ <year>2007</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/header_tags.xml b/lib/erl_docgen/doc/src/header_tags.xml
index 76472b5cce..a34ae2d562 100644
--- a/lib/erl_docgen/doc/src/header_tags.xml
+++ b/lib/erl_docgen/doc/src/header_tags.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/inline_tags.xml b/lib/erl_docgen/doc/src/inline_tags.xml
index 187c6c308a..25b0cd4d87 100644
--- a/lib/erl_docgen/doc/src/inline_tags.xml
+++ b/lib/erl_docgen/doc/src/inline_tags.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/notes.xml b/lib/erl_docgen/doc/src/notes.xml
index f70b3c8404..59a268d6ac 100644
--- a/lib/erl_docgen/doc/src/notes.xml
+++ b/lib/erl_docgen/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2017</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -31,7 +31,119 @@
</header>
<p>This document describes the changes made to the <em>erl_docgen</em> application.</p>
- <section><title>Erl_Docgen 0.4.2</title>
+ <section><title>Erl_Docgen 0.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Sort index of C functions alphabetically in the sidebar.</p>
+ <p>
+ Own Id: OTP-14333 Aux Id: ERL-393 </p>
+ </item>
+ <item>
+ <p> The right side index of functions now handle
+ functions with same name but different arity. </p>
+ <p>
+ Own Id: OTP-14431</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Improvements in the OTP documentation style.</p>
+ <p>
+ (Thanks to Mariano Guerra)</p>
+ <p>
+ Own Id: OTP-14371 Aux Id: PR-1215 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.6.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Docgen would previously emit "utf8" as the default
+ encoding in xml. This has now been remedied by emitting
+ the correct string "UTF-8" instead.</p>
+ <p>
+ Own Id: OTP-13971</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.6</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>Improve types and specs in OTP documentation generated
+ from Erlang source files. </p>
+ <p>
+ Own Id: OTP-13720 Aux Id: ERL-120 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Generate HTML anchors for data types without
+ <c>name</c> attribute. </p>
+ <p>
+ Own Id: OTP-13600 Aux Id: Jira: ERL-141 </p>
+ </item>
+ <item>
+ <p> Updated make rules so it's possible to use the
+ xmllint target for checking the system
+ documentation.<br/> Removed usage of non defined DTD tag
+ (output) from the system documentation and corrected a
+ number of xml faults. </p> <p> Added support for quote
+ tag and a new level of header formatting in erl_docgen.
+ </p> <p> A fault when generating html for manual set
+ markers for section headings is corrected so now is the
+ title visible after hyperlink jump. </p>
+ <p>
+ Own Id: OTP-13638</p>
+ </item>
+ <item>
+ <p> Corrected the space handling for the seealso tag.
+ </p>
+ <p>
+ Own Id: OTP-13639</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> Sort the modules function index alphabetically. </p>
+ <p>
+ Own Id: OTP-13668 Aux Id: PR-543 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.4.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/erl_docgen/doc/src/overview.xml b/lib/erl_docgen/doc/src/overview.xml
index 860eb02028..5c4576000c 100644
--- a/lib/erl_docgen/doc/src/overview.xml
+++ b/lib/erl_docgen/doc/src/overview.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/part.xml b/lib/erl_docgen/doc/src/part.xml
index aeed47b8c7..0e97af7169 100644
--- a/lib/erl_docgen/doc/src/part.xml
+++ b/lib/erl_docgen/doc/src/part.xml
@@ -4,7 +4,7 @@
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2011</year><year>2013</year>
+ <year>2011</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/ref_man.xml b/lib/erl_docgen/doc/src/ref_man.xml
index da05f3f1d2..5c7976f12b 100644
--- a/lib/erl_docgen/doc/src/ref_man.xml
+++ b/lib/erl_docgen/doc/src/ref_man.xml
@@ -4,7 +4,7 @@
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>2011</year><year>2013</year>
+ <year>2011</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/refman_dtds.xml b/lib/erl_docgen/doc/src/refman_dtds.xml
index e92539d301..ee3e2f09ad 100644
--- a/lib/erl_docgen/doc/src/refman_dtds.xml
+++ b/lib/erl_docgen/doc/src/refman_dtds.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/doc/src/user_guide_dtds.xml b/lib/erl_docgen/doc/src/user_guide_dtds.xml
index 01df6b62cb..fdbaba2d92 100644
--- a/lib/erl_docgen/doc/src/user_guide_dtds.xml
+++ b/lib/erl_docgen/doc/src/user_guide_dtds.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/erl_docgen/priv/bin/Makefile b/lib/erl_docgen/priv/bin/Makefile
index 20c2dac936..9ccb84b9c6 100644
--- a/lib/erl_docgen/priv/bin/Makefile
+++ b/lib/erl_docgen/priv/bin/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/bin/codeline_preprocessing.escript b/lib/erl_docgen/priv/bin/codeline_preprocessing.escript
index 129c5c287a..8e1e35bcdd 100755
--- a/lib/erl_docgen/priv/bin/codeline_preprocessing.escript
+++ b/lib/erl_docgen/priv/bin/codeline_preprocessing.escript
@@ -2,7 +2,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/bin/specs_gen.escript b/lib/erl_docgen/priv/bin/specs_gen.escript
index 988262e7a1..859f3c21f5 100644
--- a/lib/erl_docgen/priv/bin/specs_gen.escript
+++ b/lib/erl_docgen/priv/bin/specs_gen.escript
@@ -2,7 +2,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/bin/xml_from_edoc.escript b/lib/erl_docgen/priv/bin/xml_from_edoc.escript
index c09bf0f91c..b930ae3818 100755
--- a/lib/erl_docgen/priv/bin/xml_from_edoc.escript
+++ b/lib/erl_docgen/priv/bin/xml_from_edoc.escript
@@ -2,7 +2,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/bin/xref_mod_app.escript b/lib/erl_docgen/priv/bin/xref_mod_app.escript
index f754d4f2e0..4a418fe144 100755
--- a/lib/erl_docgen/priv/bin/xref_mod_app.escript
+++ b/lib/erl_docgen/priv/bin/xref_mod_app.escript
@@ -2,7 +2,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ preloaded(TopDir) ->
%% It's OK if too much data is generated as long as all applications
%% and all modules are mentioned.
appmods(D) ->
- ErlFiles = filelib:wildcard(filename:join([D,"src","*.erl"])),
+ ErlFiles = filelib:wildcard(filename:join([D,"src","**","*.erl"])),
AppV = filename:basename(D),
App = case string:rstr(AppV, "-") of
0 -> AppV;
diff --git a/lib/erl_docgen/priv/css/Makefile b/lib/erl_docgen/priv/css/Makefile
index 4dde562337..e3d2ee7e3f 100644
--- a/lib/erl_docgen/priv/css/Makefile
+++ b/lib/erl_docgen/priv/css/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -39,7 +39,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/erl_docgen-$(VSN)
CSS_FILES = \
- otp_doc.css
+ otp_doc.css \
+ highlight.css
# ----------------------------------------------------
diff --git a/lib/erl_docgen/priv/css/highlight.css b/lib/erl_docgen/priv/css/highlight.css
new file mode 100644
index 0000000000..d5bd1d2a9a
--- /dev/null
+++ b/lib/erl_docgen/priv/css/highlight.css
@@ -0,0 +1,96 @@
+/*
+
+Atom One Light by Daniel Gamage
+Original One Light Syntax theme from https://github.com/atom/one-light-syntax
+
+base: #fafafa
+mono-1: #383a42
+mono-2: #686b77
+mono-3: #a0a1a7
+hue-1: #0184bb
+hue-2: #4078f2
+hue-3: #a626a4
+hue-4: #50a14f
+hue-5: #e45649
+hue-5-2: #c91243
+hue-6: #986801
+hue-6-2: #c18401
+
+*/
+
+.hljs {
+ display: block;
+ overflow-x: auto;
+ padding: 0.5em;
+ color: #383a42;
+ background: #fafafa;
+}
+
+.hljs-comment,
+.hljs-quote {
+ color: #a0a1a7;
+ font-style: italic;
+}
+
+.hljs-doctag,
+.hljs-keyword,
+.hljs-formula {
+ color: #a626a4;
+}
+
+.hljs-section,
+.hljs-name,
+.hljs-selector-tag,
+.hljs-deletion,
+.hljs-subst {
+ color: #e45649;
+}
+
+.hljs-literal {
+ color: #0184bb;
+}
+
+.hljs-string,
+.hljs-regexp,
+.hljs-addition,
+.hljs-attribute,
+.hljs-meta-string {
+ color: #50a14f;
+}
+
+.hljs-built_in,
+.hljs-class .hljs-title {
+ color: #c18401;
+}
+
+.hljs-attr,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-type,
+.hljs-selector-class,
+.hljs-selector-attr,
+.hljs-selector-pseudo,
+.hljs-number {
+ color: #986801;
+}
+
+.hljs-symbol,
+.hljs-bullet,
+.hljs-link,
+.hljs-meta,
+.hljs-selector-id,
+.hljs-title {
+ color: #4078f2;
+}
+
+.hljs-emphasis {
+ font-style: italic;
+}
+
+.hljs-strong {
+ font-weight: bold;
+}
+
+.hljs-link {
+ text-decoration: underline;
+}
diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css
index 0b531db701..844aad2945 100644
--- a/lib/erl_docgen/priv/css/otp_doc.css
+++ b/lib/erl_docgen/priv/css/otp_doc.css
@@ -1,34 +1,39 @@
/* standard OTP style sheet */
body {
- background: white;
- font-family: Verdana, Arial, Helvetica, sans-serif;
+ background: #fefefe;
+ color: #1a1a1a;
+ font-family: sans-serif;
margin: 0;
padding: 0;
border: 0;
overflow: scroll;
height: 100%;
max-height: 100%;
+ line-height: 1.2em;
+ font-size: 16px;
}
-th { font-family: Verdana, Arial, Helvetica, sans-serif }
-td { font-family: Verdana, Arial, Helvetica, sans-serif }
-p { font-family: Verdana, Arial, Helvetica, sans-serif }
+h1, h2, h3, h4, h5, h6{
+ line-height: 1.2em;
+}
+
+p { max-width: 42em }
-.header { background: #222; color: #fff }
+.header { background: #222; color: #fefefe }
.top { background: #efe }
.otp { background: #efe }
.erlang { background: #ffe }
.otp2 { background: #efe }
.app { background: #ffe }
-a:link { color: blue; text-decoration: none }
-a:active { color: blue; text-decoration: none }
-a:visited { color: blue; text-decoration: none }
+a:link { color: #1862ab; text-decoration: none }
+a:active { color: #1c7cd6; text-decoration: none }
+a:visited { color: #1b6ec2; text-decoration: none }
#container {
width: 100%;
margin: 0;
- background-color: #fff;
+ background-color: #fefefe;
}
#leftnav {
@@ -37,15 +42,16 @@ a:visited { color: blue; text-decoration: none }
top: 0;
bottom: 0;
left: 0;
- width: 200px;
+ width: 300px;
overflow:auto;
margin: 0;
padding: 1px;
- border-right: 1px solid red;
+ border-right: 1px solid #ccc;
}
#content {
- margin-left: 240px; /* set left value to WidthOfFrameDiv */
+ margin-left: 340px; /* set left value to WidthOfFrameDiv */
+ max-width: 42em;
}
.frontpage
@@ -61,81 +67,202 @@ a:visited { color: blue; text-decoration: none }
.footer
{
margin: 15px; /* Magins for inner DIV inside each DIV (to provide padding) */
+ text-align: center;
}
-span.bold_code { font-family: Courier, monospace; font-weight: bold }
-span.code { font-family: Courier, monospace; font-weight: normal }
+.bold_code { font-family: mono, Courier, monospace; font-weight: bold }
+.code {
+ font-family: mono, Courier, monospace;
+ font-weight: normal;
+ background-color: #f3f3f3;
+}
.note, .warning, .do, .dont {
- border: solid black 1px;
- margin: 1em 3em;
+ border: 1px solid #495057;
+ margin: 1em 0;
}
.note .label {
- background: #30d42a;
- color: white;
+ background-color: #2b8a3e;
+ color: #fefefe;
font-weight: bold;
- padding: 5px 10px;
+ padding: 0.5em 1em;
}
.note .content {
- background: #eafeea;
- color: black;
+ background: #f8f9fa;
line-height: 120%;
- font-size: 90%;
- padding: 5px 10px;
+ font-size: 0.9em;
+ padding: 0.5em 1em;
}
.warning .label {
- background: #C00;
- color: white;
+ background: #c92a2a;
+ color: #fefefe;
font-weight: bold;
- padding: 5px 10px;
+ padding: 0.5em 1em;
}
.warning .content {
- background: #FFF0F0;
- color: black;
+ background-color: #f8f9fa;
line-height: 120%;
- font-size: 90%;
- padding: 5px 10px;
+ font-size: 0.9em;
+ padding: 0.5em 1em;
}
.do .label {
- background: #30d42a;
- color: white;
+ background-color: #2b8a3e;
+ color: #fefefe;
font-weight: bold;
- padding: 5px 10px;
+ padding: 0.5em 1em;
}
.do .content {
- background: #eafeea;
- color: black;
+ background: #f8f9fa;
line-height: 120%;
- font-size: 90%;
- padding: 5px 10px;
+ font-size: 0.9em;
+ padding: 0.5em 1em;
}
.dont .label {
- background: #C00;
- color: white;
+ background: #c92a2a;
+ color: #fefefe;
font-weight: bold;
- padding: 5px 10px;
+ padding: 0.5em 1em;
}
.dont .content {
- background: #FFF0F0;
- color: black;
+ background-color: #f8f9fa;
line-height: 120%;
- font-size: 90%;
- padding: 5px 10px;
+ font-size: 0.9em;
+ padding: 0.5em 1em;
}
+
+.quote {
+ font-style: italic
+}
+
.example {
- background-color:#eeeeff;
- padding: 0px 10px;
+ background-color:#f1f3f5;
+ border: 1px solid #dee2e6;
+ padding: 0.5em 1em;
+ margin: 1em 0;
+ font-size: 0.7em;
}
.extrafrontpageinfo {
color: #C00;
font-weight: bold;
- font-size: 120%;
+ font-size: 1.2em;
}
-pre { font-family: Courier, monospace; font-weight: normal }
+pre {
+ font-family: mono, Courier, monospace;
+ font-weight: normal;
+ margin: 0;
+}
-.REFBODY { margin-left: 13mm }
-.REFTYPES { margin-left: 8mm }
+.exports-body, .data-types-body, .REFBODY{
+ margin-left: 2em;
+}
+.REFTYPES { margin-left: 1.5em }
footer { }
+
+.erlang-logo-wrapper{
+ text-align: center;
+ margin-bottom: 1em;
+}
+
+.main-title{
+ text-align: center;
+}
+
+.main-description{
+ text-align: center;
+ margin: 2em 0;
+ font-size: 1.5em;
+ line-height: 1.5em;
+}
+
+.doc-table-wrapper, .doc-image-wrapper{
+ width: 100%;
+}
+
+.doc-image-wrapper{
+ text-align: center;
+}
+
+.doc-table, .doc-image{
+ min-width: 50%;
+ margin: 0 auto;
+ font-size: 0.7em;
+}
+
+.doc-table-caption, .doc-image-caption{
+ margin-top: 1em;
+ font-style: italic;
+ text-align: center;
+}
+
+table {
+ border-collapse: collapse;
+ min-width: 50%;
+ margin: 1em;
+}
+
+table, th, td {
+ border: 1px solid #666;
+}
+
+th, td {
+ padding: 0.5em;
+ text-align: left;
+}
+
+tr:hover {
+ background-color: #f5f5f5;
+}
+
+tr:nth-child(even) {
+ background-color: #f2f2f2;
+}
+
+th {
+ background-color: #777;
+ color: #fefefe;
+}
+
+.section-title, .section-subtitle, .section-version{
+ text-align: center;
+ margin: 0;
+}
+
+.section-title{
+ font-weight: bold;
+}
+
+.section-version{
+ font-size: small;
+}
+
+.expand-collapse-items{
+ font-size: small;
+}
+
+h3>a{
+ color: #1a1a1a !important;
+}
+
+hr{
+ border: 0;
+ border-top: 1px solid #aaa;
+}
+
+.section-links, .panel-sections, .expand-collapse-items{
+ padding: 0 1em;
+}
+
+.section-links, .panel-sections{
+ margin-top: 0;
+}
+
+a > .code {
+ color: #1862ab;
+}
+
+.func-types-title{
+ font-size: 1em;
+}
diff --git a/lib/erl_docgen/priv/dtd/Makefile b/lib/erl_docgen/priv/dtd/Makefile
index 6ea7d6bec0..e35e5f8826 100644
--- a/lib/erl_docgen/priv/dtd/Makefile
+++ b/lib/erl_docgen/priv/dtd/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/dtd/common.dtd b/lib/erl_docgen/priv/dtd/common.dtd
index 961bcd3fc2..b1578ad9d4 100644
--- a/lib/erl_docgen/priv/dtd/common.dtd
+++ b/lib/erl_docgen/priv/dtd/common.dtd
@@ -12,7 +12,7 @@
limitations under the License.
The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
+ Portions created by Ericsson are Copyright 1999-2016, Ericsson AB.
All Rights Reserved.''
$Id$
@@ -24,7 +24,7 @@
<!ENTITY % block "p|pre|code|list|taglist|codeinclude|
erleval" >
-<!ENTITY % inline "#PCDATA|c|i|em|term|cite|br|path|seealso|
+<!ENTITY % inline "#PCDATA|c|i|em|strong|term|cite|br|path|seealso|
url|marker|anno" >
<!-- XXX -->
<!ELEMENT p (%inline;)* >
@@ -40,6 +40,7 @@
<!ELEMENT c (#PCDATA|anno)* >
<!ELEMENT i (#PCDATA|c|anno)* >
<!ELEMENT em (#PCDATA|c|anno)* >
+<!ELEMENT strong (#PCDATA|c|anno)* >
<!ELEMENT anno (#PCDATA) >
<!-- XXX -->
@@ -68,7 +69,7 @@
<!ATTLIST list type (ordered|bulleted) "bulleted" >
<!ELEMENT taglist (tag,item+)+ >
<!ELEMENT tag (#PCDATA|c|i|em|br|seealso|url|marker|anno)* >
-<!ELEMENT item (%inline;|%block;|warning|note|dont|do)* >
+<!ELEMENT item (%inline;|%block;|warning|note|dont|do|quote)* >
<!-- References -->
diff --git a/lib/erl_docgen/priv/dtd/erlref.dtd b/lib/erl_docgen/priv/dtd/erlref.dtd
index 835407520a..615b88b61a 100644
--- a/lib/erl_docgen/priv/dtd/erlref.dtd
+++ b/lib/erl_docgen/priv/dtd/erlref.dtd
@@ -29,7 +29,7 @@
<!-- `name' is used in common.refs.dtd and must therefore
be defined in each *ref. dtd -->
-<!ELEMENT name (#PCDATA) >
+<!ELEMENT name (#PCDATA|seealso)* >
<!ATTLIST name name CDATA #IMPLIED
arity CDATA #IMPLIED
clause_i CDATA #IMPLIED
diff --git a/lib/erl_docgen/priv/dtd_html_entities/Makefile b/lib/erl_docgen/priv/dtd_html_entities/Makefile
index 8a853ba279..c0026bd04d 100644
--- a/lib/erl_docgen/priv/dtd_html_entities/Makefile
+++ b/lib/erl_docgen/priv/dtd_html_entities/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/dtd_man_entities/Makefile b/lib/erl_docgen/priv/dtd_man_entities/Makefile
index 991a1a20c7..c634417e8c 100644
--- a/lib/erl_docgen/priv/dtd_man_entities/Makefile
+++ b/lib/erl_docgen/priv/dtd_man_entities/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/fop.xconf b/lib/erl_docgen/priv/fop.xconf
index 1a07af5c64..ee48255a93 100644
--- a/lib/erl_docgen/priv/fop.xconf
+++ b/lib/erl_docgen/priv/fop.xconf
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2012. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/images/Makefile b/lib/erl_docgen/priv/images/Makefile
index 664505fa9a..cd98399b6a 100644
--- a/lib/erl_docgen/priv/images/Makefile
+++ b/lib/erl_docgen/priv/images/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/images/erlang-logo.gif b/lib/erl_docgen/priv/images/erlang-logo.gif
index abf5f225d7..ae13168429 100644
--- a/lib/erl_docgen/priv/images/erlang-logo.gif
+++ b/lib/erl_docgen/priv/images/erlang-logo.gif
Binary files differ
diff --git a/lib/erl_docgen/priv/images/erlang-logo.png b/lib/erl_docgen/priv/images/erlang-logo.png
index 56291aac15..41bba97417 100644
--- a/lib/erl_docgen/priv/images/erlang-logo.png
+++ b/lib/erl_docgen/priv/images/erlang-logo.png
Binary files differ
diff --git a/lib/erl_docgen/priv/js/flipmenu/Makefile b/lib/erl_docgen/priv/js/flipmenu/Makefile
index 287aeb3dd2..ad6d4acb6c 100644
--- a/lib/erl_docgen/priv/js/flipmenu/Makefile
+++ b/lib/erl_docgen/priv/js/flipmenu/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -76,6 +76,7 @@ release_spec: opt
release_docs_spec:
$(INSTALL_DIR) "$(RELEASE_PATH)/doc/js/flipmenu"
$(INSTALL_DATA) $(JS_FILES) $(GIF_FILES) "$(RELEASE_PATH)/doc/js/flipmenu"
+ $(INSTALL_DATA) ../highlight.js ../highlight.pack.js "$(RELEASE_PATH)/doc/js/"
release_tests_spec:
diff --git a/lib/erl_docgen/priv/js/flipmenu/flip_closed.gif b/lib/erl_docgen/priv/js/flipmenu/flip_closed.gif
index 9a27c7c25d..a75107a782 100644
--- a/lib/erl_docgen/priv/js/flipmenu/flip_closed.gif
+++ b/lib/erl_docgen/priv/js/flipmenu/flip_closed.gif
Binary files differ
diff --git a/lib/erl_docgen/priv/js/flipmenu/flip_open.gif b/lib/erl_docgen/priv/js/flipmenu/flip_open.gif
index 9dda60e73a..1274637fe0 100644
--- a/lib/erl_docgen/priv/js/flipmenu/flip_open.gif
+++ b/lib/erl_docgen/priv/js/flipmenu/flip_open.gif
Binary files differ
diff --git a/lib/erl_docgen/priv/js/flipmenu/flip_static.gif b/lib/erl_docgen/priv/js/flipmenu/flip_static.gif
index 2b3ddb5382..4cc914a50a 100644
--- a/lib/erl_docgen/priv/js/flipmenu/flip_static.gif
+++ b/lib/erl_docgen/priv/js/flipmenu/flip_static.gif
Binary files differ
diff --git a/lib/erl_docgen/priv/js/highlight.js b/lib/erl_docgen/priv/js/highlight.js
new file mode 100644
index 0000000000..0594b42aa3
--- /dev/null
+++ b/lib/erl_docgen/priv/js/highlight.js
@@ -0,0 +1,39 @@
+/*globals document, window*/
+window.addEventListener("load", function () {
+ "use strict";
+ var body = document.body,
+ base = window.__otpTopDocDir || "/doc/js/",
+ cssLink = document.createElement('link'),
+ script = document.createElement('script'),
+ intervalId, attempts = 0;
+
+ cssLink.rel = "stylesheet";
+ cssLink.href = base + "../highlight.css";
+ script.src = base + "highlight.pack.js";
+
+ body.appendChild(cssLink);
+ body.appendChild(script);
+
+ function doHighlight() {
+ attempts += 1;
+
+ if (attempts > 20) {
+ window.clearInterval(intervalId);
+ return;
+ }
+
+ if (!window.hljs) {
+ return;
+ }
+
+ window.clearInterval(intervalId);
+
+ var i, len, nodes = document.querySelectorAll('.example');
+ for (i = 0, len = nodes.length; i < len; i += 1) {
+ window.hljs.highlightBlock(nodes[i]);
+ }
+
+ }
+
+ intervalId = window.setInterval(doHighlight, 50);
+});
diff --git a/lib/erl_docgen/priv/js/highlight.pack.js b/lib/erl_docgen/priv/js/highlight.pack.js
new file mode 100644
index 0000000000..073d39e644
--- /dev/null
+++ b/lib/erl_docgen/priv/js/highlight.pack.js
@@ -0,0 +1,2 @@
+/*! highlight.js v9.7.0 | BSD3 License | git.io/hljslicense */
+!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+w.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"<br>":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n,t,r,o,s,p=i(e);a(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="</span>",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&amp;","<":"&lt;",">":"&gt;"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("erlang",function(e){var r="[a-z'][a-zA-Z0-9_']*",c="("+r+":"+r+"|"+r+")",b={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.C("%","$"),n={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},a={b:"fun\\s+"+r+"/\\d+"},d={b:c+"\\(",e:"\\)",rB:!0,r:0,c:[{b:c,r:0},{b:"\\(",e:"\\)",eW:!0,rE:!0,r:0}]},o={b:"{",e:"}",r:0},t={b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0},f={b:"[A-Z][a-zA-Z0-9_]*",r:0},l={b:"#"+e.UIR,r:0,rB:!0,c:[{b:"#"+e.UIR,r:0},{b:"{",e:"}",r:0}]},s={bK:"fun receive if try case",e:"end",k:b};s.c=[i,a,e.inherit(e.ASM,{cN:""}),s,d,e.QSM,n,o,t,f,l];var u=[i,a,s,d,e.QSM,n,o,t,f,l];d.c[1].c=u,o.c=u,l.c[1].c=u;var h={cN:"params",b:"\\(",e:"\\)",c:u};return{aliases:["erl"],k:b,i:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",c:[{cN:"function",b:"^"+r+"\\s*\\(",e:"->",rB:!0,i:"\\(|#|//|/\\*|\\\\|:|;",c:[h,e.inherit(e.TM,{b:r})],starts:{e:";|\\.",k:b,c:u}},i,{b:"^-",e:"\\.",r:0,eE:!0,rB:!0,l:"-"+e.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",c:[h]},n,e.QSM,l,t,f,o,{b:/\.$/}]}});hljs.registerLanguage("erlang-repl",function(e){return{k:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"meta",b:"^[0-9]+> ",r:10},e.C("%","$"),{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},e.ASM,e.QSM,{b:"\\?(::)?([A-Z]\\w*(::)?)+"},{b:"->"},{b:"ok"},{b:"!"},{b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{b:"[A-Z][a-zA-Z0-9_']*",r:0}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}}); \ No newline at end of file
diff --git a/lib/erl_docgen/priv/xsl/Makefile b/lib/erl_docgen/priv/xsl/Makefile
index 80b3a59592..d0dd227169 100644
--- a/lib/erl_docgen/priv/xsl/Makefile
+++ b/lib/erl_docgen/priv/xsl/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2012. All Rights Reserved.
+# Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/xsl/db_eix.xsl b/lib/erl_docgen/priv/xsl/db_eix.xsl
index 3ca6f73bd6..b496614854 100644
--- a/lib/erl_docgen/priv/xsl/db_eix.xsl
+++ b/lib/erl_docgen/priv/xsl/db_eix.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2011. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index c2325fbee9..d863c056e9 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2012. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2017. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -24,11 +24,87 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
- extension-element-prefixes="exsl"
+ xmlns:func="http://exslt.org/functions"
+ xmlns:erl="http://erlang.org"
+ extension-element-prefixes="exsl func"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<xsl:include href="db_html_params.xsl"/>
+ <func:function name="erl:flip_first_char">
+ <xsl:param name="in"/>
+
+ <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
+ <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'"/>
+
+ <xsl:variable name="first-char" select="substring($in, 1, 1)"/>
+
+ <xsl:variable name="result">
+ <xsl:choose>
+ <xsl:when test="contains($uppercase, $first-char)">
+ <xsl:value-of select="concat(translate($first-char, $uppercase, $lowercase), substring($in, 2))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat(translate($first-char, $lowercase, $uppercase), substring($in, 2))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <func:result select="$result"/>
+ </func:function>
+
+ <!-- Used from template menu.funcs to sort a module's functions for the lefthand index list,
+ from the module's .xml file. Returns a value on which to sort the entity in question
+ (a <name> element).
+
+ Some functions are listed with the name as an attribute, as in string.xml:
+ <name name="join" arity="2"/>
+
+ Others use the element value for the name, as in gen_server.xml:
+ <name>start_link(Module, Args, Options) -> Result</name>
+
+ Additionally, callbacks may be included, as in gen_server.xml:
+ <name>Module:handle_call(Request, From, State) -> Result</name>
+
+ For C reference pages the name tag has a substructure where the nametext tag
+ is used in the sort, as in erl_nif.xml
+ <name><ret>void *</ret><nametext>enif_alloc(size_t size)</nametext></name>
+
+ So first, get the name from either the attribute or the element value.
+ Then, reverse the case of the first character. This is because xsltproc, used for processing,
+ orders uppercase before lowercase (even when the 'case-order="lower-first"' option
+ is given). But we want the Module callback functions listed after a module's regular
+ functions, as they are now. This doesn't affect the actual value used in the output, but
+ just the value used as a sort key. To then ensure that uppercase is indeed sorted before
+ lower, as we now want it to be, the 'case-order="upper-first"' option is used.
+
+ This processing only affect the lefthand index list- the body of the doc page is not
+ affected.
+ -->
+ <func:function name="erl:get_sort_field">
+ <xsl:param name="elem"/>
+
+ <xsl:variable name="base">
+ <xsl:choose>
+ <xsl:when test="ancestor::cref">
+ <xsl:value-of select="$elem/nametext"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="string-length($elem/@name) > 0">
+ <xsl:value-of select="$elem/@name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-before($elem, '(')"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <func:result select="erl:flip_first_char($base)"/>
+ </func:function>
+
<!-- Start of Dialyzer type/spec tags.
See also the templates matching "name" and "seealso" as well as
the template "menu.funcs"
@@ -135,13 +211,12 @@
<xsl:template match="head">
<xsl:param name="local_types"/>
<xsl:param name="global_types"/>
- <span class="bold_code">
+ <div class="bold_code func-head">
<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/>
+ </div>
</xsl:template>
<!-- The *last* <name name="..." arity=".."/> -->
@@ -169,7 +244,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">
@@ -262,13 +338,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>
@@ -280,7 +356,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"/>
@@ -301,7 +377,7 @@
<!-- Similar to <d> -->
<xsl:template match="type_desc">
- <div class="REFBODY">
+ <div class="REFBODY rb-1">
<xsl:apply-templates/>
</div>
</xsl:template>
@@ -310,7 +386,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>
@@ -321,15 +397,17 @@
<!-- Datatypes -->
<xsl:template match="datatypes">
<h3>
- <xsl:text>DATA TYPES</xsl:text>
+ <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
@@ -383,15 +461,13 @@
</xsl:choose>
</xsl:when>
<xsl:otherwise> <!-- <datatype> with <name> -->
- <span class="bold_code">
- <xsl:apply-templates/>
- </span>
+ <xsl:call-template name="name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="typehead">
- <span class="bold_code">
+ <span class="bold_code bc-4">
<xsl:apply-templates/>
</span><br/>
</xsl:template>
@@ -399,7 +475,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"/>
@@ -410,7 +486,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>
@@ -418,8 +494,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>
@@ -596,7 +672,7 @@
</xsl:otherwise>
</xsl:choose>
</head>
- <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000">
+ <body>
<div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
@@ -671,6 +747,8 @@
</div>
</div>
+ <script type="text/javascript"><xsl:text>window.__otpTopDocDir = '</xsl:text><xsl:value-of select="$topdocdir"/><xsl:text>/js/';</xsl:text></script>
+ <script type="text/javascript" src="{$topdocdir}/js/highlight.js"/>
</body>
</html>
</xsl:template>
@@ -733,36 +811,42 @@
</xsl:template>
- <xsl:template name="menu_top">
+ <xsl:template name="erlang_logo">
<xsl:choose>
<xsl:when test="string-length($logo) > 0">
- <img alt="Erlang logo" src="{$topdocdir}/{$logo}"/>
+ <div class="erlang-logo-wrapper">
+ <a href="{$topdocdir}/index.html"><img alt="Erlang Logo" src="{$topdocdir}/{$logo}" class="erlang-logo"/></a>
+ </div>
</xsl:when>
<xsl:otherwise>
- <img alt="Erlang logo" src="{$topdocdir}/erlang-logo.png"/>
+ <div class="erlang-logo-wrapper">
+ <a href="{$topdocdir}/index.html"><img alt="Erlang Logo" src="{$topdocdir}/erlang-logo.png" class="erlang-logo"/></a>
+ </div>
</xsl:otherwise>
</xsl:choose>
- <br/>
- <small>
+ </xsl:template>
+
+ <xsl:template name="menu_top">
+ <ul class="panel-sections">
<xsl:if test="boolean(/book/parts/part)">
- <a href="users_guide.html">User's Guide</a><br/>
+ <li><a href="users_guide.html">User's Guide</a></li>
</xsl:if>
<xsl:if test="boolean(/book/applications)">
- <a href="index.html">Reference Manual</a><br/>
+ <li><a href="index.html">Reference Manual</a></li>
</xsl:if>
<xsl:if test="boolean(/book/releasenotes)">
- <a href="release_notes.html">Release Notes</a><br/>
+ <li><a href="release_notes.html">Release Notes</a></li>
</xsl:if>
<xsl:choose>
<xsl:when test="string-length($pdfname) > 0">
- <a href="{$pdfdir}/{$pdfname}.pdf">PDF</a><br/>
+ <li><a href="{$pdfdir}/{$pdfname}.pdf">PDF</a></li>
</xsl:when>
<xsl:otherwise>
- <a href="{$pdfdir}/{$appname}-{$appver}.pdf">PDF</a><br/>
+ <li><a href="{$pdfdir}/{$appname}-{$appver}.pdf">PDF</a></li>
</xsl:otherwise>
</xsl:choose>
- <a href="{$topdocdir}/index.html">Top</a>
- </small>
+ <li><a href="{$topdocdir}/index.html">Top</a></li>
+ </ul>
</xsl:template>
<xsl:template name="menu_middle">
@@ -778,48 +862,46 @@
</xsl:when>
</xsl:choose>
</small -->
- <br/>
- <a href="javascript:openAllFlips()">Expand All</a><br/>
- <a href="javascript:closeAllFlips()">Contract All</a>
+ <ul class="expand-collapse-items">
+ <li><a href="javascript:openAllFlips()">Expand All</a></li>
+ <li><a href="javascript:closeAllFlips()">Contract All</a></li>
+ </ul>
</xsl:template>
<!-- Book -->
<xsl:template match="/book">
-
- <xsl:apply-templates name="parts"/>
- <xsl:apply-templates name="applications"/>
-
+ <xsl:apply-templates select="parts"/>
+ <xsl:apply-templates select="applications"/>
+ <xsl:apply-templates select="releasenotes"/>
</xsl:template>
<!-- Parts -->
<xsl:template match="parts">
- <xsl:apply-templates name="part"/>
+ <xsl:apply-templates select="part"/>
</xsl:template>
<!-- Applications -->
<xsl:template match="applications">
- <xsl:apply-templates name="application"/>
+ <xsl:apply-templates select="application"/>
</xsl:template>
-
<!-- Header -->
- <xsl:template match="header">
- </xsl:template>
-
- <!-- Section/Title -->
- <xsl:template match="section/title">
- </xsl:template>
-
- <xsl:template match="pagetext">
- </xsl:template>
+ <xsl:template match="header"/>
+
+ <!-- Section/Title -->
+ <xsl:template match="section/title"/>
+ <xsl:template match="pagetext"/>
- <!-- Chapter/Section -->
+ <!-- Chapter/Section, subsection level 1-->
<xsl:template match="chapter/section">
<xsl:param name="chapnum"/>
<h3>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
<a name="{generate-id(title)}">
<xsl:value-of select="$chapnum"/>.<xsl:number/>&#160;
<xsl:value-of select="title"/>
@@ -831,11 +913,14 @@
</xsl:apply-templates>
</xsl:template>
- <!-- Subsections lvl 3 and ... -->
+ <!-- Subsections lvl 2 -->
<xsl:template match="section/section">
<xsl:param name="chapnum"/>
<xsl:param name="sectnum"/>
<h4>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
<!-- xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$sectnum"/>.<xsl:number/ -->
<xsl:value-of select="title"/>
</h4>
@@ -844,15 +929,34 @@
</xsl:apply-templates>
</xsl:template>
+ <!-- Subsections lvl 3 and ... -->
+ <xsl:template match="section/section/section">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="sectnum"/>
+ <h5>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
+ <!-- xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$sectnum"/>.<xsl:number/ -->
+ <xsl:value-of select="title"/>
+ </h5>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
<!-- *ref/Section -->
<xsl:template match="erlref/section|cref/section|comref/section|fileref/section|appref/section">
<xsl:param name="chapnum"/>
<h3>
+ <xsl:for-each select="marker">
+ <xsl:call-template name="marker-before-title"/>
+ </xsl:for-each>
<a name="{generate-id(title)}">
<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>
@@ -866,7 +970,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>
@@ -875,7 +979,6 @@
<!-- Lists -->
-
<xsl:template match="list">
<xsl:param name="chapnum"/>
<ul>
@@ -983,6 +1086,18 @@
</div>
</xsl:template>
+ <!-- Quote -->
+ <xsl:template match="quote">
+ <xsl:param name="chapnum"/>
+ <div class="quote">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </xsl:template>
+
<!-- Paragraph -->
<xsl:template match="p">
<p>
@@ -991,10 +1106,6 @@
</xsl:template>
<!-- Inline elements -->
- <xsl:template match="b">
- <strong><xsl:apply-templates/></strong>
- </xsl:template>
-
<xsl:template match="i">
<i><xsl:apply-templates/></i>
</xsl:template>
@@ -1011,6 +1122,10 @@
<strong><xsl:apply-templates/></strong>
</xsl:template>
+ <xsl:template match="strong">
+ <strong><xsl:apply-templates/></strong>
+ </xsl:template>
+
<!-- Code -->
<xsl:template match="code">
<xsl:param name="chapnum"/>
@@ -1036,7 +1151,8 @@
<xsl:variable name="tabnum">
<xsl:number level="any" from="chapter" count="table"/>
</xsl:variable>
- <table border="1" cellpadding="2" cellspacing="0">
+ <div class="doc-table-wrapper">
+ <table class="doc-table">
<!-- tbody-->
<xsl:apply-templates select="row">
<xsl:with-param name="chapnum" select="$chapnum"/>
@@ -1048,6 +1164,7 @@
<xsl:with-param name="chapnum" select="$chapnum"/>
<xsl:with-param name="tabnum" select="$tabnum"/>
</xsl:apply-templates>
+ </div>
</xsl:template>
<xsl:template match="row">
@@ -1067,11 +1184,11 @@
<xsl:param name="chapnum"/>
<xsl:param name="tabnum"/>
- <em>Table
+ <p class="doc-table-caption">Table
<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$tabnum"/>:
&#160;
<xsl:apply-templates/>
- </em>
+ </p>
</xsl:template>
@@ -1082,12 +1199,14 @@
<xsl:number level="any" from="chapter" count="image"/>
</xsl:variable>
- <img alt="IMAGE MISSING" src="{@file}"/><br/>
+ <div class="doc-image-wrapper">
+ <img alt="IMAGE MISSING" src="{@file}" class="doc-image"/>
<xsl:apply-templates>
<xsl:with-param name="chapnum" select="$chapnum"/>
<xsl:with-param name="fignum" select="$fignum"/>
</xsl:apply-templates>
+ </div>
</xsl:template>
@@ -1097,11 +1216,11 @@
<xsl:param name="chapnum"/>
<xsl:param name="fignum"/>
- <em>Figure
+ <p class="doc-image-caption">Figure
<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$fignum"/>:
&#160;
<xsl:apply-templates/>
- </em>
+ </p>
</xsl:template>
@@ -1151,21 +1270,17 @@
<div id="leftnav">
<div class="innertube">
- <xsl:call-template name="menu_top"/>
+ <xsl:call-template name="erlang_logo"/>
- <p>
- <strong><xsl:value-of select="/book/header/title"/></strong><br/>
- <strong>User's Guide</strong><br/>
- <small>Version <xsl:value-of select="$appver"/></small>
- </p>
+ <p class="section-title"><xsl:value-of select="/book/header/title"/></p>
+ <p class="section-subtitle">User's Guide</p>
+ <p class="section-version">Version <xsl:value-of select="$appver"/></p>
+
+ <xsl:call-template name="menu_top"/>
<xsl:call-template name="menu_middle"/>
- <p>
- <small>
- <strong>Chapters</strong>
- </small>
- </p>
+ <h3>Chapters</h3>
<ul class="flipMenu" imagepath="{$topdocdir}/js/flipmenu">
<xsl:call-template name="menu.chapter">
@@ -1288,9 +1403,7 @@
<xsl:with-param name="type">ref_man</xsl:with-param>
</xsl:call-template-->
-
<xsl:document href="{$outdir}/index.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
-
<xsl:call-template name="pagelayout"/>
</xsl:document>
</xsl:template>
@@ -1318,21 +1431,17 @@
<div id="leftnav">
<div class="innertube">
- <xsl:call-template name="menu_top"/>
+ <xsl:call-template name="erlang_logo"/>
- <p>
- <strong><xsl:value-of select="/book/header/title"/></strong><br/>
- <strong>Reference Manual</strong><br/>
- <small>Version <xsl:value-of select="$appver"/></small>
- </p>
+ <p class="section-title"><xsl:value-of select="/book/header/title"/></p>
+ <p class="section-subtitle">Reference Manual</p>
+ <p class="section-version">Version <xsl:value-of select="$appver"/></p>
+
+ <xsl:call-template name="menu_top"/>
<xsl:call-template name="menu_middle"/>
- <p>
- <small>
- <strong>Table of Contents</strong>
- </small>
- </p>
+ <h3>Table of Contents</h3>
<ul class="flipMenu">
<xsl:call-template name="menu.ref2">
@@ -1460,6 +1569,8 @@
<xsl:param name="cval"/>
<xsl:for-each select="$entries">
+ <!-- Sort on function name, so the index list in lefthand frame is ordered. -->
+ <xsl:sort select="erl:get_sort_field(.)" data-type="text" case-order="upper-first"/>
<xsl:choose>
<xsl:when test="ancestor::cref">
@@ -1680,8 +1791,8 @@
<!-- Module -->
<xsl:template match="module">
<xsl:param name="partnum"/>
- <h3>MODULE</h3>
- <div class="REFBODY">
+ <h3><a name="module" href="#module">Module</a></h3>
+ <div class="REFBODY module-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1692,8 +1803,8 @@
<!-- Modulesummary -->
<xsl:template match="modulesummary">
<xsl:param name="partnum"/>
- <h3>MODULE SUMMARY</h3>
- <div class="REFBODY">
+ <h3><a name="module-sumary" href="#module-sumary">Module Summary</a></h3>
+ <div class="REFBODY module-summary-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1703,8 +1814,8 @@
<!-- Lib -->
<xsl:template match="lib">
<xsl:param name="partnum"/>
- <h3>C LIBRARY</h3>
- <div class="REFBODY">
+ <h3><a name="c-library" href="#c-library">C Library</a></h3>
+ <div class="REFBODY c-library-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1715,8 +1826,8 @@
<!-- Libsummary -->
<xsl:template match="libsummary">
<xsl:param name="partnum"/>
- <h3>LIBRARY SUMMARY</h3>
- <div class="REFBODY">
+ <h3><a name="library-sumary" href="#library-sumary">Library Summary</a></h3>
+ <div class="REFBODY library-summary-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1726,8 +1837,8 @@
<!-- Com -->
<xsl:template match="com">
<xsl:param name="partnum"/>
- <h3>COMMAND</h3>
- <div class="REFBODY">
+ <h3><a name="command" href="#command">Command</a></h3>
+ <div class="REFBODY command-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1738,8 +1849,8 @@
<!-- Comsummary -->
<xsl:template match="comsummary">
<xsl:param name="partnum"/>
- <h3>COMMAND SUMMARY</h3>
- <div class="REFBODY">
+ <h3><a name="command-summary" href="#command-summary">Command Summary</a></h3>
+ <div class="REFBODY command-summary-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1749,8 +1860,8 @@
<!-- File -->
<xsl:template match="file">
<xsl:param name="partnum"/>
- <h3>FILE</h3>
- <div class="REFBODY">
+ <h3><a name="file" href="#file">File</a></h3>
+ <div class="REFBODY file-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1761,8 +1872,8 @@
<!-- Filesummary -->
<xsl:template match="filesummary">
<xsl:param name="partnum"/>
- <h3>FILE SUMMARY</h3>
- <div class="REFBODY">
+ <h3><a name="file-summary" href="#file-summary">File Summary</a></h3>
+ <div class="REFBODY file-summary-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1773,8 +1884,8 @@
<!-- App -->
<xsl:template match="app">
<xsl:param name="partnum"/>
- <h3>APPLICATION</h3>
- <div class="REFBODY">
+ <h3><a name="application" href="#application">Application</a></h3>
+ <div class="REFBODY application-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1785,8 +1896,8 @@
<!-- Appsummary -->
<xsl:template match="appsummary">
<xsl:param name="partnum"/>
- <h3>APPLICATION SUMMARY</h3>
- <div class="REFBODY">
+ <h3><a name="application-summary" href="#application-summary">Application Summary</a></h3>
+ <div class="REFBODY application-summary-body">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1796,8 +1907,8 @@
<!-- Description -->
<xsl:template match="description">
<xsl:param name="partnum"/>
- <h3>DESCRIPTION</h3>
- <div class="REFBODY">
+ <h3><a name="description" href="#description">Description</a></h3>
+ <div class="REFBODY description-body">
<p>
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
@@ -1810,13 +1921,13 @@
<xsl:template match="funcs">
<xsl:param name="partnum"/>
- <h3>
- <xsl:text>EXPORTS</xsl:text>
- </h3>
+ <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>
@@ -1855,6 +1966,7 @@
</xsl:choose>
</xsl:template>
+ <!-- Used both in <datatype> and in <func>! -->
<xsl:template name="name">
<xsl:variable name="tmpstring">
@@ -1886,7 +1998,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"/>
@@ -1911,10 +2023,17 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <a name="{$fname}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
+ <xsl:choose>
+ <xsl:when test="ancestor::datatype">
+ <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 fun-type"><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>
@@ -1939,12 +2058,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 class="func-types-title">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>
@@ -1954,8 +2074,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 fun-param-type">
<xsl:apply-templates>
<xsl:with-param name="partnum" select="$partnum"/>
</xsl:apply-templates>
@@ -1966,7 +2086,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>
@@ -1976,7 +2096,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"/>
@@ -1993,11 +2113,11 @@
<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">
- <xsl:call-template name="seealso"/>
+ <xsl:call-template name="seealso"/>
</xsl:template>
<xsl:template name="seealso">
@@ -2012,7 +2132,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) -->
@@ -2032,7 +2152,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 -->
@@ -2045,11 +2165,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>
@@ -2057,7 +2177,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 '#') -->
@@ -2067,11 +2187,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>
@@ -2079,16 +2199,27 @@
</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">
- <a name="{@id}"><xsl:apply-templates/></a>
+ <xsl:choose>
+ <xsl:when test="not(parent::section and following-sibling::title)">
+ <a name="{@id}"><xsl:apply-templates/></a>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
+ <xsl:template name="marker-before-title">
+ <xsl:choose>
+ <xsl:when test="self::marker and parent::section and following-sibling::title">
+ <a name="{@id}"><xsl:apply-templates/></a>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+
<xsl:template match="term">
<xsl:value-of select="@id"/>
<!-- xsl:choose>
@@ -2144,21 +2275,17 @@
<div id="leftnav">
<div class="innertube">
- <xsl:call-template name="menu_top"/>
+ <xsl:call-template name="erlang_logo"/>
- <p>
- <strong><xsl:value-of select="/book/header/title"/></strong><br/>
- <strong>Release Notes</strong><br/>
- <small>Version <xsl:value-of select="$appver"/></small>
- </p>
+ <p class="section-title"><xsl:value-of select="/book/header/title"/></p>
+ <p class="section-subtitle">Release Notes</p>
+ <p class="section-version">Version <xsl:value-of select="$appver"/></p>
+
+ <xsl:call-template name="menu_top"/>
<xsl:call-template name="menu_middle"/>
- <p>
- <small>
- <strong>Chapters</strong>
- </small>
- </p>
+ <h3>Chapters</h3>
<ul class="flipMenu" imagepath="{$topdocdir}/js/flipmenu">
<xsl:call-template name="menu.chapter">
@@ -2367,7 +2494,11 @@
<xsl:template name="nl">
<xsl:text>
-</xsl:text>
+ </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="seealso//text()">
+ <xsl:value-of select="normalize-space(.)"/>
</xsl:template>
</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_html_params.xsl b/lib/erl_docgen/priv/xsl/db_html_params.xsl
index 2949dbfef0..41ca26af21 100644
--- a/lib/erl_docgen/priv/xsl/db_html_params.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html_params.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index 5201465e42..03b6b0691d 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2012. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -589,12 +589,6 @@
</xsl:template>
<!-- Inline elements -->
- <xsl:template match="b">
- <xsl:text>\fB</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>\fR\&amp; </xsl:text>
- </xsl:template>
-
<xsl:template match="i">
<xsl:text>\fI</xsl:text>
<xsl:apply-templates/>
@@ -622,6 +616,12 @@
<xsl:text>\fI</xsl:text> <xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
</xsl:template>
+ <xsl:template match="strong">
+ <xsl:text>\fB</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>\fR\&amp; </xsl:text>
+ </xsl:template>
+
<xsl:template match="seealso">
<xsl:choose>
<xsl:when test="ancestor::head">
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index 37a2d55274..99263847fb 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1171,6 +1171,16 @@
</fo:block>
</xsl:template>
+ <!-- Quote -->
+ <xsl:template match="quote">
+ <xsl:param name="chapnum"/>
+ <fo:block font-style="italic">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
<!-- Paragraph -->
<xsl:template match="p">
<fo:block xsl:use-attribute-sets="p">
@@ -1180,14 +1190,8 @@
<!-- Inline elements -->
- <xsl:template match="b">
- <fo:inline font-weight="bold">
- <xsl:apply-templates/>
- </fo:inline>
- </xsl:template>
-
<xsl:template match="i">
- <fo:inline font-weight="italic">
+ <fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
@@ -1203,7 +1207,13 @@
</xsl:template>
<xsl:template match="em">
- <fo:inline font-style="italic">
+ <fo:inline font-weight="bold">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="strong">
+ <fo:inline font-weight="bold">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
index 61c8ff75aa..d9a150d2d9 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2012. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/src/Makefile b/lib/erl_docgen/src/Makefile
index 7d41506dbd..82d051e9bb 100644
--- a/lib/erl_docgen/src/Makefile
+++ b/lib/erl_docgen/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1996-2012. All Rights Reserved.
+# Copyright Ericsson AB 1996-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index 0ac7985a48..7cdbb502d9 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -1,8 +1,3 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2001-2015. All Rights Reserved.
-%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
@@ -15,8 +10,10 @@
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%
-%% %CopyrightEnd%
+%% Copyright (c) 2001-2016 Richard Carlsson. Parts written by Ericsson
+%% are Copyright (c) Ericsson AB 2001-2012. All Rights Reserved.
%%
+
-module(docgen_edoc_xml_cb).
%% This is the EDoc callback module for creating erlref
@@ -27,7 +24,7 @@
%% {preprocess,true}]).
%%
%% The origin of this file is the edoc module otpsgml_layout.erl
-%% written by Richard Carlsson.
+%% written by Richard Carlsson and Kenneth Lundin.
-export([module/2, overview/2]).
@@ -111,7 +108,16 @@ root_attributes(Element, Opts) ->
Enc ->
Enc
end,
- [#xmlAttribute{name=encoding, value=Encoding}].
+ [#xmlAttribute{name=encoding, value=reformat_encoding(Encoding)}].
+
+%% epp:default_encoding/0 returns 'utf8'
+reformat_encoding(utf8) -> "UTF-8";
+reformat_encoding(List) when is_list(List) ->
+ case string:to_lower(List) of
+ "utf8" -> "UTF-8";
+ _ -> List
+ end;
+reformat_encoding(Other) -> Other.
layout_chapter(#xmlElement{name=overview, content=Es}) ->
Title = get_text(title, Es),
@@ -563,7 +569,14 @@ otp_xmlify_a_fileref(FileRef1, AppS) ->
true ->
case split(Marker0, "-") of
[Func,Arity] ->
- Func++"/"++Arity;
+ try list_to_integer(Arity) of
+ _ ->
+ Func++"/"++Arity
+ catch
+ _:_ ->
+ %% This is "type-"<a-type>.
+ Marker0
+ end;
_ ->
Marker0
end
@@ -831,19 +844,49 @@ local_types([]) -> [];
local_types(Es) ->
local_defs2(get_elem(localdef, Es)).
+-define(LOCAL_TYPES, edoc_local_defs).
+
local_defs2([]) -> [];
local_defs2(Es) ->
+ case collect_local_types(Es) of
+ [] -> local_defs3(Es);
+ LocalTypes ->
+ ?LOCAL_TYPES = ets:new(?LOCAL_TYPES, [named_table]),
+ true = ets:insert(?LOCAL_TYPES, LocalTypes),
+ try
+ local_defs3(Es)
+ after
+ ets:delete(?LOCAL_TYPES)
+ end
+ end.
+
+local_defs3(Es) ->
{type,[?NL | [{v, localdef2(E)} || E <- Es]]}.
+%% Does not work well for parametrized types.
+collect_local_types(Es) ->
+ lists:append([collect_local_type(E) || E <- Es]).
+
+collect_local_type(#xmlElement{content = Es}) ->
+ case get_elem(typevar, Es) of
+ [] ->
+ [{t_abstype(get_content(abstype, Es))}];
+ [_] ->
+ []
+ end.
+
%% Like localdef/1, but does not use label_anchor/2 -- we don't want any
%% markers or em tags in <v> tag, plain text only!
+%% When used stand-alone, EDoc generates links to local types. An ETS
+%% table holds local types, to avoid generating links to them.
localdef2(#xmlElement{content = Es}) ->
- case get_elem(typevar, Es) of
- [] ->
- t_utype(get_elem(type, Es));
- [V] ->
- t_var(V) ++ [" = "] ++ t_utype(get_elem(type, Es))
- end.
+ Var = case get_elem(typevar, Es) of
+ [] ->
+ [t_abstype(get_content(abstype, Es))];
+ [V] ->
+ t_var(V)
+ end,
+ Var ++ [" = "] ++ t_utype(get_elem(type, Es)).
type_name(#xmlElement{content = Es}) ->
t_name(get_elem(erlangName, get_content(typedef, Es))).
@@ -855,10 +898,9 @@ types(Ts) ->
typedecl(Name, #xmlElement{content = Es}) ->
TypedefEs = get_content(typedef, Es),
Id = "type-"++Name,
- [{tag, typedef(TypedefEs)},
+ [{tag, [{marker,[{id,Id}],[]}] ++ typedef(TypedefEs)},
?NL,
- {item, [{marker,[{id,Id}],[]} |
- local_defs(get_elem(localdef, TypedefEs)) ++ fulldesc(Es)]},
+ {item, local_defs(get_elem(localdef, TypedefEs)) ++ fulldesc(Es)},
?NL].
typedef(Es) ->
@@ -866,14 +908,14 @@ typedef(Es) ->
++ seq(fun t_utype_elem/1, get_content(argtypes, Es), [")"])),
case get_elem(type, Es) of
[] ->
- [{tt, Name}];
+ Name;
Type ->
- [{tt, Name ++ [" = "] ++ t_utype(Type)}]
+ Name ++ [" = "] ++ t_utype(Type)
end.
-local_defs([]) -> [];
+local_defs([]) -> [{p,[]}];
local_defs(Es) ->
- [?NL, {ul, [{li, [{tt, localdef(E)}]} || E <- Es]}].
+ [?NL, {ul, [{li, [{p, localdef(E)}]} || E <- Es]}].
localdef(E = #xmlElement{content = Es}) ->
Var = case get_elem(typevar, Es) of
@@ -917,6 +959,7 @@ seealso_module(Es) ->
Es1 ->
{section,[{title,["See also"]},{p,seq(fun see/1, Es1, [])}]}
end.
+
seealso_function(Es) ->
case get_elem(see, Es) of
[] -> [];
@@ -988,7 +1031,14 @@ t_name([E]) ->
end.
t_utype([E]) ->
- t_utype_elem(E).
+ flatten_type(t_utype_elem(E)).
+
+%% Make sure see also are top elements of lists.
+flatten_type(T) ->
+ [case is_integer(E) of
+ true -> [E];
+ false -> E
+ end || E <- lists:flatten(T)].
t_utype_elem(E=#xmlElement{content = Es}) ->
case get_attrval(name, E) of
@@ -1021,16 +1071,14 @@ t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
t_fun(Es);
-t_type([#xmlElement{name = abstype, content = Es}]) ->
- t_abstype(Es);
+t_type([E = #xmlElement{name = abstype, content = Es}]) ->
+ t_abstype(E, Es);
t_type([#xmlElement{name = union, content = Es}]) ->
t_union(Es);
t_type([#xmlElement{name = record, content = Es}]) ->
t_record(Es);
t_type([#xmlElement{name = map, content = Es}]) ->
- t_map(Es);
-t_type([#xmlElement{name = map_field, content = Es}]) ->
- t_map_field(Es).
+ t_map(Es).
t_var(E) ->
[get_attrval(name, E)].
@@ -1065,35 +1113,53 @@ t_fun(Es) ->
t_record([E|Es]) ->
["#", get_attrval(value, E), "{"++ seq(fun t_field/1, Es) ++"}"].
+
t_field(#xmlElement{name=field, content=[Atom,Type]}) ->
[get_attrval(value, Atom), "="] ++ t_utype_elem(Type).
t_map(Es) ->
- ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+ ["#{"] ++ seq(fun t_map_field/1, Es, ["}"]).
+
+t_map_field(E = #xmlElement{name = map_field, content = [K,V]}) ->
+ KElem = t_utype_elem(K),
+ VElem = t_utype_elem(V),
+ AS = case get_attrval(assoc_type, E) of
+ "assoc" -> " => ";
+ "exact" -> " := "
+ end,
+ [KElem ++ AS ++ VElem].
-t_map_field([K,V]) ->
- [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+t_abstype(E, Es) ->
+ see_type(E, t_abstype(Es)).
t_abstype(Es) ->
- case split_at_colon(t_name(get_elem(erlangName, Es)),[]) of
- {Mod,Type} ->
- [Type, "("] ++
- seq(fun t_utype_elem/1, get_elem(type, Es), [")"]) ++
- [" (see module ", Mod, ")"];
- Type ->
- [Type, "("] ++
- seq(fun t_utype_elem/1, get_elem(type, Es), [")"])
+ Name = t_name(get_elem(erlangName, Es)),
+ [Name, "("] ++ seq(fun t_utype_elem/1, get_elem(type, Es), [")"]).
+
+see_type(E, Es0) ->
+ case get_attrval(href, E) of
+ [] -> Es0;
+ Href0 ->
+ try
+ false = is_local_type(Es0),
+ %% Fails for parametrized types:
+ Text = #xmlText{value = lists:append(Es0)},
+ {Href, Es} = otp_xmlify_a_href(Href0, [Text]),
+ [{seealso, [{marker, Href}], Es}]
+ catch
+ _:_ ->
+ Es0
+ end
end.
-%% Split at one colon, but not at two (or more)
-split_at_colon([$:,$:|_]=Rest,Acc) ->
- lists:reverse(Acc)++Rest;
-split_at_colon([$:|Type],Acc) ->
- {lists:reverse(Acc),Type};
-split_at_colon([Char|Rest],Acc) ->
- split_at_colon(Rest,[Char|Acc]);
-split_at_colon([],Acc) ->
- lists:reverse(Acc).
+is_local_type(Es) ->
+ try
+ [_] = ets:lookup(?LOCAL_TYPES, Es),
+ true
+ catch
+ _:_->
+ false
+ end.
t_union(Es) ->
seq(fun t_utype_elem/1, Es, " | ", []).
diff --git a/lib/erl_docgen/src/docgen_otp_specs.erl b/lib/erl_docgen/src/docgen_otp_specs.erl
index e154323f07..6c41147e27 100644
--- a/lib/erl_docgen/src/docgen_otp_specs.erl
+++ b/lib/erl_docgen/src/docgen_otp_specs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2015. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -389,10 +389,10 @@ t_type([#xmlElement{name = list, content = Es}]) ->
t_list(Es);
t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
t_nonempty_list(Es);
-t_type([#xmlElement{name = tuple, content = Es}]) ->
- t_tuple(Es);
t_type([#xmlElement{name = map, content = Es}]) ->
t_map(Es);
+t_type([#xmlElement{name = tuple, content = Es}]) ->
+ t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
["fun("] ++ t_fun(Es) ++ [")"];
t_type([E = #xmlElement{name = record, content = Es}]) ->
@@ -435,16 +435,22 @@ t_nonempty_list(Es) ->
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+t_fun(Es) ->
+ ["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
+ [") -> "] ++ t_utype(get_elem(type, Es))).
+
t_map(Es) ->
Fs = get_elem(map_field, Es),
["#{"] ++ seq(fun t_map_field/1, Fs, ["}"]).
-t_map_field(#xmlElement{content = [K,V]}) ->
- [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
-
-t_fun(Es) ->
- ["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
- [") -> "] ++ t_utype(get_elem(type, Es))).
+t_map_field(#xmlElement{content = [K,V]}=E) ->
+ KElem = t_utype_elem(K),
+ VElem = t_utype_elem(V),
+ AS = case get_attrval(assoc_type, E) of
+ "assoc" -> " => ";
+ "exact" -> " := "
+ end,
+ KElem ++ [AS] ++ VElem.
t_record(E, Es) ->
Name = ["#"] ++ t_type(get_elem(atom, Es)),
@@ -618,8 +624,12 @@ ot_tuple(Es) ->
ot_map(Es) ->
{type,0,map,[ot_map_field(E) || E <- get_elem(map_field,Es)]}.
-ot_map_field(#xmlElement{content=[K,V]}) ->
- {type,0,map_field_assoc,[ot_utype_elem(K),ot_utype_elem(V)]}.
+ot_map_field(#xmlElement{content=[K,V]}=E) ->
+ A = case get_attrval(assoc_type, E) of
+ "assoc" -> map_field_assoc;
+ "exact" -> map_field_exact
+ end,
+ {type,0,A,[ot_utype_elem(K), ot_utype_elem(V)]}.
ot_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),
diff --git a/lib/erl_docgen/src/docgen_xmerl_xml_cb.erl b/lib/erl_docgen/src/docgen_xmerl_xml_cb.erl
index f6e003aa14..59d4dccfb7 100644
--- a/lib/erl_docgen/src/docgen_xmerl_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_xmerl_xml_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/src/erl_docgen.appup.src b/lib/erl_docgen/src/erl_docgen.appup.src
index 58cde75395..0d874acf7a 100644
--- a/lib/erl_docgen/src/erl_docgen.appup.src
+++ b/lib/erl_docgen/src/erl_docgen.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2014. All Rights Reserved.
+%% Copyright Ericsson AB 2014-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
diff --git a/lib/erl_docgen/test/Makefile b/lib/erl_docgen/test/Makefile
index 9f4cc04105..9e58157023 100644
--- a/lib/erl_docgen/test/Makefile
+++ b/lib/erl_docgen/test/Makefile
@@ -25,7 +25,7 @@ RELSYSDIR = $(RELEASE_PATH)/erl_docgen_test
# ----------------------------------------------------
ERL_MAKE_FLAGS +=
-ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+ERL_COMPILE_FLAGS +=
EBIN = .
diff --git a/lib/erl_docgen/test/erl_docgen_SUITE.erl b/lib/erl_docgen/test/erl_docgen_SUITE.erl
index a202fefa9d..972fda5762 100644
--- a/lib/erl_docgen/test/erl_docgen_SUITE.erl
+++ b/lib/erl_docgen/test/erl_docgen_SUITE.erl
@@ -40,12 +40,10 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-app() ->
- [{doc, "Test that the erl_docgen app file is ok"}].
+%% Test that the erl_docgen app file is ok
app(Config) when is_list(Config) ->
- ok = ?t:app_test(erl_docgen).
+ ok = test_server:app_test(erl_docgen).
-appup() ->
- [{doc, "Test that the erl_docgen appup file is ok"}].
+%% Test that the erl_docgen appup file is ok
appup(Config) when is_list(Config) ->
- ok = ?t:appup_test(erl_docgen).
+ ok = test_server:appup_test(erl_docgen).
diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk
index 3188b926ff..8fad061b26 100644
--- a/lib/erl_docgen/vsn.mk
+++ b/lib/erl_docgen/vsn.mk
@@ -1 +1 @@
-ERL_DOCGEN_VSN = 0.4.2
+ERL_DOCGEN_VSN = 0.7