XML technologies / DocBook / Getting started with DocBook / Referencing a DocBook 5 schema / DOCTYPE declaration for DocBook DTDs

(Excerpt from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" by Thomas Schraitle)

When using the DTD version of DocBook 5, you also need a DOCTYPE declaration in your XML files.

Example: DOCTYPE declaration for DocBook 5 DTDs

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" "http://www.oasis-open.org/docbook/xml/5.0/dtd/docbookx.dtd">
<book version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">    
  <!-- Inhalt -->    
</book>

Note: Pay attention to prefixes and the default namespace in DocBook 5 DTD documents
When using the DocBook 5 DTD in your documents, place no prefix before DocBook elements. For XLink the prefix must be xlink. DTDs do not support Namespaces, so you must use exactly the spelling specified in the DTD.

  

back to top