diff options
-rw-r--r-- | setup.mk.fc | 82 | ||||
-rwxr-xr-x | tools/user_guide.xsl | 6 | ||||
-rwxr-xr-x | tools/user_guide_chunks.xsl | 16 | ||||
-rwxr-xr-x | tools/user_guide_fo.xsl | 8 |
4 files changed, 97 insertions, 15 deletions
diff --git a/setup.mk.fc b/setup.mk.fc new file mode 100644 index 0000000..765fd05 --- /dev/null +++ b/setup.mk.fc @@ -0,0 +1,82 @@ +###################################################################### +# XSLT processing setup: +# ===================== +# +# As this setup may change based on your install and distro, I put +# all this into a separate file. This one is an example (the one +# I use) and must be modified to fit your config. +# By keeping it separate, we can modify the main Makefile without +# breaking the config and avoid the switches. +# +# For now it only supports Saxon+Fop+Jai+Java. I would like to include +# the support for xsltproc (sablotron and xalan) for HTML output only. +# If someone has the time and wants to add this, go ahead! +# +# The difference between setup.mk and setup.mk.fc is that the former +# one has been adjusted to meet the requirements of the Fedora Linux +# distribution. Only the latter one is used by Makefile, however. +# +###################################################################### + +# +# JAVA: for Saxon (xslt processor) and FOP (PDF generator) +# +JAVA_HOME ?= /usr/bin +JAVACMD ?= $(JAVA_HOME)/java + +# +# XSLT processors: Saxon. +# +SAXON_HOME ?= /usr/share/java +SAXON_JAR ?= $(SAXON_HOME)/saxon.jar:$(SAXON_HOME)/saxon-jdom.jar + +# +# XML catalog resolver and setting: for Saxon only +# +RES_CLASSPATH ?= /usr/share/java/xml-commons-resolver.jar + +# +# DOCBOOK XSL extension for Saxon: +# +EXT_CLASSPATH ?= $(SAXON_HOME)/saxon-6.5.5.jar + +# +# Formatting object processor: PDF generation only +# +FOP_HOME ?= /usr/share/java +FOP_CLASSPATH ?= $(FOP_HOME)/fop.jar +FOP_CLASSPATH ?= $(FOP_CLASSPATH):$(FOP_HOME)/avalon-framework.jar +FOP_CLASSPATH ?= $(FOP_CLASSPATH):$(FOP_HOME)/batik-all.jar + +# +# JAI: Java Advance Image lib: Saxon only +# +JAIHOME ?= /usr/share/jai-bin +JAI_CLASSPATH ?= $(JAIHOME)/lib/jai_core.jar:$(JAIHOME)/lib/jai_codec.jar:$(JAIHOME)/lib/mlibwrapper_jai.jar + +# +# Final CLASSPATH for java: +# +CLASSPATH := $(SAXON_JAR):$(RES_CLASSPATH):$(EXT_CLASSPATH):$(JAI_CLASSPATH):$(FOP_CLASSPATH) + +# +# Bin libraries: for JAI +# +LD_LIBRARY_PATH += /opt/jai-bin/lib + +# Extra options for catalog handling: +#CATALOG_OPTS = "-x org.apache.xml.resolver.tools.ResolvingXMLReader -y org.apache.xml.resolver.tools.ResolvingXMLReader -r org.apache.xml.resolver.tools.CatalogResolver" +CATALOG_OPTS := + +# +# DocBook stylesheets: common to all XSLT processors: +# +DOCBOOK_XSL ?= /usr/share/sgml/docbook/xsl-stylesheets + +# Make the HTML +HTML_CMD = $(JAVACMD) -cp "$(EXT_CLASSPATH)" com.icl.saxon.StyleSheet \ + $(CATALOG_OPTS) \ + -o $@ \ + $< \ + $(CHUNKS_STYLESHEET) +# root.filename=all_in_one_page diff --git a/tools/user_guide.xsl b/tools/user_guide.xsl index 9a0cdb7..cbb51b5 100755 --- a/tools/user_guide.xsl +++ b/tools/user_guide.xsl @@ -4,11 +4,11 @@ <!-- Import original style sheet: chunk.xsl (multi-page) or docbook.xsl (one page) --> - <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.66.1/html/docbook.xsl"/> + <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl"/> <!-- ****************************************************************** - - - Load the common custimzation for HTML: + - Load the common customization for HTML: - - ****************************************************************** --> @@ -23,7 +23,7 @@ <!-- ****************************************************************** - - - Custimization starts here: + - Customization starts here: - - ****************************************************************** --> diff --git a/tools/user_guide_chunks.xsl b/tools/user_guide_chunks.xsl index 7d75dc9..ddac955 100755 --- a/tools/user_guide_chunks.xsl +++ b/tools/user_guide_chunks.xsl @@ -4,11 +4,11 @@ <!-- Import original style sheet: chunk.xsl (multi-page) or docbook.xsl (one page) --> - <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.66.1/html/chunk.xsl"/> + <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl"/> <!-- ****************************************************************** - - - Load the common custimzation for HTML: + - Load the common customization for HTML: - - ****************************************************************** --> @@ -21,7 +21,7 @@ <xsl:param name="page.margin.inner">10in</xsl:param> <xsl:param name="page.margin.outer">10in</xsl:param> - <xsl:param name="generate.legalnotice.link" select="1"/> + <xsl:param name="generate.legalnotice.link" select="0"/> <!-- ****************************************************************** - @@ -36,7 +36,7 @@ <!-- New top-level file name: index.html is reserved for the index --> -<xsl:param name="root.filename" select="'user_guide'"/> +<xsl:param name="root.filename" select="'sylpheed'"/> <!-- Yes we use the chunker: splits the output into several files. --> @@ -44,7 +44,7 @@ <!-- Chunk only the first level of chapter/sections --> -<xsl:param name="chunk.section.depth" select="1"/> +<xsl:param name="chunk.section.depth" select="0"/> <!-- Generate a separate chunk for the first element of each section --> @@ -52,7 +52,7 @@ <!-- Do not use the ID as filename: they contain forbidden chars --> -<xsl:param name="use.id.as.filename" select="'0'"/> +<xsl:param name="use.id.as.filename" select="'1'"/> <!-- Use the following extension for output files: .html --> @@ -62,9 +62,9 @@ <xsl:param name="html.extra.head.links" select="1"/> -<!-- Use graphics in navigation headers/footers --> +<!-- Do not use graphics in navigation headers/footers --> -<xsl:param name="navig.graphics" select="1"/> +<xsl:param name="navig.graphics" select="0"/> <xsl:param name="navig.graphics.extension" select="'.png'"/> <xsl:param name="navig.graphics.path">images/</xsl:param> diff --git a/tools/user_guide_fo.xsl b/tools/user_guide_fo.xsl index 93f8543..0742e78 100755 --- a/tools/user_guide_fo.xsl +++ b/tools/user_guide_fo.xsl @@ -4,11 +4,11 @@ <!-- Import original style sheet: chunk.xsl (multi-page) or docbook.xsl (one page) --> - <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets-1.66.1/fo/docbook.xsl"/> + <xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl"/> <!-- ****************************************************************** - - - Load the common custimzation layer: + - Load the common customization layer: - - ****************************************************************** --> @@ -19,13 +19,13 @@ <!-- ****************************************************************** - - - Custimization starts here: + - Customization starts here: - - ****************************************************************** --> <!-- - - Trial: use FOP extensions. Put here the stuf to generate PDF using FOP. + - Trial: use FOP extensions. Put here the stuff to generate PDF using FOP. --> <xsl:param name="fop.extensions">1</xsl:param> <xsl:param name="xep.extensions">1</xsl:param> |