Rendering: some utf-8 fixes

This commit is contained in:
Poltern 2024-02-01 22:22:41 +05:00
parent 76fad010c0
commit bf3b7cf3ad
8 changed files with 28 additions and 18 deletions

View File

@ -106,7 +106,7 @@ nochunks: validate profile-html
$(RENDERTMP)/lfs-html.xml
@echo "Running Tidy..."
$(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
$(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || test $$? -le 1
@echo "Running obfuscate.sh..."
$(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)

View File

@ -1,14 +1,13 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
<!-- XSLT stylesheet to extract commands from [B,H]LFS books. -->
<xsl:variable name="newline">
<xsl:text>
</xsl:text>
<xsl:text>&#xA;</xsl:text>
</xsl:variable>
<xsl:template match="/">

View File

@ -10,6 +10,14 @@
<!-- Upstream XHTML presentation templates -->
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
<xsl:param name="chunker.output.method" select="'xml'"/>
<xsl:param name="chunker.output.encoding" select="'UTF-8'"/>
<xsl:param name="chunker.output.media-type" select="'application/xhtml+xml'"/>
<xsl:param name="chunker.output.doctype-public" select="'-//W3C//DTD XHTML 1.0 Strict//EN'"/>
<xsl:param name="chunker.output.doctype-system" select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'"/>
<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
<xsl:param name="chunker.output.indent" select="'no'"/>
<!-- Including our customized elements templates -->
<xsl:include href="common.xsl"/>
<xsl:include href="xhtml/lfs-admon.xsl"/>
@ -31,9 +39,6 @@
<xsl:param name="ulink.target" select="''"/>
<xsl:param name="css.decoration" select="0"/>
<!-- No XML declaration -->
<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
<!-- Control generation of ToCs and LoTs -->
<xsl:param name="generate.toc">
book toc,title

View File

@ -10,6 +10,13 @@
<!-- Upstream XHTML templates -->
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
<xsl:output method="xml"
encoding="UTF-8"
media-type="application/xhtml+xml"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
omit-xml-declaration="yes"
indent="no" />
<!-- Include our customized templates -->
<xsl:include href="common.xsl"/>
<xsl:include href="xhtml/lfs-index.xsl"/>

View File

@ -53,8 +53,8 @@
We have expanded the support to several inline tags.
See pdf/lfs-mixed.xsl.
Note: the argument in select= is a zero-width space
(unicode 200b, encoded in utf-8)-->
<xsl:param name="ulink.hyphenate" select="'?'"/>
(unicode 200b)-->
<xsl:param name="ulink.hyphenate" select="'&#x200B;'"/>
<!-- List of characters to allow ulink URLs, and supported inline tags,
to be automatically hyphenated on.

View File

@ -18,6 +18,7 @@
<!-- Generate DocBook instance with correct DOCTYPE -->
<xsl:output method="xml"
encoding="UTF-8"
doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>

View File

@ -3,7 +3,7 @@
<!-- Create a md5 list for packages and patches used. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
version="1.0">
<xsl:output method="text"/>
@ -31,8 +31,7 @@
</xsl:call-template>
<!-- Add a newline -->
<xsl:text>
</xsl:text>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
</xsl:template>

View File

@ -4,7 +4,7 @@
with wget. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
version="1.0">
<xsl:output method="text"/>
@ -28,8 +28,7 @@
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
</xsl:text>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
</xsl:template>