From b201fd5bcdb85c8db42618df2b8c510752be38f0 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Tue, 07 Feb 2012 11:21:31 +0000
Subject: [PATCH] Partial fix for COMMWEB-36: Use make.clean.html and docbook.css.source for styling HTML output
---
/dev/null | 238 -----------------------
opendj3/src/main/docbkx-stylesheets/html/chunked.xsl | 19 +
opendj3/src/main/docbkx-stylesheets/html/coredoc.xsl | 18 +
opendj3/src/main/docbkx/shared/sec-formatting-conventions.xml | 14 -
opendj3/pom.xml | 20 +-
opendj3/src/main/resources/css/docbook.css | 248 ++++++++++++++++++++++++
6 files changed, 285 insertions(+), 272 deletions(-)
diff --git a/opendj3/pom.xml b/opendj3/pom.xml
index fc14a5b..61ade90 100644
--- a/opendj3/pom.xml
+++ b/opendj3/pom.xml
@@ -411,22 +411,22 @@
<replacevalue>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
-// On double-click, reformat <pre class="screen"> for easy copying.
+// On double-click, reformat <div class="screen"> for easy copying.
$(document).ready(function() {
$(".screen").attr("title", "Double-click [-] to flatten lines.");
$(".screen").prepend('<img src="../images/minus.png" class="toggle">');
});
$(".screen").live("dblclick", function() {
$(this).replaceWith(
- "<pre class=\"flat\" title=\"Double-click [+] to wrap long lines.\">" +
+ "<div class=\"flat\" title=\"Double-click [+] to wrap long lines.\">" +
$(this).html().replace(/minus\.png/,"plus.png").replace(/\n /g," ") + "\n<!--" + $(this).html() + "-->" +
- "</pre>");
+ "</div>");
});
$(".flat").live("dblclick", function() {
$(this).replaceWith(
- "<pre class=\"screen\" title=\"Double-click [-] to flatten lines.\">" +
+ "<div class=\"screen\" title=\"Double-click [-] to flatten lines.\">" +
$(this).html().replace(/(.|\n)+<!\-\-/m,"").replace(/\-\-\>/,"").replace(/plus\.png/,"minus.png") +
- "</pre>");
+ "</div>");
});
</script>
<link rel="shortcut icon" href="http://forgerock.org/favicon.ico">
@@ -500,22 +500,22 @@
<replacevalue>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
-// On double-click, reformat <pre class="screen"> for easy copying.
+// On double-click, reformat <div class="screen"> for easy copying.
$(document).ready(function() {
$(".screen").attr("title", "Double-click [-] to flatten lines.");
$(".screen").prepend('<img src="./images/minus.png" class="toggle">');
});
$(".screen").live("dblclick", function() {
$(this).replaceWith(
- "<pre class=\"flat\" title=\"Double-click [+] to wrap long lines.\">" +
+ "<div class=\"flat\" title=\"Double-click [+] to wrap long lines.\">" +
$(this).html().replace(/minus\.png/,"plus.png").replace(/\n /g," ") + "\n<!--" + $(this).html() + "-->" +
- "</pre>");
+ "</div>");
});
$(".flat").live("dblclick", function() {
$(this).replaceWith(
- "<pre class=\"screen\" title=\"Double-click [-] to flatten lines.\">" +
+ "<div class=\"screen\" title=\"Double-click [-] to flatten lines.\">" +
$(this).html().replace(/(.|\n)+<!\-\-/m,"").replace(/\-\-\>/,"").replace(/plus\.png/,"minus.png") +
- "</pre>");
+ "</div>");
});
</script>
<link rel="shortcut icon" href="http://forgerock.org/favicon.ico">
diff --git a/opendj3/src/main/docbkx-stylesheets/html/chunked.xsl b/opendj3/src/main/docbkx-stylesheets/html/chunked.xsl
index b32508c..29baa06 100644
--- a/opendj3/src/main/docbkx-stylesheets/html/chunked.xsl
+++ b/opendj3/src/main/docbkx-stylesheets/html/chunked.xsl
@@ -20,7 +20,7 @@
!
! CCPL HEADER END
!
- ! Copyright 2011 ForgeRock AS
+ ! Copyright 2011-2012 ForgeRock AS
!
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -29,13 +29,22 @@
<xsl:import href="urn:docbkx:stylesheet" />
<xsl:import href="urn:docbkx:stylesheet/highlight.xsl" />
- <xsl:param name="html.stylesheet">css/coredoc.css</xsl:param>
+ <xsl:param name="make.clean.html" select="1" />
+ <xsl:param name="docbook.css.link" select="0" />
+ <xsl:param name="html.stylesheet">css/docbook.css</xsl:param>
+ <xsl:param name="admon.style">
+ <xsl:value-of select="string('font-style: italic;')"></xsl:value-of>
+ </xsl:param>
+ <xsl:param name="default.table.frame">none</xsl:param>
+ <xsl:param name="default.table.rules">none</xsl:param>
+ <xsl:param name="table.cell.border.thickness">0pt</xsl:param>
+
<xsl:param name="chunk.section.depth" select="0" />
<xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
- <xsl:param name="chunker.output.indent">yes</xsl:param>
<xsl:param name="generate.legalnotice.link" select="1" />
<xsl:param name="root.filename">index</xsl:param> <!-- docbkx-tools ignores this. -->
<xsl:param name="use.id.as.filename" select="1" />
+
<xsl:param name="generate.toc">
appendix nop
article/appendix nop
@@ -59,10 +68,6 @@
<xsl:param name="toc.max.depth" select="1" />
<xsl:param name="generate.meta.abstract" select="1" />
- <xsl:param name="default.table.frame">none</xsl:param>
- <xsl:param name="default.table.rules">none</xsl:param>
- <xsl:param name="table.cell.border.thickness">0pt</xsl:param>
-
<xsl:template match="xslthl:keyword" mode="xslthl">
<strong class="hl-keyword">
<xsl:apply-templates mode="xslthl"/>
diff --git a/opendj3/src/main/docbkx-stylesheets/html/coredoc.xsl b/opendj3/src/main/docbkx-stylesheets/html/coredoc.xsl
index 7606bfa..05a8cdf 100644
--- a/opendj3/src/main/docbkx-stylesheets/html/coredoc.xsl
+++ b/opendj3/src/main/docbkx-stylesheets/html/coredoc.xsl
@@ -20,7 +20,7 @@
!
! CCPL HEADER END
!
- ! Copyright 2011 ForgeRock AS
+ ! Copyright 2011-2012 ForgeRock AS
!
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -29,10 +29,20 @@
<xsl:import href="urn:docbkx:stylesheet" />
<xsl:import href="urn:docbkx:stylesheet/highlight.xsl" />
- <xsl:param name="html.stylesheet">css/coredoc.css</xsl:param>
+ <xsl:param name="make.clean.html" select="1" />
+ <xsl:param name="docbook.css.link" select="0" />
+ <xsl:param name="html.stylesheet">css/docbook.css</xsl:param>
+ <xsl:param name="admon.style">
+ <xsl:value-of select="string('font-style: italic;')"></xsl:value-of>
+ </xsl:param>
+ <xsl:param name="default.table.frame">none</xsl:param>
+ <xsl:param name="default.table.rules">none</xsl:param>
+ <xsl:param name="table.cell.border.thickness">0pt</xsl:param>
+
<xsl:param name="generate.legalnotice.link" select="1" />
<xsl:param name="root.filename">index</xsl:param> <!-- docbkx-tools ignores this. -->
<xsl:param name="use.id.as.filename" select="1" />
+
<xsl:param name="generate.toc">
appendix nop
article/appendix nop
@@ -56,10 +66,6 @@
<xsl:param name="toc.max.depth" select="1" />
<xsl:param name="generate.meta.abstract" select="1" />
- <xsl:param name="default.table.frame">none</xsl:param>
- <xsl:param name="default.table.rules">none</xsl:param>
- <xsl:param name="table.cell.border.thickness">0pt</xsl:param>
-
<xsl:template match="xslthl:keyword" mode="xslthl">
<strong class="hl-keyword">
<xsl:apply-templates mode="xslthl"/>
diff --git a/opendj3/src/main/docbkx/shared/sec-formatting-conventions.xml b/opendj3/src/main/docbkx/shared/sec-formatting-conventions.xml
index 79870f5..6da751a 100644
--- a/opendj3/src/main/docbkx/shared/sec-formatting-conventions.xml
+++ b/opendj3/src/main/docbkx/shared/sec-formatting-conventions.xml
@@ -35,17 +35,9 @@
<filename>filenames</filename>, <command>commands</command>, and
<literal>literal values</literal>.</para>
- <screen>
-$ echo Terminal sessions with very long lines are formatted with lines folded
- by default to make them easier to read on the screen and to make them fit
- on the printed page. In the HTML version, you can double-click the text to
- toggle between the folded version for easy reading and the flat, syntactically
- correct version for easy copy/pasting.
-Terminal sessions with very long lines are formatted with lines folded
- by default to make them easier to read on the screen and to make them fit
- on the printed page. In the HTML version, you can double-click the text to
- toggle between the folded version for easy reading and the flat, syntactically
- correct version for easy copy/pasting.</screen>
+ <screen>$ echo Terminal sessions are formatted with line folding for easier reading.
+ In the HTML version, double-click to toggle between the folded version and
+ the flat, copy-paste version. > /dev/null</screen>
<para>In many cases, sections pertaining to UNIX, GNU/Linux, Mac OS X, BSD,
and so forth are marked (UNIX). Sections pertaining to Microsoft Windows
diff --git a/opendj3/src/main/resources/css/coredoc.css b/opendj3/src/main/resources/css/coredoc.css
deleted file mode 100644
index 6c4e0c9..0000000
--- a/opendj3/src/main/resources/css/coredoc.css
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * CCPL HEADER START
- *
- * This work is licensed under the Creative Commons
- * Attribution-NonCommercial-NoDerivs 3.0 Unported License.
- * To view a copy of this license, visit
- * http://creativecommons.org/licenses/by-nc-nd/3.0/
- * or send a letter to Creative Commons, 444 Castro Street,
- * Suite 900, Mountain View, California, 94041, USA.
- *
- * You can also obtain a copy of the license at
- * trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * If applicable, add the following below this CCPL HEADER, with the fields
- * enclosed by brackets "[]" replaced with your own identifying information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CCPL HEADER END
- *
- * Copyright 2011 ForgeRock AS
- *
-*/
-
-/*
- * ForgeRock core documentation styles to be used with HTML
- * generated from DocBook 5 XML source.
- */
-
-/*
- * Basic content and text styles
- */
-body
-{
- font-family: DejaVu, Verdana, Helvetica, Arial, sans-serif;
- /* TODO: is this the right way to restrict width? */
- max-width: 800px;
- margin-left: auto;
- margin-right: auto;
- color: #333;
-}
-
-/* START advice from http://diveintoaccessibility.org/day_26_using_relative_font_sizes.html */
-
-p {
- font-size: 12px;
- line-height: 1.3em;
-}
-
-/*/*/a{}
-body p {
- font-size: x-small;
- voice-family: "\"}\"";
- voice-family: inherit;
- font-size: small;
-}
-html>body p {
- font-size: small;
-}
-/* */
-
-/* END advice from http://diveintoaccessibility.org/day_26_using_relative_font_sizes.html */
-
-a
-{
- text-decoration: none; /* Do not underline links. */
- font-size: 12px;
-}
-
-a:link {
- color:#47a;
-}
-
-a:visited {
- color:#68a;
-}
-
-a:active, a:hover {
- color:#990000;
-}
-
-code,.command>strong,div.literallayout,.filename
-{
- font-family: monospace;
- font-weight: normal;
-}
-
-code,.command,.copyright,div.index,div.literallayout>p,.filename,h3.author,.term,.step
-{
- font-size: 12px;
- font-weight: normal;
-}
-
-h1
-{
- color: #626D75; /* ForgeRock gray */
- font-size: 24px;
-}
-
-h2,h3,h4,h5,h6
-{
- color: #333;
-}
-
-h2
-{
- font-size: 17px;
-}
-
-h3
-{
- font-size: 15px;
-}
-
-h4
-{
- font-size: 14px;
-}
-
-h5
-{
- font-size: 13px;
-}
-
-hr
-{
- display: none;
-}
-
-ul
-{
- list-style-image: url("../images/bulletpoint.png");
-}
-
-/*
- * Page navigation for chunked HTML
- */
-div.navfooter,div.navheader,div.nukefooter
-{
- background-color: #fafafa;
-}
-
-div.navheader
-{
- border-bottom: thin solid #ccc;
-}
-
-/* Do not repeat the title at the top of the page. */
-.navheader th
-{
- color: #fafafa; /* Same color as background. */
- font-size: 0px; /* Take up as little space as possible. */
-}
-
-.navheader td,.navfooter td,.nukefooter td
-{
- font-size: x-small;
- font-style: italic;
-}
-
-/*
- * Block elements
- */
-pre.programlisting,pre.screen,pre.flat
-{
- font-family: monospace;
- white-space: pre;
- background-color: #fafafa;
- border: thin dashed #ccc;
- padding: 6px;
-}
-
-pre.screen,pre.flat
-{
- text-indent: -18px;
-}
-
-.toggle
-{
- position: relative;
- left: -40px;
- float:left;
-}
-
-div.abstract,div.important,div.caution,div.note,div.tip,div.warning,div.example,div.toc
-{
- border: thin dotted #ccc;
- padding: 6px;
-}
-
-div.appendix,div.chapter,div.preface
-{
- border-bottom: thin solid #ccc;
-}
-
-.important,.caution,.note,.tip,.warning
-{
- font-style: italic;
-}
-
-.abstract,.example,.toc
-{
- margin: 6px;
- font-size: 12px;
-}
-
-img
-{
- max-width: 640px;
- height: auto;
- max-height: 480px;
-}
-
-ol,th,td
-{
- font-size: 12px;
-}
-
-.table-contents
-{
- border-top: thin solid #ccc;
- border-bottom: thin solid #ccc;
-}
-
-.table-contents thead {
- text-align: left;
-}
-
-/*
- * Man pages
- */
-.refnamediv>h2,.refsect1>h2,.refsynopsisdiv>h2
-{
- font-size: 13px;
-}
-
-/* TODO: Man page div content should be indented more than the title. */
diff --git a/opendj3/src/main/resources/css/docbook.css b/opendj3/src/main/resources/css/docbook.css
new file mode 100644
index 0000000..1b1de66
--- /dev/null
+++ b/opendj3/src/main/resources/css/docbook.css
@@ -0,0 +1,248 @@
+body {
+ color: #333;
+ font-family: DejaVu, Verdana, Helvetica, Arial, sans-serif;
+ font-size: 84%; /* 100% would be medium, 16px. */
+ margin-left: auto;
+ margin-right: auto;
+ max-width: 800px;
+}
+
+dd,
+dl,
+dt,
+li,
+ol,
+p,
+td,
+th,
+ul {
+ font-size: 1em;
+}
+
+a {
+ text-decoration: none;
+}
+
+a:link {
+ color: #47a;
+}
+
+a:visited {
+ color: #68a;
+}
+
+a:active, a:hover {
+ color: #990000;
+}
+
+.author {
+ font-size: 1em;
+ font-weight: normal;
+}
+
+code,
+.command>strong,
+div.literallayout,
+.filename {
+ font-family: monospace;
+ font-size: 1.1em;
+ font-weight: normal;
+}
+
+code,
+.command,
+.copyright,
+div.index,
+div.literallayout p,
+.filename,
+.term,
+.step {
+ font-weight: normal;
+}
+
+h1 {
+ color: #626D75;
+ font-size: 2em;
+}
+
+h2 {
+ color: #333
+ font-size: 1.8em;
+}
+
+h3 {
+ color: #333
+ font-size: 1.6em;
+}
+
+h4 {
+ color: #333
+ font-size: 1.4em;
+}
+
+h5 {
+ color: #333
+ font-size: 1.2em;
+}
+
+h6 {
+ color: #333
+ font-size: 1em;
+}
+
+hr {
+ display: none;
+}
+
+ul {
+ list-style-image: url("../images/bulletpoint.png");
+}
+
+div.refentry h2 {
+ font-size: 1.1em;
+}
+
+div.refentry h3 {
+ font-size: 1.0em;
+}
+
+div.navfooter,
+div.navheader,
+div.nukefooter {
+ background-color: #fafafa;
+}
+
+div.navheader {
+ border-bottom: thin solid #ccc;
+}
+
+.navheader th {
+ color: #fafafa;
+ font-size: 0em;
+}
+
+.navheader td,
+.navfooter td,
+.nukefooter td {
+ font-size: 0.8em;
+ font-style: italic;
+}
+
+div.abstract,
+div.toc {
+ border: thin dotted #ccc;
+ margin-bottom: 0.25em;
+ margin-top: 0.25em;
+ padding-bottom: 0.25em;
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ padding-top: 0.75em;
+}
+
+div.important,
+div.caution,
+div.note,
+div.tip,
+div.warning {
+ border: thin dotted #ccc;
+ font-style: italic;
+ margin-bottom: 0.25em;
+ margin-top: 0.25em;
+ padding-bottom: 0.25em;
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ padding-top: 0.25em;
+}
+
+div.appendix,
+div.chapter,
+div.index,
+div.preface {
+ border-bottom: thin solid #ccc;
+}
+
+img {
+ height: auto;
+ max-width: 640px;
+ max-height: 480px;
+}
+
+table {
+ font-size: 1em;
+}
+
+.table-contents {
+ border-bottom: thin solid #ccc;
+ border-spacing: 0.5em;
+ border-top: thin solid #ccc;
+}
+
+.table-contents thead {
+ text-align: left;
+}
+
+div.table-title {
+ margin-bottom: 0.5em;
+}
+
+div.abstract-title,
+div.blockquote-title,
+div.example-title,
+div.equation-title,
+div.figure-title,
+div.itemizedlist-title,
+div.orderedlist-title,
+div.procedure-title,
+div.sidebar-title,
+div.table-title,
+div.toc-title,
+div.variablelist-title
+{
+ font-weight: bold;
+}
+
+div.programlisting,
+div.flat,
+div.screen,
+div.synopsis {
+ background-color: #fafafa;
+ border: thin dashed #ccc;
+ font-family: monospace;
+ font-size: 1.1em;
+ margin-bottom: 1em;
+ padding: 0.5em;
+ white-space: pre;
+}
+
+div.flat,
+div.screen {
+ text-indent: -18px;
+}
+
+.toggle {
+ position: relative;
+ left: -40px;
+ float: left;
+}
+
+.formalpara-title {
+ font-weight: bold;
+}
+
+div.msglevel,
+div.msgorig,
+div.msgaud,
+div.msgexplan {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+span.msgmain-title,
+span.msgsub-title,
+span.msgrel-title,
+span.msglevel-title,
+span.msgorig-title,
+span.msgaud-title,
+span.msgexplan-title {
+ font-weight: bold;
+}
--
Gitblit v1.10.0