Migrate to latest sdocbook plugin

This commit is contained in:
Carlos Sanchez 2004-12-28 23:25:49 +00:00
parent 1ef3c87bf2
commit 41beeaad15
6 changed files with 120 additions and 20 deletions

View File

@ -15,7 +15,7 @@
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY db_xsl_bak "docbook-bak.xsl">
<!ENTITY db_xsl "docbook.xsl">
<!ENTITY admon_gfx_path "../images/admons/">
]>
@ -25,7 +25,7 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format"
exclude-result-prefixes="#default">
<xsl:import href="&db_xsl_bak;"/>
<xsl:import href="&db_xsl;"/>
<!--###################################################
Custom Title Page

View File

@ -0,0 +1,96 @@
<?xml version="1.0"?>
<!--
This is the XSL HTML configuration file for the Hibernate
Reference Documentation.
It took me days to figure out this stuff and fix most of
the obvious bugs in the DocBook XSL distribution, so if you
use this stylesheet, give some credit back to the Hibernate
project.
christian.bauer@bluemars.de
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY db_xsl "chunk.xsl">
<!ENTITY callout_gfx_path "../images/callouts/">
<!ENTITY admon_gfx_path "../images/admons/">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
<xsl:import href="&db_xsl;"/>
<!--###################################################
HTML Settings
################################################### -->
<xsl:param name="chunk.section.depth">'5'</xsl:param>
<xsl:param name="use.id.as.filename">'1'</xsl:param>
<xsl:param name="html.stylesheet">acegi.css</xsl:param>
<!-- These extensions are required for table printing and other stuff -->
<xsl:param name="use.extensions">1</xsl:param>
<xsl:param name="tablecolumns.extension">0</xsl:param>
<xsl:param name="callout.extensions">1</xsl:param>
<xsl:param name="graphicsize.extension">0</xsl:param>
<!--###################################################
Table Of Contents
################################################### -->
<!-- Generate the TOCs for named components only -->
<xsl:param name="generate.toc">
book toc
</xsl:param>
<!-- Show only Sections up to level 3 in the TOCs -->
<xsl:param name="toc.section.depth">3</xsl:param>
<!--###################################################
Labels
################################################### -->
<!-- Label Chapters and Sections (numbering) -->
<xsl:param name="chapter.autolabel">1</xsl:param>
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<!--###################################################
Callouts
################################################### -->
<!-- Use images for callouts instead of (1) (2) (3) -->
<xsl:param name="callout.graphics">1</xsl:param>
<xsl:param name="callout.graphics.path">&callout_gfx_path;</xsl:param>
<!-- Place callout marks at this column in annotated areas -->
<xsl:param name="callout.defaultcolumn">90</xsl:param>
<!--###################################################
Admonitions
################################################### -->
<!-- Use nice graphics for admonitions -->
<xsl:param name="admon.graphics">'1'</xsl:param>
<xsl:param name="admon.graphics.path">&admon_gfx_path;</xsl:param>
<!--###################################################
Misc
################################################### -->
<!-- Placement of titles -->
<xsl:param name="formal.title.placement">
figure after
example before
equation before
table before
procedure before
</xsl:param>
</xsl:stylesheet>

View File

@ -14,7 +14,7 @@
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY db_xsl_bak "docbook-bak.xsl">
<!ENTITY db_xsl "docbook.xsl">
<!ENTITY callout_gfx_path "../images/callouts/">
<!ENTITY admon_gfx_path "../images/admons/">
]>
@ -24,13 +24,13 @@
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
<xsl:import href="&db_xsl_bak;"/>
<xsl:import href="&db_xsl;"/>
<!--###################################################
HTML Settings
################################################### -->
<xsl:param name="html.stylesheet">html.css</xsl:param>
<xsl:param name="html.stylesheet">acegi.css</xsl:param>
<!-- These extensions are required for table printing and other stuff -->
<xsl:param name="use.extensions">1</xsl:param>

View File

@ -98,26 +98,13 @@ Maven throws an OutOfMemoryError. :-(
</goal>
<postGoal name="sdocbook:prepare-filesystem">
<j:set var="unzipped" value="false" />
<util:available file="${maven.sdocbook.generated.fo}">
<j:set var="unzipped" value="true" />
<echo>Using previusly unzipped docbook files</echo>
</util:available>
<j:if test="${!unzipped}">
<!-- unzip docbook files -->
<ant:unzip dest="${maven.build.dir}"
src="${pom.getDependencyPath('docbook:docbook-xsl')}"/>
<!-- use a custom fo stylesheet -->
<move file="${maven.sdocbook.stylesheets.dir}/fo/docbook.xsl"
tofile="${maven.sdocbook.stylesheets.dir}/fo/docbook-bak.xsl"/>
<copy todir="${maven.sdocbook.stylesheets.dir}/fo">
<fileset dir="${maven.sdocbook.src.dir}/styles/fo"/>
</copy>
<!-- use a custom html stylesheet -->
<move file="${maven.sdocbook.stylesheets.dir}/html/docbook.xsl"
tofile="${maven.sdocbook.stylesheets.dir}/html/docbook-bak.xsl"/>
<copy todir="${maven.sdocbook.stylesheets.dir}/html">
<fileset dir="${maven.sdocbook.src.dir}/styles/html"/>
</copy>
@ -126,10 +113,25 @@ Maven throws an OutOfMemoryError. :-(
<copy todir="${maven.sdocbook.stylesheets.dir}/images">
<fileset dir="${maven.sdocbook.src.dir}/images"/>
</copy>
</j:if>
</postGoal>
<postGoal name="sdocbook:generate-html">
<j:if test="${chunk != true}">
<move file="${maven.sdocbook.target.dir}/index.html"
tofile="${maven.sdocbook.target.dir}/index-all.html"/>
</j:if>
</postGoal>
<goal name="sdocbook:generate-htmlchunk">
<j:set var="maven.sdocbook.html.xsl" value="${maven.sdocbook.stylesheets.dir}/html/acegi-chunk.xsl"/>
<j:set var="maven.sdocbook.generated.html" value="${maven.build.dir}/generated-docbooks/html-chunk"/>
<j:set var="chunk" value="true"/>
<attainGoal name="sdocbook:generate-html"/>
</goal>
<postGoal name="sdocbook">
<attainGoal name="sdocbook:generate-htmlchunk"/>
</postGoal>
<preGoal name="site">
<attainGoal name="sdocbook"/>
</preGoal>

View File

@ -3,6 +3,8 @@ maven.sdocbook.fo.params=-PARAM paper.type A4 -PARAM use.extensions 1 -PARAM tab
maven.sdocbook.src.dir=${basedir}/docbook
maven.sdocbook.resources.include=**/*.gif,**/*.svg,**/*.jpg,**/*.css
maven.sdocbook.stylesheets.dir=${maven.build.dir}/docbook-xsl-1.66.1
maven.sdocbook.html.xsl=${maven.sdocbook.stylesheets.dir}/html/acegi.xsl
maven.sdocbook.fo.xsl=${maven.sdocbook.stylesheets.dir}/fo/acegi.xsl
# statcvs, if you want a full, accurate history
# (this downloads the *entire* CVS into target/statcvs, so it can take some time)