aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen/priv/xsl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/erl_docgen/priv/xsl')
-rw-r--r--lib/erl_docgen/priv/xsl/Makefile80
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl1486
-rw-r--r--lib/erl_docgen/priv/xsl/db_html_params.xsl35
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl308
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl1129
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf_params.xsl406
6 files changed, 3444 insertions, 0 deletions
diff --git a/lib/erl_docgen/priv/xsl/Makefile b/lib/erl_docgen/priv/xsl/Makefile
new file mode 100644
index 0000000000..92a53b8c0b
--- /dev/null
+++ b/lib/erl_docgen/priv/xsl/Makefile
@@ -0,0 +1,80 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../../vsn.mk
+VSN=$(ERL_DOCGEN_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/erl_docgen-$(VSN)
+
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+
+XSL_FILES = \
+ db_pdf.xsl \
+ db_pdf_params.xsl \
+ db_html.xsl \
+ db_html_params.xsl \
+ db_man.xsl
+
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+debug opt:
+
+docs:
+
+clean:
+ $(RM) $(TARGET_FILES)
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/xsl
+ $(INSTALL_DATA) $(XSL_FILES) $(RELSYSDIR)/priv/xsl
+
+
+release_docs_spec:
+
+
+release_tests_spec:
+
+
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
new file mode 100644
index 0000000000..3e6f762870
--- /dev/null
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -0,0 +1,1486 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ #
+ # %CopyrightBegin%
+ #
+ # Copyright Ericsson AB 2009. All Rights Reserved.
+ #
+ # The contents of this file are subject to the Erlang Public License,
+ # Version 1.1, (the "License"); you may not use this file except in
+ # compliance with the License. You should have received a copy of the
+ # Erlang Public License along with this software. If not, it can be
+ # retrieved online at http://www.erlang.org/.
+ #
+ # Software distributed under the License is distributed on an "AS IS"
+ # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ # the License for the specific language governing rights and limitations
+ # under the License.
+ #
+ # %CopyrightEnd%
+
+ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
+
+ <xsl:include href="db_html_params.xsl"/>
+
+ <!-- Page layout -->
+ <xsl:template name="pagelayout">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="curModule"/>
+ <html>
+ <head>
+ <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/>
+ <title>Erlang -- <xsl:value-of select="header/title"/></title>
+ </head>
+ <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000">
+
+ <div id="container">
+ <script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
+ <script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
+ <!-- Generate menu -->
+ <xsl:call-template name="menu">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="curModule" select="$curModule"/>
+ </xsl:call-template>
+
+ <div id="content">
+ <div class="innertube">
+
+ <!-- Insert the node-specific content -->
+ <xsl:call-template name="content">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:call-template>
+ </div>
+
+ <div class="footer">
+ <hr/>
+ <p>
+ <xsl:value-of select="$copyright"/>
+ <xsl:value-of select="/book/header/copyright/year[1]"/>
+ <xsl:text>-</xsl:text>
+ <xsl:value-of select="substring-after(substring-after($gendate, ' '), ' ')"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="/book/header/copyright/holder"/>
+ </p>
+ </div>
+
+ </div>
+ </div>
+
+ </body>
+ </html>
+ </xsl:template>
+
+
+ <!-- Content -->
+ <xsl:template name="content">
+ <xsl:param name="chapnum"/>
+
+ <xsl:variable name="lname"><xsl:value-of select="local-name()"/></xsl:variable>
+
+ <xsl:if test="$lname = 'releasenotes'">
+ <!-- .../part -->
+ <xsl:call-template name="releasenotes.content" />
+ </xsl:if>
+ <xsl:if test="$lname = 'part'">
+ <!-- .../part -->
+ <xsl:call-template name="part.content" />
+ </xsl:if>
+ <xsl:if test="$lname = 'chapter'">
+ <!-- .../part/chapter -->
+ <xsl:call-template name="chapter.content">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$lname = 'application'">
+ <!-- .../application -->
+ <xsl:call-template name="app.content" />
+ </xsl:if>
+ <xsl:if test="$lname = 'erlref' or $lname = 'cref' or $lname= 'comref' or $lname= 'fileref' or $lname= 'appref'">
+ <!-- .../application/*ref -->
+ <xsl:comment> refpage </xsl:comment>
+ <xsl:call-template name="ref.content" />
+ </xsl:if>
+ </xsl:template>
+
+
+ <!-- Menu -->
+ <xsl:template name="menu">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="curModule"/>
+ <xsl:if test="(local-name() = 'part') or ((local-name() = 'chapter') and ancestor::part)">
+ <!-- .../part or.../part/chapter -->
+ <xsl:call-template name="menu.ug">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="(local-name() = 'application') or (local-name() = 'erlref')or (local-name() = 'comref')or (local-name() = 'cref')or (local-name() = 'fileref')or (local-name() = 'appref')">
+ <!-- .../application,.../application/erlref, .../application/comref or .../application/cref or .../application/fileref or .../application/appref -->
+ <xsl:call-template name="menu.ref">
+ <xsl:with-param name="curModule" select="$curModule"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="(local-name() = 'releasenotes') or ((local-name() = 'chapter') and ancestor::releasenotes)">
+ <!-- releasenotes -->
+ <xsl:call-template name="menu.rn">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template name="menu_top">
+ <img alt="Erlang logo" src="{$topdocdir}/erlang-logo.png"/>
+ <br/>
+ <small>
+ <xsl:if test="boolean(/book/parts/part)">
+ <a href="users_guide.html">User's Guide</a><br/>
+ </xsl:if>
+ <xsl:if test="boolean(/book/applications)">
+ <a href="index.html">Reference Manual</a><br/>
+ </xsl:if>
+ <xsl:if test="boolean(/book/releasenotes)">
+ <a href="release_notes.html">Release Notes</a><br/>
+ </xsl:if>
+ <a href="{$pdfdir}/{$appname}-{$appver}.pdf">PDF</a><br/>
+ <a href="{$topdocdir}/index.html">Top</a>
+ </small>
+ </xsl:template>
+
+ <xsl:template name="menu_middle">
+ <!-- small>
+ <xsl:choose>
+ <xsl:when test="ancestor::parts">
+ <a href="users_guide_bibliography.html">Bibliography</a><br/>
+ <a href="users_guide_glossary.html">Glossary</a><br/>
+ </xsl:when>
+ <xsl:when test="ancestor::applications">
+ <a href="ref_man_bibliography.html">Bibliography</a><br/>
+ <a href="ref_man_glossary.html">Glossary</a><br/>
+ </xsl:when>
+ </xsl:choose>
+ </small -->
+ <br/>
+
+ <a href="javascript:openAllFlips()">Expand All</a><br/>
+ <a href="javascript:closeAllFlips()">Contract All</a>
+ </xsl:template>
+
+
+ <!-- Book -->
+ <xsl:template match="/book">
+
+ <xsl:apply-templates name="parts"/>
+ <xsl:apply-templates name="applications"/>
+
+ </xsl:template>
+
+ <!-- Parts -->
+ <xsl:template match="parts">
+ <xsl:apply-templates name="part"/>
+ </xsl:template>
+
+ <!-- Applications -->
+ <xsl:template match="applications">
+ <xsl:apply-templates name="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>
+
+
+ <!-- Chapter/Section -->
+ <xsl:template match="chapter/section">
+ <xsl:param name="chapnum"/>
+ <h3>
+ <a name="{generate-id(title)}">
+ <xsl:value-of select="$chapnum"/>.<xsl:number/>&#160;
+ <xsl:value-of select="title"/>
+ </a>
+ </h3>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="sectnum"><xsl:number/></xsl:with-param>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Chapter/Subsection -->
+ <xsl:template match="chapter/section/section">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="sectnum"/>
+ <h4>
+ <!-- xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$sectnum"/>.<xsl:number/ -->
+ <xsl:value-of select="title"/>
+ </h4>
+ <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>
+ <a name="{generate-id(title)}">
+ <xsl:value-of select="title"/>
+ </a>
+ </h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+ <!-- *ref/Subsection -->
+ <xsl:template match="erlref/section/section|cref/section/section|comref/section/section|fileref/section/section|appref/section/section">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="sectnum"/>
+ <h4>
+ <xsl:value-of select="title"/>
+ </h4>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- Lists -->
+
+ <xsl:template match="list">
+ <xsl:param name="chapnum"/>
+ <ul>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </ul>
+ </xsl:template>
+
+ <xsl:template match="list/item">
+ <xsl:param name="chapnum"/>
+ <li>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </li>
+ </xsl:template>
+
+
+ <xsl:template match="taglist">
+ <xsl:param name="chapnum"/>
+ <dl>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </dl>
+ </xsl:template>
+
+ <xsl:template match="taglist/tag">
+ <xsl:param name="chapnum"/>
+ <dt>
+ <strong>
+ <xsl:apply-templates/>
+ </strong>
+ </dt>
+ </xsl:template>
+
+
+ <xsl:template match="taglist/item">
+ <xsl:param name="chapnum"/>
+ <dd>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </dd>
+ </xsl:template>
+
+ <!-- Note -->
+ <xsl:template match="note">
+ <xsl:param name="chapnum"/>
+ <div class="note">
+ <div class="label">Note</div>
+ <div class="content">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </div>
+ </xsl:template>
+
+ <!-- Warning -->
+ <xsl:template match="warning">
+ <xsl:param name="chapnum"/>
+ <div class="warning">
+ <div class="label">Warning</div>
+ <div class="content">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </div>
+ </xsl:template>
+
+ <!-- Paragraph -->
+ <xsl:template match="p">
+ <p>
+ <xsl:apply-templates/>
+ </p>
+ </xsl:template>
+
+
+ <!-- Inline elements -->
+ <xsl:template match="b">
+ <strong><xsl:apply-templates/></strong>
+ </xsl:template>
+
+ <xsl:template match="br">
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="c">
+ <span class="code"><xsl:apply-templates/></span>
+ </xsl:template>
+
+ <xsl:template match="em">
+ <strong><xsl:apply-templates/></strong>
+ </xsl:template>
+
+ <!-- Code -->
+ <xsl:template match="code">
+ <xsl:param name="chapnum"/>
+ <xsl:variable name="codenum">
+ <xsl:number level="any" from="chapter" count="code"/>
+ </xsl:variable>
+ <div class="example"><pre><xsl:apply-templates/></pre></div>
+ </xsl:template>
+
+ <!-- Pre -->
+ <xsl:template match="pre">
+ <xsl:param name="chapnum"/>
+ <xsl:variable name="codenum">
+ <xsl:number level="any" from="chapter" count="code"/>
+ </xsl:variable>
+ <div class="example"><pre><xsl:apply-templates/></pre></div>
+ </xsl:template>
+
+
+ <!-- Table -->
+ <xsl:template match="table">
+ <xsl:param name="chapnum"/>
+ <xsl:variable name="tabnum">
+ <xsl:number level="any" from="chapter" count="table"/>
+ </xsl:variable>
+ <table border="1" cellpadding="2" cellspacing="0">
+ <!-- tbody-->
+ <xsl:apply-templates select="row">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="tabnum" select="$tabnum"/>
+ </xsl:apply-templates>
+ <!-- /tbody-->
+ </table>
+ <xsl:apply-templates select="tcaption">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="tabnum" select="$tabnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="row">
+ <tr>
+ <xsl:apply-templates/>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="cell">
+ <td align="left" valign="middle">
+ <xsl:apply-templates/>
+ </td>
+ </xsl:template>
+
+
+ <xsl:template match="tcaption">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="tabnum"/>
+
+ <em>Table
+ <xsl:value-of select="$chapnum"/>.<xsl:value-of select="$tabnum"/>:
+ &#160;
+ <xsl:apply-templates/>
+ </em>
+
+ </xsl:template>
+
+ <!-- Image -->
+ <xsl:template match="image">
+ <xsl:param name="chapnum"/>
+ <xsl:variable name="fignum">
+ <xsl:number level="any" from="chapter" count="image"/>
+ </xsl:variable>
+
+ <img alt="IMAGE MISSING" src="{@file}"/><br/>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="fignum" select="$fignum"/>
+ </xsl:apply-templates>
+
+
+ </xsl:template>
+
+
+ <xsl:template match="icaption">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="fignum"/>
+
+ <em>Figure
+ <xsl:value-of select="$chapnum"/>.<xsl:value-of select="$fignum"/>:
+ &#160;
+ <xsl:apply-templates/>
+ </em>
+
+ </xsl:template>
+
+
+
+
+ <!--Users Guide -->
+
+ <!-- Part -->
+ <xsl:template match="part">
+ <!-- Generate Glossary for Users Guide -->
+ <!--xsl:call-template name="glossary">
+ <xsl:with-param name="type">users_guide</xsl:with-param>
+ </xsl:call-template-->
+
+ <!-- Generate Bibliography for Users Guide -->
+ <!--xsl:call-template name="bibliography">
+ <xsl:with-param name="type">users_guide</xsl:with-param>
+ </xsl:call-template-->
+
+ <xsl:document href="{$outdir}/users_guide.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>
+
+
+ <!-- Part content-->
+ <xsl:template name="part.content">
+ <div class="frontpage"/>
+
+ <center><h1><xsl:value-of select="/book/header/title"/> User's Guide</h1></center>
+
+ <center><h4>Version <xsl:value-of select="$appver"/></h4></center>
+ <center><h4><xsl:value-of select="$gendate"/></h4></center>
+
+ <xsl:apply-templates select="chapter"/>
+
+ </xsl:template>
+
+ <!-- Menu.ug -->
+ <xsl:template name="menu.ug">
+ <xsl:param name="chapnum"/>
+
+ <div id="leftnav">
+ <div class="innertube">
+
+ <xsl:call-template name="menu_top"/>
+
+ <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>
+
+ <xsl:call-template name="menu_middle"/>
+
+ <p>
+ <small>
+ <strong>Chapters</strong>
+ </small>
+ </p>
+
+ <ul class="flipMenu" imagepath="{$topdocdir}/js/flipmenu">
+ <xsl:call-template name="menu.chapter">
+ <xsl:with-param name="entries" select="/book/parts/part/chapter[header/title]"/>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:call-template>
+ </ul>
+ </div>
+ </div>
+ </xsl:template>
+
+
+ <xsl:template name="menu.chapter">
+ <xsl:param name="entries"/>
+ <xsl:param name="chapnum"/>
+ <xsl:for-each select="$entries">
+ <xsl:variable name="chapter_file">
+ <xsl:value-of select='substring-before(header/file, ".xml")'/>
+ </xsl:variable>
+ <xsl:variable name="curchapnum"><xsl:number/></xsl:variable>
+ <xsl:variable name="expanded">
+ <xsl:choose>
+ <xsl:when test="$chapnum = $curchapnum">true</xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <li title="{header/title}" expanded="{$expanded}">
+ <xsl:value-of select="header/title"/>
+ <ul>
+ <li>
+ <a href="{$chapter_file}.html">
+ Top of chapter
+ </a>
+ </li>
+ <xsl:call-template name="menu.section">
+ <xsl:with-param name="entries"
+ select="section[title]"/>
+ <xsl:with-param name="chapter_file"><xsl:value-of select="$chapter_file"/></xsl:with-param>
+ </xsl:call-template>
+ </ul>
+ </li>
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <xsl:template name="menu.section">
+ <xsl:param name="entries"/>
+ <xsl:param name="chapter_file"/>
+ <xsl:for-each select="$entries">
+ <li title="{title}">
+ <a href="{$chapter_file}.html#{generate-id(title)}">
+ <xsl:value-of select="title"/>
+ </a>
+ </li>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- Chapter (if top tag)-->
+ <xsl:template match="/chapter">
+
+ <xsl:document href="{substring-before(header/file, '.xml')}.html" method="html" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="chapnum"><xsl:number/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+ <!-- Chapter -->
+ <xsl:template match="chapter">
+
+ <xsl:document href="{substring-before(header/file, '.xml')}.html" method="html" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="chapnum"><xsl:number/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+
+ <!-- Chapter content-->
+ <xsl:template name="chapter.content">
+ <xsl:param name="chapnum"/>
+
+ <!-- center-->
+ <h1>
+ <xsl:value-of select="$chapnum"/>&#160;<xsl:value-of select="header/title"/>
+ </h1>
+ <!-- /center-->
+
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+
+
+
+ <!-- Reference Manual -->
+
+ <!-- Application -->
+ <xsl:template match="application">
+
+ <!-- Generate Glossary for Ref. Manual -->
+ <!--xsl:call-template name="glossary">
+ <xsl:with-param name="type">ref_man</xsl:with-param>
+ </xsl:call-template-->
+
+ <!-- Generate Bibliography for Ref. Manual -->
+ <!--xsl:call-template name="bibliography">
+ <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>
+
+
+ <!-- Application content-->
+ <xsl:template name="app.content">
+ <div class="frontpage"/>
+
+ <center><h1><xsl:value-of select="/book/header/title"/> Reference Manual</h1></center>
+
+ <center><h4>Version <xsl:value-of select="$appver"/></h4></center>
+ <center><h4><xsl:value-of select="$gendate"/></h4></center>
+
+ <xsl:apply-templates select="erlref|cref|comref|fileref|appref"/>
+
+ </xsl:template>
+
+ <!-- Menu.ref -->
+ <xsl:template name="menu.ref">
+ <xsl:param name="$curModule"/>
+ <div id="leftnav">
+ <div class="innertube">
+
+ <xsl:call-template name="menu_top"/>
+
+ <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>
+
+ <xsl:call-template name="menu_middle"/>
+
+ <p>
+ <small>
+ <strong>Table of Contents</strong>
+ </small>
+ </p>
+
+ <ul class="flipMenu">
+ <xsl:call-template name="menu.ref2">
+ <xsl:with-param name="entries" select="/book/applications/application/erlref[module]|/book/applications/application/cref[lib]|/book/applications/application/comref[com]|/book/applications/application/fileref[file]|/book/applications/application/appref[app]"/>
+ <!--xsl:with-param name="genFuncMenu" select="true"/-->
+ <xsl:with-param name="curModule" select="$curModule"/>
+ </xsl:call-template>
+ </ul>
+ </div>
+ </div>
+ </xsl:template>
+
+
+ <xsl:template name="menu.ref2">
+ <xsl:param name="entries"/>
+ <!--xsl:param name="genFuncMenu"/-->
+ <xsl:param name="curModule"/>
+ <xsl:for-each select="$entries">
+
+ <xsl:variable name="cval">
+ <xsl:choose>
+ <xsl:when test="local-name() = 'erlref'">
+ <xsl:value-of select="module"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'cref'">
+ <xsl:value-of select="lib"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'comref'">
+ <xsl:value-of select="com"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'fileref'">
+ <xsl:value-of select="file"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'appref'">
+ <xsl:value-of select="app"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="genFuncMenu">
+ <xsl:choose>
+ <xsl:when test="local-name() = 'comref'">false</xsl:when>
+ <xsl:when test="local-name() = 'appref'">false</xsl:when>
+ <xsl:when test="local-name() = 'fileref'">false</xsl:when>
+ <xsl:when test="descendant::funcs">true</xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="expanded">
+ <xsl:choose>
+ <xsl:when test="$curModule = $cval">true</xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="link_cval"><xsl:value-of select="translate($cval, '&#173;', '')"/></xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$genFuncMenu = 'true'">
+
+ <li title="{$cval} " expanded="{$expanded}">
+ <xsl:value-of select="$cval"/>
+ <ul>
+ <li>
+ <a href="{$link_cval}.html">
+ Top of manual page
+ </a>
+ </li>
+ <xsl:call-template name="menu.funcs">
+ <xsl:with-param name="entries"
+ select="funcs/func/name"/>
+ <xsl:with-param name="basename"><xsl:value-of select="$link_cval"/></xsl:with-param>
+ </xsl:call-template>
+ </ul>
+ </li>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="local-name() = 'appref'">
+ <li title="{$cval} (App)">
+ <a href="{$link_cval}_app.html">
+ <xsl:value-of select="$cval"/> (App)
+ </a>
+ </li>
+ </xsl:when>
+ <xsl:otherwise>
+ <li title="{$cval}">
+ <a href="{$link_cval}.html">
+ <xsl:value-of select="$cval"/>
+ </a>
+ </li>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <xsl:template name="menu.funcs">
+ <xsl:param name="entries"/>
+ <xsl:param name="basename"/>
+
+ <xsl:for-each select="$entries">
+
+ <xsl:choose>
+ <xsl:when test="ancestor::cref">
+ <xsl:variable name="fname"><xsl:value-of select="substring-before(nametext, '(')"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($fname) > 0">
+ <li title="{$fname}">
+ <a href="{$basename}.html#{$fname}">
+ <xsl:value-of select="$fname"/>()
+ </a>
+ </li>
+ </xsl:when>
+ <xsl:otherwise>
+ <li title="{name/nametext}">
+ <a href="{$basename}.html#{name/nametext}">
+ <xsl:value-of select="nametext"/>()
+ </a>
+ </li>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="ancestor::erlref">
+
+ <xsl:variable name="tmpstring">
+ <xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
+ </xsl:variable>
+
+ <xsl:variable name="ustring">
+ <xsl:choose>
+ <xsl:when test="string-length($tmpstring) > 0">
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="$tmpstring"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="substring-after(., '(')"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="arity">
+ <xsl:call-template name="calc-arity">
+ <xsl:with-param name="string" select="substring-before($ustring, ')')"/>
+ <xsl:with-param name="no-of-pars" select="0"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="fname">
+ <xsl:value-of select="substring-before(., '(')"/>
+ </xsl:variable>
+ <li title="{$fname}-{$arity}">
+ <a href="{$basename}.html#{$fname}-{$arity}">
+ <xsl:value-of select="$fname"/>/<xsl:value-of select="$arity"/>
+ </a>
+ </li>
+ </xsl:when>
+ </xsl:choose>
+
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <!-- Erlref -->
+ <xsl:template match="erlref">
+
+ <xsl:variable name="filename"><xsl:value-of select="translate(module, '&#173;', '')"/></xsl:variable>
+
+ <xsl:document href="{$filename}.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="curModule" select="module"/>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+ <!-- Cref -->
+ <xsl:template match="cref">
+
+ <xsl:document href="{lib}.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="curModule" select="lib"/>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+ <!-- Comref -->
+ <xsl:template match="comref">
+
+ <xsl:document href="{com}.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="curModule" select="com"/>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+ <!-- Fileref -->
+ <xsl:template match="fileref">
+
+ <xsl:document href="{file}.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="curModule" select="file"/>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+ <!-- Appref -->
+ <xsl:template match="appref">
+
+ <xsl:document href="{app}_app.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <xsl:call-template name="pagelayout">
+ <xsl:with-param name="curModule" select="app"/>
+ </xsl:call-template>
+ </xsl:document>
+ </xsl:template>
+
+ <!-- *ref content-->
+ <xsl:template name="ref.content">
+ <xsl:param name="partnum"/>
+
+ <center>
+ <h1>
+ <xsl:choose>
+ <xsl:when test="local-name() = 'erlref'">
+ <xsl:value-of select="module"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'cref'">
+ <xsl:value-of select="lib"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'comref'">
+ <xsl:value-of select="com"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'fileref'">
+ <xsl:value-of select="file"/>
+ </xsl:when>
+ <xsl:when test="local-name() = 'appref'">
+ <xsl:value-of select="app"/>
+ </xsl:when>
+ </xsl:choose>
+ </h1>
+ </center>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+
+ <!-- Module -->
+ <xsl:template match="module">
+ <xsl:param name="partnum"/>
+ <h3>MODULE</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- Modulesummary -->
+ <xsl:template match="modulesummary">
+ <xsl:param name="partnum"/>
+ <h3>MODULE SUMMARY</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+ <!-- Lib -->
+ <xsl:template match="lib">
+ <xsl:param name="partnum"/>
+ <h3>C LIBRARY</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- Libsummary -->
+ <xsl:template match="libsummary">
+ <xsl:param name="partnum"/>
+ <h3>LIBRARY SUMMARY</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+ <!-- Com -->
+ <xsl:template match="com">
+ <xsl:param name="partnum"/>
+ <h3>COMMAND</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- Comsummary -->
+ <xsl:template match="comsummary">
+ <xsl:param name="partnum"/>
+ <h3>COMMAND SUMMARY</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+ <!-- File -->
+ <xsl:template match="file">
+ <xsl:param name="partnum"/>
+ <h3>FILE</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- Filesummary -->
+ <xsl:template match="filesummary">
+ <xsl:param name="partnum"/>
+ <h3>FILE SUMMARY</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- App -->
+ <xsl:template match="app">
+ <xsl:param name="partnum"/>
+ <h3>APPLICATION</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+
+ <!-- Appsummary -->
+ <xsl:template match="appsummary">
+ <xsl:param name="partnum"/>
+ <h3>APPLICATION SUMMARY</h3>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+ <!-- Description -->
+ <xsl:template match="description">
+ <xsl:param name="partnum"/>
+ <h3>DESCRIPTION</h3>
+ <div class="REFBODY">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </xsl:template>
+
+ <!-- Funcs -->
+ <xsl:template match="funcs">
+
+ <h3>
+ <xsl:text>EXPORTS</xsl:text>
+ </h3>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Func -->
+ <xsl:template match="func">
+ <xsl:param name="partnum"/>
+
+ <p><xsl:apply-templates select="name"/></p>
+
+ <xsl:apply-templates select="fsummary|type|desc">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <xsl:template match="name">
+
+ <xsl:variable name="tmpstring">
+ <xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
+ </xsl:variable>
+
+ <xsl:variable name="ustring">
+ <xsl:choose>
+ <xsl:when test="string-length($tmpstring) > 0">
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="$tmpstring"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="substring-after(., '(')"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="arity">
+ <xsl:call-template name="calc-arity">
+ <xsl:with-param name="string" select="substring-before($ustring, ')')"/>
+ <xsl:with-param name="no-of-pars" select="0"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="ancestor::cref">
+ <a name="{substring-before(nametext, '(')}"><span class="bold_code"><xsl:value-of select="ret"/><xsl:text> </xsl:text><xsl:value-of select="nametext"/></span></a><br/>
+ </xsl:when>
+ <xsl:when test="ancestor::erlref">
+ <a name="{substring-before(., '(')}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
+ </xsl:when>
+ </xsl:choose>
+
+
+ </xsl:template>
+
+
+ <!-- Type -->
+ <xsl:template match="type">
+ <xsl:param name="partnum"/>
+
+ <div class="REFBODY"><p>Types:</p>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+
+ </xsl:template>
+
+
+ <!-- V -->
+ <xsl:template match="v">
+ <xsl:param name="partnum"/>
+ <div class="REFTYPES">
+ <span class="bold_code">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </span><br/>
+ </div>
+ </xsl:template>
+
+ <!-- D -->
+ <xsl:template match="d">
+ <xsl:param name="partnum"/>
+ <div class="REFBODY">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </div>
+ </xsl:template>
+
+ <!-- Desc -->
+ <xsl:template match="desc">
+ <div class="REFBODY">
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </p>
+ </div>
+ </xsl:template>
+
+
+ <!-- Fsummary -->
+ <xsl:template match="fsummary">
+ <!-- This tag is skipped for now. -->
+ </xsl:template>
+
+
+ <xsl:template match="input">
+ <span class="bold_code"><xsl:apply-templates/></span>
+ </xsl:template>
+
+ <xsl:template match="seealso">
+
+ <xsl:variable name="filepart"><xsl:value-of select="substring-before(@marker, '#')"/></xsl:variable>
+ <xsl:variable name="linkpart"><xsl:value-of select="translate(substring-after(@marker, '#'), '/', '-')"/></xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($filepart) > 0">
+ <xsl:variable name="modulepart"><xsl:value-of select="substring-before($filepart, ':')"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="string-length($modulepart) > 0">
+ <xsl:variable name="filepart1"><xsl:value-of select="substring-after($filepart, ':')"/></xsl:variable>
+ <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$modulepart}','{$filepart1}.html#{$linkpart}');"><xsl:apply-templates/></a></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="string-length($linkpart) > 0">
+ <span class="bold_code"><a href="{$filepart}.html#{$linkpart}"><xsl:apply-templates/></a></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="bold_code"><a href="{$filepart}.html"><xsl:apply-templates/></a></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="string-length($linkpart) > 0">
+ <span class="bold_code"><a href="#{$linkpart}"><xsl:apply-templates/></a></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="modulepart"><xsl:value-of select="substring-before(@marker, ':')"/></xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($modulepart) > 0">
+ <xsl:variable name="filepart1"><xsl:value-of select="substring-after(@marker, ':')"/></xsl:variable>
+ <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$modulepart}','{$filepart1}.html');"><xsl:apply-templates/></a></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="bold_code"><a href="{@marker}.html"><xsl:apply-templates/></a></span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:template>
+
+
+ <xsl:template match="url">
+ <span class="bold_code"><a href="{@href}"><xsl:apply-templates/></a></span>
+ </xsl:template>
+
+
+ <xsl:template match="marker">
+ <a name="{@id}"><xsl:apply-templates/></a>
+ </xsl:template>
+
+ <xsl:template match="term">
+ <xsl:value-of select="@id"/>
+ <!-- xsl:choose>
+ <xsl:when test="boolean(termdef)">
+ <xsl:choose>
+ <xsl:when test="ancestor::parts">
+ <a href="users_guide_glossary.html#{@id}"><xsl:value-of select="@id"/></a>
+ </xsl:when>
+ <xsl:when test="ancestor::applications">
+ <a href="ref_man_glossary.html#{@id}"><xsl:value-of select="@id"/></a>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{$topdocdir}/glossary.html#{@id}"><xsl:value-of select="@id"/></a>
+ </xsl:otherwise>
+ </xsl:choose -->
+ </xsl:template>
+
+ <xsl:template match="cite">
+ <xsl:value-of select="@id"/>
+ </xsl:template>
+
+
+ <!-- Release Notes -->
+ <xsl:template match="releasenotes">
+
+ <xsl:document href="{$outdir}/release_notes.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>
+
+ <!-- Rel notes content-->
+ <xsl:template name="releasenotes.content">
+ <div class="frontpage"/>
+
+ <center><h1><xsl:value-of select="/book/header/title"/> Release Notes</h1></center>
+
+ <center><h4>Version <xsl:value-of select="$appver"/></h4></center>
+ <center><h4><xsl:value-of select="$gendate"/></h4></center>
+
+ <xsl:apply-templates select="chapter"/>
+
+ </xsl:template>
+
+ <!-- Menu.rn -->
+ <xsl:template name="menu.rn">
+ <xsl:param name="chapnum"/>
+
+ <div id="leftnav">
+ <div class="innertube">
+
+ <xsl:call-template name="menu_top"/>
+
+ <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>
+
+ <xsl:call-template name="menu_middle"/>
+
+ <p>
+ <small>
+ <strong>Chapters</strong>
+ </small>
+ </p>
+
+ <ul class="flipMenu" imagepath="{$topdocdir}/js/flipmenu">
+ <xsl:call-template name="menu.chapter">
+ <xsl:with-param name="entries" select="/book/releasenotes/chapter[header/title]"/>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:call-template>
+ </ul>
+ </div>
+ </div>
+ </xsl:template>
+
+ <!-- Glossary -->
+ <xsl:template name="glossary">
+ <xsl:param name="type"/>
+ <xsl:document href="{$outdir}/{$type}_glossary.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+ <html>
+ <head>
+ <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/>
+ <title>Erlang Documentation -- <xsl:value-of select="header/title"/></title>
+ </head>
+ <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000">
+
+ <div id="container">
+ <script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
+ <script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
+
+ <!-- Generate menu -->
+ <xsl:call-template name="menu"/>
+
+ <div id="content">
+ <div class="innertube">
+ <h1>Glossary</h1>
+ </div>
+
+ <dl>
+ <xsl:for-each select="descendant::term">
+ <xsl:sort select="@id"/>
+ <xsl:if test="boolean(termdef)">
+ <dt><a name="{@id}"><strong><xsl:value-of select="@id"/></strong></a></dt>
+ <dd><xsl:value-of select="termdef"/></dd>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+
+ <div class="footer">
+ <hr/>
+ <p>
+ <xsl:value-of select="$copyright"/>
+ <xsl:value-of select="header/copyright/year[1]"/>
+ <xsl:text>-</xsl:text>
+ <xsl:value-of select="header/copyright/year[2]"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="header/copyright/holder"/>
+ </p>
+ </div>
+
+ </div>
+ </div>
+
+ </body>
+ </html>
+
+ </xsl:document>
+ </xsl:template>
+
+ <!-- Bibliography -->
+ <xsl:template name="bibliography">
+
+ <xsl:param name="type"/>
+ <xsl:document href="{$outdir}/{$type}_bibliography.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
+ <html>
+ <head>
+ <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/>
+ <title>Erlang Documentation -- <xsl:value-of select="header/title"/></title>
+ </head>
+ <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000">
+
+ <div id="container">
+ <script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
+ <script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
+
+ <!-- Generate menu -->
+ <xsl:call-template name="menu"/>
+
+ <div id="content">
+ <div class="innertube">
+ <h1>Bibliography</h1>
+ </div>
+
+ <table>
+ <xsl:for-each select="descendant::cite">
+ <xsl:sort select="@id"/>
+ <xsl:if test="boolean(citedef)">
+ <tr>
+ <td><xsl:value-of select="@id"/></td>
+ <td><xsl:value-of select="citedef"/></td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+
+ <div class="footer">
+ <hr/>
+ <p>
+ <xsl:value-of select="$copyright"/>
+ <xsl:value-of select="header/copyright/year[1]"/>
+ <xsl:text>-</xsl:text>
+ <xsl:value-of select="header/copyright/year[2]"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="header/copyright/holder"/>
+ </p>
+ </div>
+
+ </div>
+ </div>
+
+ </body>
+ </html>
+
+ </xsl:document>
+ </xsl:template>
+
+
+ <!-- Special templates to calculate the arity of functions -->
+ <xsl:template name="calc-arity">
+ <xsl:param name="string"/>
+ <xsl:param name="no-of-pars"/>
+
+ <xsl:variable name="length">
+ <xsl:value-of select="string-length($string)"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$length > 0">
+ <xsl:call-template name="calc-arity">
+ <xsl:with-param name="string" select="substring-after($string, ',')"/>
+ <xsl:with-param name="no-of-pars" select="$no-of-pars+1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$no-of-pars"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="remove-paren">
+ <xsl:param name="string"/>
+
+ <xsl:variable name="bstring">
+ <xsl:value-of select="substring-before($string, '(')"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($bstring) > 0">
+ <xsl:variable name="astring">
+ <xsl:value-of select="substring-after($string, ')')"/>
+ </xsl:variable>
+ <xsl:variable name="retstring">
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="$astring"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="concat($bstring, $retstring)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </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
new file mode 100644
index 0000000000..2373200702
--- /dev/null
+++ b/lib/erl_docgen/priv/xsl/db_html_params.xsl
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ #
+ # %CopyrightBegin%
+ #
+ # Copyright Ericsson AB 2009. All Rights Reserved.
+ #
+ # The contents of this file are subject to the Erlang Public License,
+ # Version 1.1, (the "License"); you may not use this file except in
+ # compliance with the License. You should have received a copy of the
+ # Erlang Public License along with this software. If not, it can be
+ # retrieved online at http://www.erlang.org/.
+ #
+ # Software distributed under the License is distributed on an "AS IS"
+ # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ # the License for the specific language governing rights and limitations
+ # under the License.
+ #
+ # %CopyrightEnd%
+
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <!-- When using <code>, whitespaces should be preserved -->
+ <xsl:preserve-space elements="code"/>
+
+
+ <!-- Fixed strings -->
+ <xsl:variable name="companyname"><xsl:value-of select="header/copyright/holder"/></xsl:variable>
+ <xsl:variable name="copyright">Copyright &#169; </xsl:variable>
+
+
+
+</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
new file mode 100644
index 0000000000..c759a77496
--- /dev/null
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ #
+ # %CopyrightBegin%
+ #
+ # Copyright Ericsson AB 2009. All Rights Reserved.
+ #
+ # The contents of this file are subject to the Erlang Public License,
+ # Version 1.1, (the "License"); you may not use this file except in
+ # compliance with the License. You should have received a copy of the
+ # Erlang Public License along with this software. If not, it can be
+ # retrieved online at http://www.erlang.org/.
+ #
+ # Software distributed under the License is distributed on an "AS IS"
+ # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ # the License for the specific language governing rights and limitations
+ # under the License.
+ #
+ # %CopyrightEnd%
+
+ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:preserve-space elements="code pre"/>
+ <xsl:strip-space elements="*"/>
+ <xsl:output method="text" encoding="UTF-8" indent="no"/>
+
+ <!-- Header -->
+ <xsl:template match="header">
+ </xsl:template>
+
+ <!-- Section/Title -->
+ <xsl:template match="section/title">
+ </xsl:template>
+
+ <!-- *ref/Section -->
+ <xsl:template match="erlref/section|comref/section|cref/section|fileref/section|appref/section">
+ <xsl:text>&#10;.RE&#10;</xsl:text>
+ <xsl:text>&#10;.SH "</xsl:text><xsl:value-of select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>"&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- *ref/Subsection -->
+ <xsl:template match="erlref/section/section|comref/section/section|cref/section/section|fileref/section/section|appref/section/section">
+ <xsl:text>&#10;.RE&#10;</xsl:text>
+ <xsl:text>&#10;.SS "</xsl:text><xsl:value-of select="title"/><xsl:text>"&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+
+ <!-- Lists -->
+
+ <xsl:template match="list">
+ <xsl:text>&#10;.RS 2&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.RE&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="list/item">
+ <xsl:text>&#10;.TP 2&#10;</xsl:text>
+ <xsl:text>*&#10;</xsl:text>
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ <xsl:text>&#10;.br&#10;</xsl:text>
+ <xsl:text>&#10;.br&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="taglist">
+ <xsl:text>&#10;.RS 2&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.RE&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="taglist/tag">
+ <xsl:text>&#10;.TP 4&#10;</xsl:text>
+ <xsl:text>.B&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="item/p">
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ <xsl:text>&#10;.br&#10;</xsl:text>
+ <xsl:text>&#10;.br&#10;</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template match="taglist/item">
+ <xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Note -->
+ <xsl:template match="note">
+ <xsl:text>&#10;.TP 4&#10;.B&#10;Note:&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Warning -->
+ <xsl:template match="warning">
+ <xsl:text>&#10;.TP 4&#10;.B&#10;Warning:&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="warning/p|note/p">
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ <xsl:text>&#10;.LP&#10;</xsl:text>
+ </xsl:template>
+
+
+ <!-- Paragraph -->
+ <xsl:template match="p">
+ <xsl:text>&#10;.LP&#10;</xsl:text>
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ </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="br">
+ <xsl:text>&#10;.br&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="c">
+ <xsl:text> \fI</xsl:text><xsl:value-of select="text()"/><xsl:text>\fR\&amp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="em">
+ <xsl:text> \fI</xsl:text><xsl:value-of select="text()"/><xsl:text>\fR\&amp;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="seealso">
+ <xsl:text> \fB</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
+ </xsl:template>
+
+ <!-- Code -->
+ <xsl:template match="code">
+ <xsl:text>&#10;.nf&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.fi&#10;</xsl:text>
+ </xsl:template>
+
+ <!-- Pre -->
+ <xsl:template match="pre">
+ <xsl:text>&#10;.nf&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.fi&#10;</xsl:text>
+ </xsl:template>
+
+
+ <!-- Table -->
+ <xsl:template match="table">
+ </xsl:template>
+
+ <!--xsl:template match="row">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="cell">
+ <xsl:apply-templates/>
+ </xsl:template -->
+
+
+ <!-- Image -->
+ <xsl:template match="image">
+ </xsl:template>
+
+
+ <!-- Reference Manual -->
+
+ <!-- Application -->
+ <xsl:template match="application">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Erlref -->
+ <xsl:template match="/erlref">
+ <xsl:text>.TH </xsl:text><xsl:value-of select="module"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Module Definition"&#10;</xsl:text>
+ <xsl:text>.SH MODULE&#10;</xsl:text>
+ <xsl:value-of select="module"/><xsl:text> \- </xsl:text><xsl:value-of select="modulesummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Comref -->
+ <xsl:template match="/comref">
+ <xsl:text>.TH </xsl:text><xsl:value-of select="com"/><xsl:text> 1 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "User Commands"&#10;</xsl:text>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="com"/><xsl:text> \- </xsl:text><xsl:value-of select="comsummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Cref -->
+ <xsl:template match="/cref">
+ <xsl:text>.TH </xsl:text><xsl:value-of select="lib"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "C Library Functions"&#10;</xsl:text>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="lib"/><xsl:text> \- </xsl:text><xsl:value-of select="libsummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Fileref -->
+ <xsl:template match="/fileref">
+ <xsl:text>.TH </xsl:text><xsl:value-of select="file"/><xsl:text> 4 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Files"&#10;</xsl:text>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Appref -->
+ <xsl:template match="/appref">
+ <xsl:text>.TH </xsl:text><xsl:value-of select="app"/><xsl:text> 6 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Application Definition"&#10;</xsl:text>
+ <xsl:text>.SH NAME&#10;</xsl:text>
+ <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Module|Com|Lib|File|App-->
+ <xsl:template match="module|com|lib|file|app">
+ </xsl:template>
+
+ <!-- Modulesummary|Comsummary|Libsummary|Filesummary|Appsummary -->
+ <xsl:template match="modulesummary|comsummary|libsummary|filesummary|appsummary">
+ </xsl:template>
+
+ <!-- Description -->
+ <xsl:template match="description">
+ <xsl:text>.SH DESCRIPTION</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Funcs -->
+ <xsl:template match="funcs">
+ <xsl:text>&#10;.SH EXPORTS</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- Func -->
+ <xsl:template match="func">
+ <xsl:text>&#10;.LP</xsl:text>
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="name">
+ <xsl:text>&#10;.B&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.br</xsl:text>
+ </xsl:template>
+
+
+ <!-- Type -->
+ <xsl:template match="type">
+ <xsl:text>&#10;.RS</xsl:text>
+ <xsl:text>&#10;.TP</xsl:text>
+ <xsl:text>&#10;Types</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.RE</xsl:text>
+ </xsl:template>
+
+
+ <!-- V -->
+ <xsl:template match="v">
+ <xsl:text>&#10;</xsl:text><xsl:value-of select="normalize-space(text())"/>
+ <xsl:text>&#10;.br</xsl:text>
+ </xsl:template>
+
+ <!-- D -->
+ <xsl:template match="d">
+ <xsl:text>&#10;</xsl:text><xsl:apply-templates/>
+ <xsl:text>&#10;.br</xsl:text>
+ </xsl:template>
+
+ <!-- Desc -->
+ <xsl:template match="desc">
+ <xsl:text>&#10;.RS</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#10;.RE</xsl:text>
+ </xsl:template>
+
+
+ <!-- Fsummary -->
+ <xsl:template match="fsummary">
+ <!-- This tag is skipped for now. -->
+ </xsl:template>
+
+ <!-- xsl:template match="p/text()">
+ <xsl:value-of select="normalize-space()"/>
+ </xsl:template-->
+
+ <xsl:template match="d/text()">
+ <xsl:value-of select="normalize-space()"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
new file mode 100644
index 0000000000..bef86277ea
--- /dev/null
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -0,0 +1,1129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ #
+ # %CopyrightBegin%
+ #
+ # Copyright Ericsson AB 2009. All Rights Reserved.
+ #
+ # The contents of this file are subject to the Erlang Public License,
+ # Version 1.1, (the "License"); you may not use this file except in
+ # compliance with the License. You should have received a copy of the
+ # Erlang Public License along with this software. If not, it can be
+ # retrieved online at http://www.erlang.org/.
+ #
+ # Software distributed under the License is distributed on an "AS IS"
+ # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ # the License for the specific language governing rights and limitations
+ # under the License.
+ #
+ # %CopyrightEnd%
+
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+ <xsl:output method="xml" indent="yes"/>
+
+ <xsl:include href="db_pdf_params.xsl"/>
+
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="book"/>
+ </xsl:template>
+
+
+ <xsl:template match="book">
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+ <!-- Master pages -->
+ <fo:layout-master-set>
+ <fo:simple-page-master
+ master-name="cover"
+ margin="25mm">
+ <xsl:attribute name="page-height">
+ <xsl:value-of select="$page-height"/>
+ </xsl:attribute>
+ <xsl:attribute name="page-width">
+ <xsl:value-of select="$page-width"/>
+ </xsl:attribute>
+ <fo:region-body
+ margin="0mm"/>
+ </fo:simple-page-master>
+
+ <fo:simple-page-master
+ master-name="left-page"
+ margin-top="25mm"
+ margin-bottom="15mm"
+ margin-left="20mm"
+ margin-right="25mm">
+ <xsl:attribute name="page-height">
+ <xsl:value-of select="$page-height"/>
+ </xsl:attribute>
+ <xsl:attribute name="page-width">
+ <xsl:value-of select="$page-width"/>
+ </xsl:attribute>
+ <fo:region-body
+ margin-top="15mm"
+ margin-bottom="20mm"/>
+ <fo:region-before
+ region-name="left-header"
+ extent="10mm"/>
+ <fo:region-after
+ region-name="left-footer"
+ extent="10mm"/>
+ </fo:simple-page-master>
+
+ <fo:simple-page-master
+ master-name="right-page"
+ margin-top="25mm"
+ margin-bottom="15mm"
+ margin-left="25mm"
+ margin-right="20mm">
+ <xsl:attribute name="page-height">
+ <xsl:value-of select="$page-height"/>
+ </xsl:attribute>
+ <xsl:attribute name="page-width">
+ <xsl:value-of select="$page-width"/>
+ </xsl:attribute>
+ <fo:region-body
+ margin-top="15mm"
+ margin-bottom="20mm"/>
+ <fo:region-before
+ region-name="right-header"
+ extent="10mm"/>
+ <fo:region-after
+ region-name="right-footer"
+ extent="10mm"/>
+ </fo:simple-page-master>
+
+
+ <fo:page-sequence-master master-name="document">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference
+ master-reference="left-page"
+ odd-or-even="even"/>
+ <fo:conditional-page-master-reference
+ master-reference="right-page"
+ odd-or-even="odd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+
+
+ <!-- Process bookmarks -->
+ <xsl:call-template name="bookmarks.tree"/>
+
+ <!-- Process cover page -->
+ <xsl:apply-templates select="header"/>
+
+ <!-- Process toc -->
+ <!-- xsl:call-template name="toc"/ -->
+
+ <fo:page-sequence
+ font-family="serif"
+ master-reference="document"
+ initial-page-number="1">
+ <xsl:attribute name="font-size">
+ <xsl:value-of select="$base-font-size"/>
+ </xsl:attribute>
+
+ <fo:static-content flow-name="left-header">
+ <fo:block xsl:use-attribute-sets="page-header" text-align="start">
+ <fo:retrieve-marker
+ retrieve-boundary="page-sequence"
+ retrieve-class-name="chapter-title"
+ retrieve-position="first-including-carryover"/>
+ </fo:block>
+ </fo:static-content>
+
+ <fo:static-content flow-name="right-header">
+ <fo:block xsl:use-attribute-sets="page-header" text-align="end">
+ <fo:retrieve-marker
+ retrieve-boundary="page-sequence"
+ retrieve-class-name="chapter-title"
+ retrieve-position="first-including-carryover"/>
+ </fo:block>
+ </fo:static-content>
+
+ <fo:static-content flow-name="left-footer">
+ <fo:block xsl:use-attribute-sets="page-footer" text-align="start">
+ <fo:page-number/>
+ <xsl:text> | </xsl:text>
+ <xsl:value-of select="$companyname"/>:
+ <xsl:value-of select="/book/header/title"/>
+ </fo:block>
+ </fo:static-content>
+
+ <fo:static-content flow-name="right-footer">
+ <fo:block xsl:use-attribute-sets="page-footer" text-align="end">
+ <xsl:value-of select="$companyname"/>:
+ <xsl:value-of select="/book/header/title"/>
+ <xsl:text> | </xsl:text>
+ <fo:page-number/>
+ </fo:block>
+ </fo:static-content>
+
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+
+ </fo:block>
+ <xsl:apply-templates select="parts"/>
+
+ <xsl:apply-templates select="applications"/>
+
+ </fo:flow>
+
+ </fo:page-sequence>
+
+ </fo:root>
+
+ </xsl:template>
+
+
+ <!-- Header -->
+ <xsl:template match="book/header">
+ <xsl:apply-templates select="title"/>
+ </xsl:template>
+
+
+ <!-- Cover page -->
+ <xsl:template match="header/title">
+ <fo:page-sequence
+ font-family="sans-serif"
+ force-page-count="even"
+ master-reference="cover">
+ <xsl:attribute name="font-size">
+ <xsl:value-of select="$base-font-size"/>
+ </xsl:attribute>
+
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block xsl:use-attribute-sets="cover.logo">
+ <fo:external-graphic src="{$docgen}/priv/images/erlang-logo.gif"/>
+ </fo:block>
+ <fo:block xsl:use-attribute-sets="cover.title" id="cover-page">
+ <xsl:apply-templates/>
+ </fo:block>
+ <fo:block xsl:use-attribute-sets="cover.copyright">
+ <xsl:value-of select="$copyright"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$companyname"/>
+ </fo:block>
+ <xsl:if test="/book/header/title">
+ <fo:block xsl:use-attribute-sets="cover.version">
+ <xsl:value-of select="/book/header/title"/>
+ <xsl:text> </xsl:text>
+ <!-- xsl:value-of select="/book/header/rev"/ -->
+ <xsl:value-of select="$appver"/>
+ </fo:block>
+ </xsl:if>
+ <fo:block xsl:use-attribute-sets="cover.version">
+ <xsl:value-of select="$gendate"/>
+ </fo:block>
+
+ <!-- Inner cover (copyright notice) -->
+ <fo:block break-before="page"
+ xsl:use-attribute-sets="cover.inner.copyright">
+ <xsl:value-of select="$copyright"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$companyname"/>
+ </fo:block>
+ <fo:block xsl:use-attribute-sets="cover.inner.copyrightnotice">
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ The Initial Developer of the Original Code is
+ <xsl:value-of select="$companyname"/>.
+ </fo:block>
+ <fo:block xsl:use-attribute-sets="cover.inner.date">
+ <xsl:value-of select="$gendate"/>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+
+ </xsl:template>
+
+
+ <!-- Bookmarks -->
+ <xsl:template name="bookmarks.tree">
+ <fo:bookmark-tree>
+ <fo:bookmark internal-destination="cover-page"
+ starting-state="show">
+ <fo:bookmark-title>
+ <xsl:value-of select="/book/header/title"/>
+ </fo:bookmark-title>
+
+ <xsl:call-template name="bookmarks1">
+ <xsl:with-param name="entries" select="parts/part[header/title]"/>
+ </xsl:call-template>
+ <xsl:call-template name="bookmarks4">
+ <xsl:with-param name="entries" select="applications/application[header/title]"/>
+ </xsl:call-template>
+
+ </fo:bookmark>
+ </fo:bookmark-tree>
+ </xsl:template>
+
+
+ <!-- Users Guide Bookmarks -->
+
+ <xsl:template name="bookmarks1">
+ <xsl:param name="entries"/>
+ <xsl:if test="$entries != ''">
+
+ <fo:bookmark internal-destination="{generate-id(/book/parts/part)}"
+ starting-state="hide">
+ <fo:bookmark-title>User's Guide</fo:bookmark-title>
+
+ <xsl:for-each select="$entries">
+ <xsl:call-template name="bookmarks2">
+ <xsl:with-param name="entries"
+ select="chapter[header/title]"/>
+ </xsl:call-template>
+ </xsl:for-each>
+
+ </fo:bookmark>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="bookmarks2">
+ <xsl:param name="entries"/>
+ <xsl:for-each select="$entries">
+ <fo:bookmark internal-destination="{generate-id(header/title)}"
+ starting-state="hide">
+ <fo:bookmark-title>
+ <xsl:value-of select="header/title"/>
+ </fo:bookmark-title>
+
+ <xsl:call-template name="bookmarks3">
+ <xsl:with-param name="entries"
+ select="section[title]"/>
+ </xsl:call-template>
+
+ </fo:bookmark>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="bookmarks3">
+ <xsl:param name="entries"/>
+ <xsl:for-each select="$entries">
+ <fo:bookmark internal-destination="{generate-id(title)}"
+ starting-state="hide">
+ <fo:bookmark-title>
+ <xsl:value-of select="title"/>
+ </fo:bookmark-title>
+ <xsl:call-template name="bookmarks3">
+ <xsl:with-param name="entries"
+ select="section[title]"/>
+ </xsl:call-template>
+ </fo:bookmark>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- Ref. Manual Bookmarks -->
+
+ <xsl:template name="bookmarks4">
+ <xsl:param name="entries"/>
+
+ <xsl:if test="$entries != ''">
+ <fo:bookmark internal-destination="{generate-id(/book/applications/application)}"
+ starting-state="hide">
+ <fo:bookmark-title>Reference Manual</fo:bookmark-title>
+ <xsl:for-each select="$entries">
+
+ <xsl:call-template name="bookmarks5">
+ <xsl:with-param name="entries"
+ select="erlref[module]|comref[com]|cref[lib]|fileref[file]|appref[app]"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </fo:bookmark>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template name="bookmarks5">
+ <xsl:param name="entries"/>
+ <xsl:for-each select="$entries">
+ <fo:bookmark internal-destination="{generate-id(module)}{generate-id(lib)}{generate-id(com)}{generate-id(file)}{generate-id(app)}"
+ starting-state="hide">
+ <fo:bookmark-title><xsl:value-of select="module"/><xsl:value-of select="lib"/><xsl:value-of select="com"/><xsl:value-of select="file"/><xsl:value-of select="app"/></fo:bookmark-title>
+ <!-- xsl:choose>
+ <xsl:when test="ancestor::erlref">
+ <xsl:value-of select="module"/>
+ </xsl:when>
+ <xsl:when test="ancestor::cref">
+ <xsl:value-of select="lib"/>
+ </xsl:when>
+ <xsl:when test="ancestor::comref">
+ <xsl:value-of select="com"/>
+ </xsl:when>
+ </xsl:choose>
+ </fo:bookmark-title -->
+ <xsl:call-template name="bookmarks6">
+ <xsl:with-param name="entries"
+ select="funcs/func/name"/>
+ </xsl:call-template>
+ </fo:bookmark>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="bookmarks6">
+ <xsl:param name="entries"/>
+ <xsl:for-each select="$entries">
+
+ <xsl:choose>
+ <xsl:when test="ancestor::cref">
+ <fo:bookmark internal-destination="{generate-id(nametext)}" starting-state="hide">
+ <xsl:variable name="fname"><xsl:value-of select="substring-before(nametext, '(')"/></xsl:variable>
+ <fo:bookmark-title>
+ <xsl:choose>
+ <xsl:when test="string-length($fname) > 0">
+ <xsl:value-of select="$fname"/>()
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="nametext"/>()
+ </xsl:otherwise>
+ </xsl:choose>
+ </fo:bookmark-title>
+ </fo:bookmark>
+ </xsl:when>
+ <xsl:when test="ancestor::erlref">
+ <fo:bookmark internal-destination="{generate-id(.)}" starting-state="hide">
+ <xsl:variable name="tmpstring">
+ <xsl:value-of select="substring-before(substring-after(., '('), '->')"/>
+ </xsl:variable>
+
+ <xsl:variable name="ustring">
+ <xsl:choose>
+ <xsl:when test="string-length($tmpstring) > 0">
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="$tmpstring"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="substring-after(., '(')"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="arity">
+ <xsl:call-template name="calc-arity">
+ <xsl:with-param name="string" select="substring-before($ustring, ')')"/>
+ <xsl:with-param name="no-of-pars" select="0"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <fo:bookmark-title>
+ <xsl:value-of select="substring-before(., '(')"/>/<xsl:value-of select="$arity"/>
+ </fo:bookmark-title>
+ </fo:bookmark>
+ </xsl:when>
+ </xsl:choose>
+
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <!-- UG part -->
+
+ <!-- Parts -->
+ <xsl:template match="parts">
+ <xsl:apply-templates select="part"/>
+ </xsl:template>
+
+ <!-- Part -->
+ <xsl:template match="part">
+ <xsl:variable name="partnum"><xsl:number level="any" from="book" count="part|application"/></xsl:variable>
+
+ <fo:block xsl:use-attribute-sets="h1" id="{generate-id()}">
+ <xsl:value-of select="$partnum"/>&#160;&#160;&#160;
+ <xsl:text>User's Guide</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates select="description">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ <xsl:apply-templates select="chapter">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+
+ <!-- Chapter -->
+ <xsl:template match="chapter">
+ <xsl:param name="partnum"/>
+
+ <fo:block xsl:use-attribute-sets="h2" id="{generate-id(header/title)}">
+ <fo:marker marker-class-name="chapter-title">
+ <xsl:value-of select="$partnum"/>.<xsl:number/>&#160;&#160;<xsl:value-of select="header/title"/>
+ </fo:marker>
+ <xsl:value-of select="$partnum"/>.<xsl:number/>&#160;&#160;<xsl:value-of select="header/title"/>
+
+ </fo:block>
+
+ <xsl:apply-templates select="section|quote|warning|note|br|image|marker|table|p|pre|code|list|taglist|codeinclude|erleval">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ <xsl:with-param name="chapnum"><xsl:number/></xsl:with-param>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Chapter/Section -->
+ <xsl:template match="chapter/section">
+ <xsl:param name="partnum"/>
+ <xsl:param name="chapnum"/>
+ <fo:block xsl:use-attribute-sets="h3" id="{generate-id(title)}">
+ <xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:number/>&#160;
+ <xsl:value-of select="title"/>
+ </fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="sectnum"><xsl:number/></xsl:with-param>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Chapter/Subsection -->
+ <xsl:template match="chapter/section/section">
+ <xsl:param name="partnum"/>
+ <xsl:param name="chapnum"/>
+ <xsl:param name="sectnum"/>
+ <fo:block xsl:use-attribute-sets="h4" id="{generate-id(title)}">
+ <!-- xsl:value-of select="$partnum"/>.<xsl:value-of select="$chapnum"/>.<xsl:value-of select="$sectnum"/>.<xsl:number/ -->
+ <xsl:value-of select="title"/>
+ </fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="sectnum" select="$sectnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+
+
+ <!-- *ref/Section -->
+ <xsl:template match="erlref/section|comref/section|cref/section|fileref/section|appref/section">
+ <xsl:param name="partnum"/>
+ <xsl:param name="chapnum"/>
+ <fo:block xsl:use-attribute-sets="h3" id="{generate-id(title)}">
+ <xsl:value-of select="title"/>
+ </fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- *ref/Subsection -->
+ <xsl:template match="erlref/section/section|comref/section/section|cref/section/section|fileref/section/section|appref/section/section">
+ <xsl:param name="partnum"/>
+ <xsl:param name="chapnum"/>
+ <xsl:param name="sectnum"/>
+ <fo:block xsl:use-attribute-sets="h4" id="{generate-id(title)}">
+ <xsl:value-of select="title"/>
+ </fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <!-- Section/title -->
+ <xsl:template match="section/title">
+ </xsl:template>
+
+ <!-- Lists -->
+
+ <xsl:template match="list">
+ <xsl:param name="partnum"/>
+ <fo:list-block xsl:use-attribute-sets="listblock">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ <!-- xsl:apply-templates -->
+ <!-- xsl:with-param name="chapnum" select="$chapnum"/ -->
+ <!-- /xsl:apply-templates -->
+ </fo:list-block>
+ </xsl:template>
+
+ <xsl:template match="list/item">
+ <xsl:param name="partnum"/>
+ <fo:list-item xsl:use-attribute-sets="listitem">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>
+ &#x2022;
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()" format="justify">
+ <fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+
+ <xsl:template match="taglist">
+ <xsl:param name="partnum"/>
+ <fo:block xsl:use-attribute-sets="taglistblock">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template match="taglist/tag">
+ <xsl:param name="partnum"/>
+ <fo:block xsl:use-attribute-sets="tag">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template>
+
+
+ <xsl:template match="taglist/item">
+ <xsl:param name="partnum"/>
+ <fo:block xsl:use-attribute-sets="tagitem">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
+
+ <!-- Note -->
+ <xsl:template match="note">
+ <xsl:param name="partnum"/>
+ <fo:block xsl:use-attribute-sets="note">
+ <fo:block xsl:use-attribute-sets="note-warning-title">
+ <xsl:text>Note:</xsl:text>
+ </fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
+ <!-- Warning -->
+ <xsl:template match="warning">
+ <xsl:param name="partnum"/>
+ <fo:block xsl:use-attribute-sets="warning">
+ <fo:block xsl:use-attribute-sets="note-warning-title">
+ <xsl:text>Warning:</xsl:text>
+ </fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:template>
+
+
+ <!-- Paragraph -->
+ <xsl:template match="p">
+ <fo:block xsl:use-attribute-sets="p">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template>
+
+
+ <!-- Inline elements -->
+ <xsl:template match="b">
+ <fo:inline font-weight="bold">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="br">
+ <fo:block/>
+ </xsl:template>
+
+ <xsl:template match="c">
+ <fo:inline font-family="monospace">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="em">
+ <fo:inline font-style="italic">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
+ <!-- Code -->
+ <xsl:template match="code">
+ <xsl:param name="partnum"/>
+ <xsl:variable name="codenum">
+ <xsl:number level="any" from="part" count="code"/>
+ </xsl:variable>
+
+ <fo:block xsl:use-attribute-sets="code" margin-left="1.5em">
+ <xsl:apply-templates select="text()"/>
+ </fo:block>
+
+ <xsl:if test="@caption">
+ <fo:block xsl:use-attribute-sets="caption" margin-left="1.5em">
+ Code listing <xsl:value-of select="$partnum"/>.<xsl:value-of select="$codenum"/>:&#160;
+ <xsl:value-of select="@caption"/>
+ </fo:block>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Pre -->
+ <xsl:template match="pre">
+ <xsl:param name="partnum"/>
+ <xsl:variable name="codenum">
+ <xsl:number level="any" from="part" count="code"/>
+ </xsl:variable>
+
+ <fo:block xsl:use-attribute-sets="code" margin-left="1.5em">
+ <xsl:apply-templates/>
+ </fo:block>
+
+ <xsl:if test="@caption">
+ <fo:block xsl:use-attribute-sets="caption" margin-left="1.5em">
+ Code listing <xsl:value-of select="$partnum"/>.<xsl:value-of select="$codenum"/>:&#160;
+ <xsl:value-of select="@caption"/>
+ </fo:block>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- Ref. manual part -->
+
+ <!-- Applications -->
+ <xsl:template match="applications">
+ <xsl:apply-templates select="application"/>
+ </xsl:template>
+
+ <!-- Application -->
+ <xsl:template match="application">
+ <xsl:variable name="partnum">
+ <xsl:number level="any" from="book" count="part|application"/>
+ </xsl:variable>
+
+ <fo:block xsl:use-attribute-sets="h1" id="{generate-id()}">
+ <xsl:if test="/book/header/title">
+ <xsl:value-of select="$partnum"/>&#160;&#160;&#160;
+ <xsl:text>Reference Manual</xsl:text>
+ </xsl:if>
+ </fo:block>
+
+
+ <xsl:apply-templates select="description">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ <xsl:apply-templates select="erlref|comref|cref|fileref|appref">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Erlref -->
+ <xsl:template match="erlref">
+ <xsl:param name="partnum"/>
+
+ <fo:block page-break-before="always" xsl:use-attribute-sets="module-header" id="{generate-id(module)}">
+ <fo:block xsl:use-attribute-sets="module-name">
+ <!-- Mark title for header printout -->
+ <fo:marker marker-class-name="chapter-title">
+ <xsl:value-of select="module"/>
+ </fo:marker>
+ <xsl:value-of select="module"/>
+ </fo:block>
+ <xsl:text>Erlang module</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Comref -->
+ <xsl:template match="comref">
+ <xsl:param name="partnum"/>
+
+ <fo:block page-break-before="always" xsl:use-attribute-sets="module-header" id="{generate-id(com)}">
+ <fo:block xsl:use-attribute-sets="module-name">
+ <!-- Mark title for header printout -->
+ <fo:marker marker-class-name="chapter-title">
+ <xsl:value-of select="com"/>
+ </fo:marker>
+ <xsl:value-of select="com"/>
+ </fo:block>
+ <xsl:text>Command</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Cref -->
+ <xsl:template match="cref">
+ <xsl:param name="partnum"/>
+
+ <fo:block page-break-before="always" xsl:use-attribute-sets="module-header" id="{generate-id(lib)}">
+ <fo:block xsl:use-attribute-sets="module-name">
+ <!-- Mark title for header printout -->
+ <fo:marker marker-class-name="chapter-title">
+ <xsl:value-of select="lib"/>
+ </fo:marker>
+ <xsl:value-of select="lib"/>
+ </fo:block>
+ <xsl:text>C Library</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Fileref -->
+ <xsl:template match="fileref">
+ <xsl:param name="partnum"/>
+
+ <fo:block page-break-before="always" xsl:use-attribute-sets="module-header" id="{generate-id(file)}">
+ <fo:block xsl:use-attribute-sets="module-name">
+ <!-- Mark title for header printout -->
+ <fo:marker marker-class-name="chapter-title">
+ <xsl:value-of select="file"/>
+ </fo:marker>
+ <xsl:value-of select="file"/>
+ </fo:block>
+ <xsl:text>Name</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Appref -->
+ <xsl:template match="appref">
+ <xsl:param name="partnum"/>
+
+ <fo:block page-break-before="always" xsl:use-attribute-sets="module-header" id="{generate-id(app)}">
+ <fo:block xsl:use-attribute-sets="module-name">
+ <!-- Mark title for header printout -->
+ <fo:marker marker-class-name="chapter-title">
+ <xsl:value-of select="app"/>
+ </fo:marker>
+ <xsl:value-of select="app"/>
+ </fo:block>
+ <xsl:text>Application</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- *ref Header -->
+ <xsl:template match="erlref/header|comref/header|cref/header|fileref/header|appref/header">
+ <fo:block>
+ <xsl:text></xsl:text>
+ </fo:block>
+ </xsl:template>
+
+ <!-- Modulesummary -->
+ <xsl:template match="modulesummary">
+ <xsl:param name="partnum"/>
+ <fo:block>
+ <xsl:text></xsl:text>
+ </fo:block>
+ </xsl:template>
+
+ <!-- Description -->
+ <xsl:template match="description">
+ <xsl:param name="partnum"/>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Funcs -->
+ <xsl:template match="funcs">
+
+ <fo:block xsl:use-attribute-sets="h3">
+ <xsl:text>Exports</xsl:text>
+ </fo:block>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+ <!-- Func -->
+ <xsl:template match="func">
+ <xsl:param name="partnum"/>
+
+ <fo:block xsl:use-attribute-sets="function-name">
+ <xsl:apply-templates select="name"/>
+ </fo:block>
+
+ <xsl:apply-templates select="fsummary|type|desc">
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+
+ <xsl:template match="name">
+ <xsl:param name="partnum"/>
+ <xsl:choose>
+ <xsl:when test="ancestor::cref">
+ <fo:block id="{generate-id(nametext)}">
+ <xsl:value-of select="ret"/><xsl:text> </xsl:text><xsl:value-of select="nametext"/>
+ </fo:block>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:block id="{generate-id(.)}">
+ <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+
+ <!-- Type -->
+ <xsl:template match="type">
+ <xsl:param name="partnum"/>
+
+ <fo:block>
+ <xsl:text>Types:</xsl:text>
+ </fo:block>
+
+ <fo:list-block xsl:use-attribute-sets="type-listblock">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:list-block>
+
+ </xsl:template>
+
+
+ <!-- V -->
+ <xsl:template match="v">
+ <xsl:param name="partnum"/>
+ <fo:list-item xsl:use-attribute-sets="type-listitem">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>
+ </fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()" format="justify">
+ <fo:block font-weight="bold">
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <!-- D -->
+ <xsl:template match="d">
+ <xsl:param name="partnum"/>
+ <fo:list-item xsl:use-attribute-sets="type-listitem">
+ <fo:list-item-label end-indent="label-end()"><fo:block></fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()" format="justify">
+ <fo:block>
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <!-- Desc -->
+ <xsl:template match="desc">
+
+ <xsl:apply-templates>
+ <xsl:with-param name="partnum" select="$partnum"/>
+ </xsl:apply-templates>
+
+ </xsl:template>
+
+
+ <!-- Fsummary -->
+ <xsl:template match="fsummary">
+ <!-- This tag is skipped for now. -->
+ </xsl:template>
+
+
+ <!-- Table -->
+ <xsl:template match="table">
+ <xsl:param name="chapnum"/>
+ <xsl:variable name="tabnum">
+ <xsl:number level="any" from="chapter" count="table"/>
+ </xsl:variable>
+ <fo:table xsl:use-attribute-sets="table">
+ <fo:table-body>
+ <xsl:apply-templates select="row">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="tabnum" select="$tabnum"/>
+ </xsl:apply-templates>
+ </fo:table-body>
+ </fo:table>
+ <xsl:apply-templates select="tcaption">
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="tabnum" select="$tabnum"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+
+ <xsl:template match="row">
+ <fo:table-row>
+ <xsl:apply-templates/>
+ </fo:table-row>
+ </xsl:template>
+
+ <xsl:template match="cell">
+ <fo:table-cell xsl:use-attribute-sets="table-cell">
+ <xsl:call-template name="cell-valign"/>
+ <fo:block>
+ <xsl:call-template name="cell-align"/>
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:table-cell>
+ </xsl:template>
+
+ <xsl:template match="tcaption">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="tabnum"/>
+
+ <fo:block xsl:use-attribute-sets="caption">
+ Table
+ <xsl:value-of select="$chapnum"/>.<xsl:value-of select="$tabnum"/>:
+ &#160;
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template>
+
+
+ <!-- Image -->
+ <xsl:template match="image">
+ <xsl:param name="chapnum"/>
+ <xsl:variable name="fignum">
+ <xsl:number level="any" from="chapter" count="image"/>
+ </xsl:variable>
+
+ <fo:block xsl:use-attribute-sets="image">
+ <fo:external-graphic content-width="60%" src="{@file}"/>
+
+ <xsl:apply-templates>
+ <xsl:with-param name="chapnum" select="$chapnum"/>
+ <xsl:with-param name="fignum" select="$fignum"/>
+ </xsl:apply-templates>
+
+ </fo:block>
+
+ </xsl:template>
+
+
+ <xsl:template match="icaption">
+ <xsl:param name="chapnum"/>
+ <xsl:param name="fignum"/>
+
+ <fo:block xsl:use-attribute-sets="caption">
+ Figure
+ <xsl:value-of select="$chapnum"/>.<xsl:value-of select="$fignum"/>:
+ &#160;
+ <xsl:apply-templates/>
+ </fo:block>
+
+ </xsl:template>
+
+
+ <xsl:template match="input">
+ <fo:inline font-weight="bold">
+ <xsl:apply-templates select="text()"/>
+ </fo:inline>
+ </xsl:template>
+
+
+ <xsl:template match="seealso">
+ <fo:inline font-style="italic">
+ <xsl:apply-templates/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="url">
+ <fo:inline font-weight="bold">
+ <fo:basic-link external-destination="href">
+ <xsl:apply-templates/>
+ </fo:basic-link>
+ </fo:inline>
+ </xsl:template>
+
+
+
+ <!-- Special templates to calculate the arity of functions -->
+ <xsl:template name="calc-arity">
+ <xsl:param name="string"/>
+ <xsl:param name="no-of-pars"/>
+
+ <xsl:variable name="length">
+ <xsl:value-of select="string-length($string)"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$length > 0">
+ <xsl:call-template name="calc-arity">
+ <xsl:with-param name="string" select="substring-after($string, ',')"/>
+ <xsl:with-param name="no-of-pars" select="$no-of-pars+1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$no-of-pars"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="remove-paren">
+ <xsl:param name="string"/>
+
+ <xsl:variable name="bstring">
+ <xsl:value-of select="substring-before($string, '(')"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($bstring) > 0">
+ <xsl:variable name="astring">
+ <xsl:value-of select="substring-after($string, ')')"/>
+ </xsl:variable>
+ <xsl:variable name="retstring">
+ <xsl:call-template name="remove-paren">
+ <xsl:with-param name="string" select="$astring"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="concat($bstring, $retstring)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
new file mode 100644
index 0000000000..e2e264b90a
--- /dev/null
+++ b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl
@@ -0,0 +1,406 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ #
+ # %CopyrightBegin%
+ #
+ # Copyright Ericsson AB 2009. All Rights Reserved.
+ #
+ # The contents of this file are subject to the Erlang Public License,
+ # Version 1.1, (the "License"); you may not use this file except in
+ # compliance with the License. You should have received a copy of the
+ # Erlang Public License along with this software. If not, it can be
+ # retrieved online at http://www.erlang.org/.
+ #
+ # Software distributed under the License is distributed on an "AS IS"
+ # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ # the License for the specific language governing rights and limitations
+ # under the License.
+ #
+ # %CopyrightEnd%
+
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+ <!-- When using <code>, whitespaces should be preserved -->
+ <xsl:preserve-space elements="code"/>
+
+
+ <!-- Fixed strings -->
+ <xsl:variable name="companyname"><xsl:value-of select="/book/header/copyright/holder"/></xsl:variable>
+ <xsl:variable name="copyright">Copyright &#169; <xsl:value-of select="/book/header/copyright/year[1]"/><xsl:text>-</xsl:text><xsl:value-of select="substring-after(substring-after($gendate, ' '), ' ')"/></xsl:variable>
+
+ <!-- FIXME: remove when appendix creation has been fixed -->
+ <!-- xsl:variable name="appendix_title"-->
+ <!-- xsl:text>Appendix: Unix man pages for ConfD</xsl:text-->
+ <!-- /xsl:variable-->
+
+ <!-- Font size (all other font sizes should be proportional to this -->
+ <xsl:param name="base-font-size">10pt</xsl:param>
+
+ <!-- Paper size: A4 (297x210 mm) -->
+ <xsl:param name="page-height">297mm</xsl:param>
+ <xsl:param name="page-width">210mm</xsl:param>
+
+ <!-- Paper size: US Letter (279x216 mm) -->
+ <!--
+ <xsl:param name="page-height">11in</xsl:param>
+ <xsl:param name="page-width">8.5in</xsl:param>
+ -->
+
+
+ <!-- XSL-FO properties -->
+ <xsl:attribute-set name="caption">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">0.8em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="keep-with-previous.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">2.5em</xsl:attribute>
+ <xsl:attribute name="space-before">0em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="pre">
+ <xsl:attribute name="font-family">monospace</xsl:attribute>
+ <xsl:attribute name="font-size">0.8em</xsl:attribute>
+ <xsl:attribute name="keep-together.within-page">auto</xsl:attribute>
+ <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
+ <xsl:attribute name="padding-after">0em</xsl:attribute>
+ <!-- Compensate for empty line that always seems to appear here now... -->
+ <xsl:attribute name="padding-before">-1em</xsl:attribute>
+ <xsl:attribute name="white-space-collapse">false</xsl:attribute>
+ <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
+ <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.copyright">
+ <xsl:attribute name="font-size">0.9em</xsl:attribute>
+ <xsl:attribute name="text-align">end</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.logo">
+ <xsl:attribute name="space-before">130mm</xsl:attribute>
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
+ <xsl:attribute name="text-align">end</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.title">
+ <xsl:attribute name="border-before-style">solid</xsl:attribute>
+ <xsl:attribute name="border-before-width">10pt</xsl:attribute>
+ <xsl:attribute name="border-color">#960003</xsl:attribute>
+ <xsl:attribute name="font-size">2.3em</xsl:attribute>
+ <xsl:attribute name="padding-before">0.5em</xsl:attribute>
+ <xsl:attribute name="text-align">end</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.version">
+ <xsl:attribute name="font-size">0.9em</xsl:attribute>
+ <xsl:attribute name="text-align">end</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.inner.copyright">
+ <xsl:attribute name="border-before-style">solid</xsl:attribute>
+ <xsl:attribute name="border-before-width">1pt</xsl:attribute>
+ <xsl:attribute name="border-color">#960003</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="padding-before">0.5em</xsl:attribute>
+ <xsl:attribute name="space-before">200mm</xsl:attribute>
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.inner.copyrightnotice">
+ <xsl:attribute name="font-size">0.9em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="cover.inner.date">
+ <xsl:attribute name="font-size">0.9em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="space-before">2em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="dd">
+ <xsl:attribute name="start-indent">2em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="dt">
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="image">
+ <xsl:attribute name="space-after">0.5em</xsl:attribute>
+ <xsl:attribute name="space-before">0.5em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="listblock">
+ <xsl:attribute name="provisional-distance-between-starts">1.8em</xsl:attribute>
+ <xsl:attribute name="provisional-label-separation">1em</xsl:attribute>
+ <xsl:attribute name="space-after">0.25em</xsl:attribute>
+ <xsl:attribute name="space-before">0.25em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="listitem">
+ <xsl:attribute name="space-after">0.25em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="taglistblock">
+ <xsl:attribute name="space-after">0.25em</xsl:attribute>
+ <xsl:attribute name="space-before">0.25em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="tag">
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="tagitem">
+ <xsl:attribute name="start-indent">2em</xsl:attribute>
+ </xsl:attribute-set>
+
+
+ <xsl:attribute-set name="h1">
+ <xsl:attribute name="border-after-style">solid</xsl:attribute>
+ <xsl:attribute name="border-after-width">1pt</xsl:attribute>
+ <xsl:attribute name="border-color">#960003</xsl:attribute>
+ <xsl:attribute name="break-before">page</xsl:attribute>
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">1.83em</xsl:attribute>
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
+ <xsl:attribute name="space-after">1em</xsl:attribute>
+ <xsl:attribute name="space-before">2em</xsl:attribute>
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="h2">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">1.5em</xsl:attribute>
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0.3em</xsl:attribute>
+ <xsl:attribute name="space-before">1em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="h3">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">1.33em</xsl:attribute>
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0.3em</xsl:attribute>
+ <xsl:attribute name="space-before">0.8em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="h4">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">1.17em</xsl:attribute>
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0.3em</xsl:attribute>
+ <xsl:attribute name="space-before">0.6em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="h5">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">1em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0.2em</xsl:attribute>
+ <xsl:attribute name="space-before">0.4em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="h6">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">0.83em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0em</xsl:attribute>
+ <xsl:attribute name="space-before">0.4em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="p">
+ <xsl:attribute name="font-size">1em</xsl:attribute>
+ <!-- <xsl:attribute name="keep-together.within-page">always</xsl:attribute>-->
+ <xsl:attribute name="space-after">0.5em</xsl:attribute>
+ <xsl:attribute name="space-before">0.5em</xsl:attribute>
+ <xsl:attribute name="text-align">justify</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="page-header">
+ <xsl:attribute name="border-after-style">solid</xsl:attribute>
+ <xsl:attribute name="border-after-width">2pt</xsl:attribute>
+ <xsl:attribute name="border-color">#960003</xsl:attribute>
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">0.9em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="page-footer">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">0.9em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="code">
+ <xsl:attribute name="background-color">#e0e0ff</xsl:attribute>
+ <xsl:attribute name="font-family">monospace</xsl:attribute>
+ <xsl:attribute name="font-size">0.8em</xsl:attribute>
+ <xsl:attribute name="keep-together.within-page">auto</xsl:attribute>
+ <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
+ <xsl:attribute name="padding-before">0em</xsl:attribute>
+ <xsl:attribute name="padding-after">1em</xsl:attribute>
+ <xsl:attribute name="space-after">1em</xsl:attribute>
+ <xsl:attribute name="space-before">2em</xsl:attribute>
+ <xsl:attribute name="white-space-collapse">false</xsl:attribute>
+ <xsl:attribute name="white-space-treatment">preserve</xsl:attribute>
+ <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
+ </xsl:attribute-set>
+
+
+
+ <xsl:attribute-set name="toc.level1">
+ <xsl:attribute name="space-before">1em</xsl:attribute>
+ </xsl:attribute-set>
+
+<xsl:attribute-set name="note">
+ <xsl:attribute name="background-color">#d0fed0</xsl:attribute>
+ <xsl:attribute name="space-after">1em</xsl:attribute>
+ <xsl:attribute name="space-before">2em</xsl:attribute>
+ <xsl:attribute name="text-align">justify</xsl:attribute>
+ <xsl:attribute name="padding-before">1em</xsl:attribute>
+ <xsl:attribute name="padding-after">0.3em</xsl:attribute>
+ <xsl:attribute name="padding-left">1em</xsl:attribute>
+ <xsl:attribute name="padding-right">1em</xsl:attribute>
+ <xsl:attribute name="keep-together.within-page">always</xsl:attribute>
+ </xsl:attribute-set>
+
+<xsl:attribute-set name="warning">
+ <xsl:attribute name="background-color">#ffd6d6</xsl:attribute>
+ <xsl:attribute name="space-after">1em</xsl:attribute>
+ <xsl:attribute name="space-before">2em</xsl:attribute>
+ <xsl:attribute name="text-align">justify</xsl:attribute>
+ <xsl:attribute name="padding-before">1em</xsl:attribute>
+ <xsl:attribute name="padding-after">0.3em</xsl:attribute>
+ <xsl:attribute name="padding-left">1em</xsl:attribute>
+ <xsl:attribute name="padding-right">1em</xsl:attribute>
+ <xsl:attribute name="keep-together.within-page">always</xsl:attribute>
+ </xsl:attribute-set>
+
+
+ <xsl:attribute-set name="note-warning-title">
+ <xsl:attribute name="font-size">1.33em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="module-header">
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">2em</xsl:attribute>
+ <xsl:attribute name="space-before">1em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="module-name">
+ <xsl:attribute name="border-after-style">solid</xsl:attribute>
+ <xsl:attribute name="border-after-width">1pt</xsl:attribute>
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">1.5em</xsl:attribute>
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0.3em</xsl:attribute>
+ <xsl:attribute name="space-before">1em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="function-name">
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="font-family">monospace</xsl:attribute>
+ <!-- xsl:attribute name="font-size">0.8em</xsl:attribute -->
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">0.3em</xsl:attribute>
+ <xsl:attribute name="space-before">1.5em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="type-listblock">
+ <xsl:attribute name="provisional-distance-between-starts">1.8em</xsl:attribute>
+ <xsl:attribute name="provisional-label-separation">1em</xsl:attribute>
+ <xsl:attribute name="space-after">0.25em</xsl:attribute>
+ <xsl:attribute name="space-before">0.25em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="type-listitem">
+ <xsl:attribute name="space-after">0.25em</xsl:attribute>
+ </xsl:attribute-set>
+
+
+ <xsl:attribute-set name="table">
+ <!-- Only border-collapse="separate" is supported in current FOP
+ (if this is not set, border on spanned cells will not work) -->
+ <xsl:attribute name="border-collapse">separate</xsl:attribute>
+ <xsl:attribute name="space-after">1em</xsl:attribute>
+ <xsl:attribute name="space-before">1em</xsl:attribute>
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
+ <!-- Just to get rid of some info reports, should be removed when fop supports table-layout auto -->
+ <xsl:attribute name="inline-progression-dimension">100%</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="table-cell">
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="border-width">0.5pt</xsl:attribute>
+ <xsl:attribute name="display-align">before</xsl:attribute>
+ <xsl:attribute name="padding-after">0.5em</xsl:attribute>
+ <xsl:attribute name="padding-before">0.5em</xsl:attribute>
+ <xsl:attribute name="padding-end">0.3em</xsl:attribute>
+ <xsl:attribute name="padding-start">0.3em</xsl:attribute>
+ <xsl:attribute name="text-align">start</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="table-header">
+ <xsl:attribute name="border-style">solid</xsl:attribute>
+ <xsl:attribute name="border-width">1pt</xsl:attribute>
+ <xsl:attribute name="display-align">before</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="padding-after">0.5em</xsl:attribute>
+ <xsl:attribute name="padding-before">0.5em</xsl:attribute>
+ <xsl:attribute name="padding-end">0.3em</xsl:attribute>
+ <xsl:attribute name="padding-start">0.3em</xsl:attribute>
+ <xsl:attribute name="text-align">center</xsl:attribute>
+ </xsl:attribute-set>
+
+
+ <xsl:template name="cell-valign">
+ <xsl:choose>
+ <xsl:when test="@valign='top'">
+ <xsl:attribute name="display-align">before</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="@valign='middle'">
+ <xsl:attribute name="display-align">center</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="@valign='bottom'">
+ <xsl:attribute name="display-align">after</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="cell-align">
+ <xsl:choose>
+ <xsl:when test="@align='left'">
+ <xsl:attribute name="text-align">start</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="@align='center'">
+ <xsl:attribute name="text-align">center</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="@align='right'">
+ <xsl:attribute name="text-align">end</xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:attribute-set name="image">
+ <xsl:attribute name="space-after">0.5em</xsl:attribute>
+ <xsl:attribute name="space-before">0.5em</xsl:attribute>
+ </xsl:attribute-set>
+
+ <xsl:attribute-set name="caption">
+ <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+ <xsl:attribute name="font-size">0.8em</xsl:attribute>
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ <xsl:attribute name="keep-with-previous.within-page">always</xsl:attribute>
+ <xsl:attribute name="space-after">2.5em</xsl:attribute>
+ <xsl:attribute name="space-before">0em</xsl:attribute>
+ </xsl:attribute-set>
+
+</xsl:stylesheet>