[Lsb-messages] /var/www/bzr/lsb/devel/fhs-spec r65: Force UTF-8 charset on HTML output, for both chunked and nochunked.
Jeff Licquia
licquia at linuxfoundation.org
Mon Apr 20 18:08:37 UTC 2015
------------------------------------------------------------
revno: 65
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: fhs-spec
timestamp: Mon 2015-04-20 14:08:37 -0400
message:
Force UTF-8 charset on HTML output, for both chunked and nochunked.
added:
docbook-utf8.xsl.in
modified:
Makefile
-------------- next part --------------
=== modified file 'Makefile'
--- a/Makefile 2012-01-20 21:42:31 +0000
+++ b/Makefile 2015-04-20 18:08:37 +0000
@@ -1,7 +1,10 @@
XMLFILES=fhs.xml intro.xml filesystem.xml root-filesystem.xml usr.xml var.xml os.xml appendix.xml
-XMLTOARGS_OLD=--xsltopts '--stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1'
-XMLTOARGS_NEW=--stringparam section.autolabel=1 --stringparam section.label.includes.component.label=1
-XSLTPROCARGS=--stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1
+XMLTOARGS_OLD=--xsltopts '--stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam chunker.output.encoding UTF-8'
+XMLTOARGS_NEW=--stringparam section.autolabel=1 --stringparam section.label.includes.component.label=1 --stringparam chunker.output.encoding=UTF-8
+XSLTPROCARGS=--stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam chunker.output.encoding UTF-8
+
+# Location of DocBook upstream docbook.xsl for html-nochunks on the system.
+HTML_NOCHUNK_XSL=/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
ifeq ($(shell xmlto --help | grep stringparam | wc -l),0)
XMLTOARGS=$(XMLTOARGS_OLD)
@@ -11,6 +14,9 @@
all: fhs.html fhs/index.html fhs.txt fhs.pdf
+docbook-utf8.xsl: docbook-utf8.xsl.in
+ sed s, at HTML_NOCHUNK_XSL@,$(HTML_NOCHUNK_XSL),g < $< > $@
+
fhs.ps: $(XMLFILES)
xmlto $(XMLTOARGS) ps fhs.xml
@@ -26,14 +32,14 @@
fhs/index.html: $(XMLFILES)
xmlto $(XMLTOARGS) -o fhs html fhs.xml
-fhs.html: $(XMLFILES)
- xmlto $(XMLTOARGS) html-nochunks fhs.xml
+fhs.html: $(XMLFILES) docbook-utf8.xsl
+ xmlto $(XMLTOARGS) -x ./docbook-utf8.xsl html-nochunks fhs.xml
valid:
xmllint --valid --noout fhs.xml
clean:
- rm -f fhs.ps fhs.txt fhs.pdf fhs/*.html fhs.html fhs.fo
+ rm -f fhs.ps fhs.txt fhs.pdf fhs/*.html fhs.html fhs.fo docbook-utf8.xsl
rm -rf fhs
distclean: clean
=== added file 'docbook-utf8.xsl.in'
--- a/docbook-utf8.xsl.in 1970-01-01 00:00:00 +0000
+++ b/docbook-utf8.xsl.in 2015-04-20 18:08:37 +0000
@@ -0,0 +1,10 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<xsl:import href="@HTML_NOCHUNK_XSL@"/>
+<xsl:output method="html"
+ encoding="UTF-8"
+ indent="no"/>
+
+</xsl:stylesheet>
More information about the lsb-messages
mailing list