Menu

#1384 Bogus `xmlns:xlink` attribute leaked into HTML output when `<index>` was used

output: HTML
open
nobody
None
5
2016-08-22
2016-08-22
No

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

1 Attachments

Discussion

  • Nutchanon Wetchasit

    This leaked xmlns:xlink attribute could apparently be fixed in both single-page and chunked HTML generation, by appending "xlink" to the value of exclude-result-prefixes attribute declared in <xsl:stylesheet> tag of html/autoidx.xsl file 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 of simpleindex.xml (from the attached xslhtml-bogus-index-xmlns.zip) using the patched stylesheet is also attached as simpleindex.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

     
  • Nutchanon Wetchasit

    HTML4-validated test rendering of simpleindex.xml using patched stylesheet is attached as simpleindex.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

     
  • Robert Stayton

    Robert Stayton - 2016-08-22

    Thanks for the diagnosis and the patch. I will check it over and apply it before the next release.

     
MongoDB Logo MongoDB