How to validate a DocBook 5 document

There are three ways to validate a DocBook 5 document: against the DTD, against the Relax NG Schema or against the XML Schema. XMLBlueprint XML Editor supports all three.

How to validate a DocBook 5 document against the DTD

To validate a DocBook 5 document against the DTD, you must include the DocBook 5 DTD in your document:

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE book SYSTEM "http://www.docbook.org/xml/5.0/dtd/docbook.dtd">

<book

      xmlns="http://docbook.org/ns/docbook">

</book>

XMLBlueprint XML Editor will automatically support XML Completion for your DocBook 5 document based on the DTD. To validate your DocBook 5 document, open it in XMLBlueprint XML Editor and click XML > Validate.

TIP --In XMLBlueprint, choose File > New > XML Document with DTD, Relax NG Schema, or XML Schema and paste

http://www.docbook.org/xml/5.0/dtd/docbook.dtd

in the edit box. Press the Next > button, choose "book" as root element and then press the Finish button. XMLBlueprint will automatically create an empty document with a reference to the DocBook DTD.

How to validate a DocBook 5 document against the Relax NG Schema

To validate a DocBook 5 document against the Relax NG Schema, you must include the DocBook 5 Relax NG Schema in the your document:

<?xml version="1.0" encoding="utf-8"?>

<?blueprint

      namespace="http://docbook.org/ns/docbook"

      schema=http://www.docbook.org/xml/5.0/rng/docbook.rng?>

<book

      xmlns="http://docbook.org/ns/docbook">

</book>

XMLBlueprint XML Editor will automaticallty support XML Completion for your DocBook 5 document based on the Relax NG Schema. To validate your DocBook 5 document, open it in XMLBlueprint XML Editor and click XML > Validate.

TIP --In XMLBlueprint, choose File > New > XML Document with DTD, Relax NG Schema, or XML Schema and paste

http://www.docbook.org/xml/5.0/rng/docbook.rng

in the edit box. Press the Next > button, choose "book" as root element and then press the Finish button. XMLBlueprint will automatically create an empty document with a reference to the Relax NG Schema.

How to validate a DocBook 5 document against the XML Schema

To validate a DocBook 5 document against the XML Schema, you must include the DocBook 5 XML Schema in your document:

<?xml version="1.0" encoding="utf-8"?>

<book

      xmlns="http://docbook.org/ns/docbook"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="

            http://docbook.org/ns/docbook

            http://www.docbook.org/xml/5.0/xsd/docbook.xsd">

</book>

XMLBlueprint XML Editor will automatically support XML Completion for your DocBook 5 document based on the XML Schema. To validate your DocBook 5 document, open it in XMLBlueprint XML Editor and click XML > Validate.

TIP --In XMLBlueprint, choose File > New > XML Document with DTD, Relax NG Schema, or XML Schema and paste

http://www.docbook.org/xml/5.0/xsd/docbook.xsd

in the edit box. Press the Next > button, choose "book" as root element and then press the Finish button. XMLBlueprint will automatically create an empty document with a reference to the XML Schema.