1

There was a great question and answer about this subject I've found by searching. However, neither the question nor the answer have provided an acceptable way to fix this issue.

To summarize, the issue is that my generated XHTML5 numbered section titles have a  between the number and the title string.

The xsl I have found as a workaround is this:

<xsl:import href="docbook-ns/xhtml/chunk.xsl"/>
<xsl:output method="html" encoding="UTF-8" indent="no"/>

which does fix the issue for xhtml.

If I want to use xhtml5, I'm out of luck...as this:

<xsl:import href="docbook-ns/xhtml5/chunk.xsl"/>
<xsl:output method="html" encoding="UTF-8" indent="no"/>

fails to remove the offending characters. Looking at the resultant HTML, I'm assuming the key difference is this line:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

which does not appear in the HTML using the xhtml5 version of docbook xsl.

I'm using docbook xsl v1.78.1. Can anyone explain exactly how to fix this issue properly? Thanks in advance.

Community
  • 1
  • 1
Dave Hayes
  • 56
  • 7
  • 1
    `0xC2A0` is a 2-byte UTF-8 sequence representing [`U+00A0`](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=00a0&mode=hex) or "non-breaking space". This should be valid as long as UTF-8 is indicated in the output. – Jim Garrison Mar 07 '14 at 20:36

1 Answers1

1

Try whether using output method="xhtml" fixes the problem. That assumes an XSLT 2.0 processor

Martin Honnen
  • 160,499
  • 6
  • 90
  • 110
  • I'm using "xsltproc" compiled against libxml 20800. How do I know if this is a 2.0 processor? I do know that 'method="xhtml"' does not fix the problem and produces an error. – Dave Hayes Mar 07 '14 at 21:20
  • libxslt is an xslt 1.0 processor, you need Saxon 9 for instance to use Xslt 2.0 features like output method `xhtml`. Trying to create XHTML to be served as text/html with an Xslt 1.0 processor is not a good idea in my view, there is no support for that in XSLT 1.0. – Martin Honnen Mar 07 '14 at 21:28