Steve Beuret wrote:
> In working with Standard Edition 2.3 I figured out a few minor
> modifications. I'm about to apply these changes to 2.4 in the most
> easily maintainable way rather than editing so many files that will
> get replaced in the next release.
>
> Most of the changes (summarized below) had to do with tweaking the
> appearance in the html output via stylesheet adjustments and adding
> my own header and footer. Another very important change was to get
> the function synopsis and it's related components to work better
> both in the html and in XXE itself, where the funcprototype stuff
> all runs together otherwise.
>
> Isn't there a clever way to do a this that avoids altering so many
> files from the stock distribution?
>
> Standard Edition 2.3 - list of modified files
>
> config/docbook/xsl/css/html.css - many changes
> config/docbook/xsl/html/chunk.xsl
> Added my own header and footer xsl:import href="sb.xsl"
> config/docbook/xsl/html/sb.xsl - see chunk.xsl
> makes the header and footer
> config/docbook/xsl/html/synop.xsl - for improved function synopsis
> config/docbook/xsl/html/param.xsl (4 changes)
> config/sdocbook/css/sdocbook.incl
> added to end for function stuff (note #1)
> set margin top & bottom for lists 1.33ex to .66ex
>
> Note #1:
> /* SB added */
> funcsynopsis, funcprotoype, funcdef, function, paramdef, parameter {
> font-family: monospace;
> font-size: 1.33em;
> }
> paramdef {
> display: block;
> }
> parameter {
> font-weight: bold;
> }
> replaceable {
> font-style: normal;
> font-size: .85em;
> }
> replaceable:before {
> content: " ";
> }
>
[1] Create a docbook subdirectory/ in ~/.xxe2/config/ (C:\Documents and
Settings\<user>\xxe2\config\ on Windows). This is not indispensable but
just cleaner.
[2] Copy the whole XXE_install_dir/config/docbook/xsl/ to
~/.xxe2/config/docbook/.
This xsl/ subdirectory is assumed to contain the .xsl files you customized.
[3] Copy mydocbook.css (see attachment) to ~/.xxe2/config/docbook/.
mydocbook.css:
---
@import "/home/hussein/src/xxe/distrib/config/docbook/css/docbook.css";
funcsynopsis, funcprotoype, funcdef, function, paramdef, parameter {
font-family: monospace;
font-size: 1.33em;
}
paramdef {
display: block;
}
parameter {
font-weight: bold;
}
replaceable {
font-style: normal;
font-size: .85em;
}
replaceable:before {
content: " ";
}
---
[4] Copy mydocbook.xxe (see attachment) to ~/.xxe2/config/docbook/.
mydocbook.xxe:
---
<?xml version='1.0' encoding='ISO-8859-1'?>
<configuration name="DocBook"
xsi:schemaLocation="http://www.xmlmind.com/xmleditor/schema/configuration
../configuration/xsd/configuration.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
<include location="docbook/docbook.xxe" system="true" />
<css name="My DocBook" location="mydocbook.css" />
<command name="docb.toHTML">
<process>
<mkdir dir="resources" />
<!-- add attribute selection="true" to copyDocument if you want
to be able to process explicitely selected element -->
<copyDocument to="__doc.xml">
<resources match="(https|http|ftp)://.*" />
<resources match=".+" copyTo="resources" />
</copyDocument>
<mkdir dir="callouts" />
<copyProcessResources
resources="@xsl/images/callouts/gif_callouts.list"
to="callouts" />
<copyProcessResources resources="xsl/css/html.css" to="html.css" />
<transform stylesheet="xsl/html/chunk.xsl"
file="__doc.xml" to="__doc.html" >
<parameter name="base.dir">%W%S</parameter>
<parameter name="chunk.first.sections">1</parameter>
<parameter name="chunk.section.depth">1</parameter>
<parameter name="toc.section.depth">3</parameter>
<parameter name="section.autolabel">1</parameter>
<parameter name="html.stylesheet">html.css</parameter>
<parameter name="callout.graphics">1</parameter>
<parameter name="callout.graphics.path">callouts/</parameter>
<parameter name="callout.graphics.extension">.gif</parameter>
</transform>
<!-- The real HTML file is index.html -->
<delete files="__doc.*" />
<upload base="%0/">
<copyFiles files="*.*" toDir="." />
<copyFiles files="resources/*" toDir="resources" />
<copyFiles files="callouts/*" toDir="callouts" />
</upload>
</process>
</command>
<!--
=================================================================== -->
<command name="docb.toHTML1">
<process>
<mkdir dir="resources" />
<copyDocument to="__doc.xml">
<resources match="(https|http|ftp)://.*" />
<resources match=".+" copyTo="resources" />
</copyDocument>
<mkdir dir="callouts" />
<copyProcessResources
resources="@xsl/images/callouts/gif_callouts.list"
to="callouts" />
<copyProcessResources resources="xsl/css/html.css" to="html.css" />
<transform stylesheet="xsl/html/docbook.xsl"
file="__doc.xml" to="__doc.html" >
<parameter name="generate.toc">%0</parameter>
<parameter name="toc.section.depth">3</parameter>
<parameter name="section.autolabel">%1</parameter>
<parameter name="html.stylesheet">html.css</parameter>
<parameter name="callout.graphics">1</parameter>
<parameter name="callout.graphics.path">callouts/</parameter>
<parameter name="callout.graphics.extension">.gif</parameter>
</transform>
<upload base="%2">
<copyFile file="__doc.html" to="%2" />
<copyFile file="html.css" to="html.css" />
<copyFiles files="resources/*" toDir="resources" />
<copyFiles files="callouts/*" toDir="callouts" />
</upload>
</process>
</command>
</configuration>
---
[5] Restart XXE. From now, please directly modify mydocbook.css,
mydocbook.xxe and any .xsl file contained in your private xsl/ subdirectory.
If you need to do all this, not only for you, but also for a group of
XXE users, this is possible too but you'll have to create a similar
docbook/ subdirectory on a HTTP server and then use the XXE_CONFIG
environment variable. This is described in the Power User's Guide.
PS: Note that V2.4 supports very well refentry and al. and that you
should try new DocBook CSS style sheet without any adjustment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mydocbook.css
Type: text/css
Size: 376 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20030908/6710aa5f/attachment.css
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mydocbook.xxe
Url:
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20030908/6710aa5f/attachment.bat