Multi Root Document Types
A single document type with multiple root elements is used to handle varying documents that may exist within a system.
A system needs to handle varying types of documents. These are somehow related, yet each type of document needs a unique identity provided by a document root.
Systems where varying types of documents need to be processed, but the different documents are closely related.
Maintainability of the system is effected by how the document types are organized.
Create a single declaration with multiple root elements for the different document types.
The two documents below show two different bank transactions, a deposit and a withdrawal. The document have different root elements, but many other common elements. Both of these documents use the same DTD, but declare different roots.
<!DOCTYPE "Deposit" SYSTEM "bank.dtd">
<!DOCTYPE "Withdrawal" SYSTEM "bank.dtd">
Allows the different document types to easily share structure. Having all of the related document types declared in a single file can increase maintainability. However, if revisions need to be made to the different document types separately, it might be better having separate declarations.
Multiple Document Types
(http://www.oasis-open.org/docbook/) the root element can be a