This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] libstdc++/54102


... finally got around to fixing up the generated HTML, so that charset
is set to UTF-8. 

Sorry this took so long.

tested x86/linux

-benjamin
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 3853472..5c86bb9 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -432,6 +432,7 @@ dnl AC_OUTPUT macro.  This one lists the files to be created:
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_FILES([scripts/testsuite_flags],[chmod +x scripts/testsuite_flags])
 AC_CONFIG_FILES([scripts/extract_symvers],[chmod +x scripts/extract_symvers])
+AC_CONFIG_FILES([doc/xsl/customization.xsl])
 
 # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
 # that multilib installs will end up installed in the correct place.
diff --git a/libstdc++-v3/doc/Makefile.am b/libstdc++-v3/doc/Makefile.am
index 95d8513..b787200 100644
--- a/libstdc++-v3/doc/Makefile.am
+++ b/libstdc++-v3/doc/Makefile.am
@@ -465,9 +465,10 @@ XSLT_PARAM = --param toc.section.depth 4
 #XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
 #XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
 XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
-XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml-1_1/chunk.xsl
-XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml-1_1/docbook.xsl
+XSL_HTML_STYLE = $(XSL_STYLE_DIR)/html/chunk.xsl
+XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl
 XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl
+XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl
 
 ${docbook_outdir}/epub:
 	mkdir -p ${docbook_outdir}/epub
@@ -529,21 +530,25 @@ stamp-html-docbook-lwg: stamp-html-docbook $(xml_extra)
 stamp-html-docbook-data: stamp-html-docbook-images stamp-html-docbook-lwg
 	$(STAMP) stamp-html-docbook-data
 
-# HTML, index plus chapters
+# HTML, "chunked" into index plus chapters as separate pages
 stamp-html-docbook: $(xml_sources) ${docbook_outdir}/html
 	@echo "Generating html files..."
 	$(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${docbook_outdir}/html/ \
-	$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
+	 --stringparam chunker.output.encoding UTF-8 \
+	$(XSL_HTML_STYLE) \
+	${top_srcdir}/doc/xml/spine.xml
 	$(STAMP) stamp-html-docbook
 
 doc-html-docbook: stamp-html-docbook-data
 
 # HTML, all one page
+# NB: Have to generate customization XSL for UTF-8 output.
 manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html
 stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
 	@echo "Generating html single file..."
 	$(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \
-	$(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
+	${XSL_LOCAL_STYLE} \
+	${top_srcdir}/doc/xml/spine.xml
 	$(STAMP) stamp-html-single-docbook
 
 doc-html-single-docbook: stamp-html-single-docbook
diff --git a/libstdc++-v3/doc/xsl/customization.xsl.in b/libstdc++-v3/doc/xsl/customization.xsl.in
new file mode 100644
index 0000000..9db621c
--- /dev/null
+++ b/libstdc++-v3/doc/xsl/customization.xsl.in
@@ -0,0 +1,16 @@
+<?xml version='1.0'?>
+
+<!--
+  Specialization/customization layer for libstdc++.
+  To output both chunked/single page HTML in UTF-8 charset
+
+  XSL_STYLE_DIR is set in acinclude.m4
+
+<xsl:import html="@XSL_STYLE_DIR@/html/docbook.xsl"/>
+-->
+
+<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+		 version="1.0">
+<xsl:import href="@XSL_STYLE_DIR@/html/docbook.xsl"/>
+<xsl:output method="html" encoding="UTF-8" indent="no"/>
+</xsl:stylesheet>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]