No DOCTYPE in HTML output of Docbook document

Having trouble installing Oxygen? Got a bug to report? Post it all here.
cshare88
Posts: 1
Joined: Mon Dec 19, 2005 4:56 pm

No DOCTYPE in HTML output of Docbook document

Post by cshare88 »

When I transform a Docbook document to HTML the resulting file contains no DOCTYPE information. How do I set up the transformation to generate that line?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

You have two solutions:

- use the DocBook stylesheet for XHTML output which generates a DOCTYPE declaration for XHTML 1.0 Transitional;

- create a simple customization layer for generating the desired DOCTYPE declaration. For example the following customization layer

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="file:/C:/Program Files/Oxygen 6.2/frameworks/docbook/xsl/html/docbook.xsl"/>
<xsl:output doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
</xsl:stylesheet>
generates the DOCTYPE delaration of a HTML 4.01 document.

Regards,
Sorin
Post Reply