Subject: More XSL Guide customization
To: None <netbsd-docs@netbsd.org>
From: Mike M. Volokhov <mishka@apk.od.ua>
List: netbsd-docs
Date: 02/12/2005 14:36:41
Greetings!
I'm working on build process of Russian translation of The NetBSD Guide.
The problem is chunked HTML output is always ISO-8859-1 encoded, which
is not acceptable for Russian (and I believe some other languages too).
There are no "chunker.output.encoding" parameter defined for XSLT
processor. Thus, I've enforce this parameter by providing additional
XSL_DBX_WITH_CHUNKER_OUTPUT_ENCODING variable in doc.docbook.xsl.mk
file.
However, previously I've tried to add it to another settings, i.e.:
XSL_DBX_WITH_CHUNKER_OUTPUT_ENCODING=UTF-8
XSL_DBX_HTML_SPLIT_PARAMS+=XSL_DBX_WITH_CHUNKER_OUTPUT_ENCODING
and found that all other settings was flushed, so as we have the
following in a make logic:
.if !defined(XSL_DBX_HTML_SPLIT_PARAMS) || empty(XSL_DBX_HTML_SPLIT_PARAMS)
XSL_DBX_HTML_SPLIT_PARAMS+= ......
.endfi
So this cause to inability to simply add user's own parametres (like
I've did before). The patch below will fix this (and mentioned encoding)
problems.
--
Best wishes,
Mishka.
Index: doc.docbook.xsl.mk
===================================================================
RCS file: /cvsroot/htdocs/share/mk/doc.docbook.xsl.mk,v
retrieving revision 1.10
diff -u -r1.10 doc.docbook.xsl.mk
--- doc.docbook.xsl.mk 14 Dec 2004 11:52:41 -0000 1.10
+++ doc.docbook.xsl.mk 12 Feb 2005 12:22:44 -0000
@@ -46,6 +46,7 @@
XSL_DBX_WITH_NETBSD_URL_DISLAIMER?= ${WEB_PREFIX_RELATIVE}/Misc/disclaimer.html
.if !defined(XSL_DBX_COMMON_PARAMS) || empty(XSL_DBX_COMMON_PARAMS)
+XSL_DBX_COMMON_PARAMS+= ${XSL_DBX_COMMON_OWN_PARAMS}
XSL_DBX_COMMON_PARAMS+= XSL_DBX_WITH_MANIFEST
XSL_DBX_COMMON_PARAMS+= XSL_DBX_WITH_TOC_SECTION_DEPTH
XSL_DBX_COMMON_PARAMS+= XSL_DBX_WITH_TOC_MAX_DEPTH
@@ -62,6 +63,7 @@
.if !defined(XSL_DBX_HTML_COMMON_PARAMS) || empty(XSL_DBX_HTML_COMMON_PARAMS)
XSL_DBX_HTML_COMMON_PARAMS+= ${XSL_DBX_COMMON_PARAMS}
+XSL_DBX_HTML_COMMON_PARAMS+= ${XSL_DBX_HTML_COMMON_OWN_PARAMS}
XSL_DBX_HTML_COMMON_PARAMS+= XSL_DBX_WITH_HTML_STYLESHEET
XSL_DBX_HTML_COMMON_PARAMS+= XSL_DBX_WITH_USE_ID_AS_FILENAME
XSL_DBX_HTML_COMMON_PARAMS+= XSL_DBX_WITH_CITEREFENTRY_LINK
@@ -73,6 +75,7 @@
.if !defined(XSL_DBX_HTML_SINGLE_PARAMS) || empty(XSL_DBX_HTML_SINGLE_PARAMS)
XSL_DBX_HTML_SINGLE_PARAMS+= ${XSL_DBX_HTML_COMMON_PARAMS}
+XSL_DBX_HTML_SINGLE_PARAMS+= ${XSL_DBX_HTML_SINGLE_OWN_PARAMS}
XSL_DBX_HTML_SINGLE_PARAMS+= XSL_DBX_WITH_GENERATE_LEGALNOTICE_LINK
XSL_DBX_HTML_SINGLE_PARAMS+= XSL_DBX_WITH_CALLOUT_GRAPHICS_PATH
.endif
@@ -83,14 +86,17 @@
XSL_DBX_WITH_CHUNK_FIRST_SECTIONS?= 0
XSL_DBX_WITH_CHUNK_SECTION_DEPTH?= 0
XSL_DBX_WITH_GENERATE_MANIFEST?= 1
+XSL_DBX_WITH_CHUNKER_OUTPUT_ENCODING?= utf-8
.if !defined(XSL_DBX_HTML_SPLIT_PARAMS) || empty(XSL_DBX_HTML_SPLIT_PARAMS)
XSL_DBX_HTML_SPLIT_PARAMS+= ${XSL_DBX_HTML_COMMON_PARAMS}
+XSL_DBX_HTML_SPLIT_PARAMS+= ${XSL_DBX_HTML_SPLIT_OWN_PARAMS}
XSL_DBX_HTML_SPLIT_PARAMS+= XSL_DBX_WITH_ROOT_FILENAME
XSL_DBX_HTML_SPLIT_PARAMS+= XSL_DBX_WITH_HTML_EXT
XSL_DBX_HTML_SPLIT_PARAMS+= XSL_DBX_WITH_CHUNK_FIRST_SECTIONS
XSL_DBX_HTML_SPLIT_PARAMS+= XSL_DBX_WITH_CHUNK_SECTION_DEPTH
XSL_DBX_HTML_SPLIT_PARAMS+= XSL_DBX_WITH_GENERATE_MANIFEST
+XSL_DBX_HTML_SPLIT_PARAMS+= XSL_DBX_WITH_CHUNKER_OUTPUT_ENCODING
.endif
# translate params to xlstproc's options