I have recently updated my DocBook XSL installation from 1.77.1 to 1.79.1; but when I tried to generate my book in HTML form, the part of generated HTML file that represent <index> tag fails W3C validation. The error traced down to following tag in the HTML file:
<div xmlns:xlink="http://www.w3.org/1999/xlink" class="index">
As xmlns family of attribute does not exist in HTML, it fails the validation of generated HTML document. I have written a simple test article file which exhibits this error, attached together with the generated HTML file as xslhtml-bogus-index-xmlns.zip.
This is a minor issue and seems to be harmless, though still annoying when you need to ensure that the generated document validates properly.
Both single-page and chunked HTML generation are affected. Older Docbook XSL release like 1.77.1 does not have this issue.
DocBook XML DTD: 4.4
DocBook XSL: 1.79.1
XSLT Processor: XSLTproc 1.1.28
Runtime: Cygwin 1.7.28 32-bit
System: Microsoft Windows XP Professional SP3
This leaked
xmlns:xlinkattribute could apparently be fixed in both single-page and chunked HTML generation, by appending "xlink" to the value ofexclude-result-prefixesattribute declared in<xsl:stylesheet>tag ofhtml/autoidx.xslfile inside DocBook 1.79.1 distribution. But I'm not sure if it is a proper way to fix the issue.This experimental patch is attached as
html-index-exclude-xmlns-xlink.patch. A HTML4-validated test rendering ofsimpleindex.xml(from the attachedxslhtml-bogus-index-xmlns.zip) using the patched stylesheet is also attached assimpleindex.patched1.html.DocBook XML DTD: 4.4
DocBook XSL: 1.79.1 (patched against release tarball)
XSLT Processor: XSLTproc 1.1.28
Runtime: Cygwin 1.7.28 32-bit
System: Microsoft Windows XP Professional SP3
HTML4-validated test rendering of
simpleindex.xmlusing patched stylesheet is attached assimpleindex.patched1.html.DocBook XML DTD: 4.4
DocBook XSL: 1.79.1 (patched against release tarball)
XSLT Processor: XSLTproc 1.1.28
Runtime: Cygwin 1.7.28 32-bit
System: Microsoft Windows XP Professional SP3
Thanks for the diagnosis and the patch. I will check it over and apply it before the next release.