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.
Note
Development versions of BLFS may not build or run some packages
properly if LFS or dependencies have been updated since the most
recent stable versions of the books.
Package Information
DocBook XML DTD and Schemas 5.0 Dependencies
Required
libxml2-2.13.4 and UnZip-6.0
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
Still 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