docbook-xml-5.0

Introduction to DocBook XML DTD and Schemas 5.0

The DocBook XML DTD and Schemas-5.0 package contains document type definitions and schemas for verification of XML data files against the DocBook rule set. These are useful for structuring books and software documentation to a standard allowing you to utilize transformations already written for that standard. In addition to providing a DTD, version 5 introduced the RelaxNG schema and Schematron rules, and is incompatible with previous versions of DocBook XML.

This package is known to build and work properly using an LFS-11.2 platform.

Package Information

DocBook XML DTD and Schemas 5.0 Dependencies

Required

libxml2-2.10.0, sgml-common-0.6.3, and UnZip-6.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/docbook5-xml

Installation of DocBook XML DTD and Schemas 5.0

Install DocBook XML DTD and Schemas by running the following commands as the root user:

install -vdm755 /usr/share/xml/docbook/schema/{dtd,rng,sch,xsd}/5.0 &&
install -vm644  dtd/* /usr/share/xml/docbook/schema/dtd/5.0         &&
install -vm644  rng/* /usr/share/xml/docbook/schema/rng/5.0         &&
install -vm644  sch/* /usr/share/xml/docbook/schema/sch/5.0         &&
install -vm644  xsd/* /usr/share/xml/docbook/schema/xsd/5.0

Create (or update) and populate the /etc/xml/docbook-5.0 catalog file by running the following commands as the root user:

if [ ! -e /etc/xml/docbook-5.0 ]; then
    xmlcatalog --noout --create /etc/xml/docbook-5.0
fi &&

xmlcatalog --noout --add "public" \
  "-//OASIS//DTD DocBook XML 5.0//EN" \
  "file:///usr/share/xml/docbook/schema/dtd/5.0/docbook.dtd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "system" \
  "http://www.oasis-open.org/docbook/xml/5.0/dtd/docbook.dtd" \
  "file:///usr/share/xml/docbook/schema/dtd/5.0/docbook.dtd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "system" \
  "http://docbook.org/xml/5.0/dtd/docbook.dtd" \
  "file:///usr/share/xml/docbook/schema/dtd/5.0/docbook.dtd" \
  /etc/xml/docbook-5.0 &&

xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbook.rng" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbook.rng" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbook.rng" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbookxi.rng" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rnc/docbook.rnc" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbook.rnc" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbook.rnc" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbook.rnc" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rnc/docbookxi.rnc" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbookxi.rnc" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbookxi.rnc" \
  "file:///usr/share/xml/docbook/schema/rng/5.0/docbookxi.rnc" \
  /etc/xml/docbook-5.0 &&

xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/docbook.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/docbook.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/docbook.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/docbook.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/docbookxi.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/docbookxi.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/docbookxi.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/docbookxi.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/xi.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/xi.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/xi.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/xi.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/xlink.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/xlink.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/xlink.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/xlink.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/xml.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/xml.xsd" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/xml.xsd" \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/xml.xsd" \
  /etc/xml/docbook-5.0 &&

xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/sch/docbook.sch" \
  "file:///usr/share/xml/docbook/schema/sch/5.0/docbook.sch" \
  /etc/xml/docbook-5.0 &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/sch/docbook.sch" \
  "file:///usr/share/xml/docbook/schema/sch/5.0/docbook.sch" \
  /etc/xml/docbook-5.0

While again as the root user, create the individual catalogs:

xmlcatalog --noout --create /usr/share/xml/docbook/schema/dtd/5.0/catalog.xml &&

xmlcatalog --noout --add "public" \
  "-//OASIS//DTD DocBook XML 5.0//EN" \
  "docbook.dtd" /usr/share/xml/docbook/schema/dtd/5.0/catalog.xml &&
xmlcatalog --noout --add "system" \
  "http://www.oasis-open.org/docbook/xml/5.0/dtd/docbook.dtd" \
  "docbook.dtd" /usr/share/xml/docbook/schema/dtd/5.0/catalog.xml &&

xmlcatalog --noout --create /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbook.rng" \
  "docbook.rng" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng" \
  "docbook.rng" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbookxi.rng" \
  "docbookxi.rng" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" \
  "docbookxi.rng" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbook.rnc" \
  "docbook.rnc" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rnc" \
  "docbook.rnc" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/rng/docbookxi.rnc" \
  "docbookxi.rnc" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rnc" \
  "docbookxi.rnc" /usr/share/xml/docbook/schema/rng/5.0/catalog.xml &&

xmlcatalog --noout --create /usr/share/xml/docbook/schema/sch/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/sch/docbook.sch" \
  "docbook.sch" /usr/share/xml/docbook/schema/sch/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/sch/docbook.sch" \
  "docbook.sch" /usr/share/xml/docbook/schema/sch/5.0/catalog.xml &&

xmlcatalog --noout --create /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/docbook.xsd" \
  "docbook.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/docbook.xsd" \
  "docbook.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/docbookxi.xsd" \
  "docbookxi.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://www.oasis-open.org/docbook/xml/5.0/xsd/docbookxi.xsd" \
  "docbookxi.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
  "http://docbook.org/xml/5.0/xsd/xlink.xsd" \
  "xlink.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
   "http://www.oasis-open.org/docbook/xml/5.0/xsd/xlink.xsd" \
   "xlink.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
   "http://docbook.org/xml/5.0/xsd/xml.xsd" \
   "xml.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml &&
xmlcatalog --noout --add "uri" \
   "http://www.oasis-open.org/docbook/xml/5.0/xsd/xml.xsd" \
   "xml.xsd" /usr/share/xml/docbook/schema/xsd/5.0/catalog.xml

Create (or update) and populate the system XML catalog (/etc/xml/catalog) by running the following commands as the root user:

if [ ! -e /etc/xml/catalog ]; then
    xmlcatalog --noout --create /etc/xml/catalog
fi &&
xmlcatalog --noout --add "delegatePublic" \
  "-//OASIS//DTD DocBook XML 5.0//EN" \
  "file:///usr/share/xml/docbook/schema/dtd/5.0/catalog.xml" \
  /etc/xml/catalog &&
xmlcatalog --noout --add "delegateSystem" \
  "http://docbook.org/xml/5.0/dtd/" \
  "file:///usr/share/xml/docbook/schema/dtd/5.0/catalog.xml" \
  /etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
  "http://docbook.org/xml/5.0/dtd/" \
  "file:///usr/share/xml/docbook/schema/dtd/5.0/catalog.xml" \
  /etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
  "http://docbook.org/xml/5.0/rng/"  \
  "file:///usr/share/xml/docbook/schema/rng/5.0/catalog.xml" \
  /etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
  "http://docbook.org/xml/5.0/sch/"  \
  "file:///usr/share/xml/docbook/schema/sch/5.0/catalog.xml" \
  /etc/xml/catalog &&
xmlcatalog --noout --add "delegateURI" \
  "http://docbook.org/xml/5.0/xsd/"  \
  "file:///usr/share/xml/docbook/schema/xsd/5.0/catalog.xml" \
  /etc/xml/catalog

Configuring DocBook XML DTD and Schemas 5.0

Config Files

/etc/xml/catalog and /etc/xml/docbook-5.0

Contents

Installed Files: DTD, RNC, RNG, SCH and XSD files
Installed Directories: /etc/xml and /usr/share/xml/docbook/schema/{dtd,rng,sch,xsd}/5.0

Short Descriptions

DTD files

contain the DocBook 5.0 document type definitions which define the element types and the attribute lists that can be used in the corresponding XML files

RNC, RNG, and SCH files

contain the Docbook 5.0 RelaxNG, RelaxNG Compact, and Schematron schema definitions

XSD files

files contain DocBook-5.0 Schematron rules