There are two conditions for including a part using DTD entities:
The master document should declare the DTD to be used, while the external entities should declare the XML sections to be referred;
The document containing the section must not define again the DTD.
A master document looks like this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE book SYSTEM "../xml/docbookx.dtd" [ <!ENTITY testing SYSTEM "testing.xml" > ] > <book> <chapter> ...
The referred document looks like this:
<section> ... here comes the section content ... </section>
The indicated DTD and the element names (section, chapter) are used here only for illustrating the inclusion mechanism. You can use any DTD and element names you need.
... &testing; ...
When splitting a large document and including the separate parts in the master file using external entities, only the master file will contain the Document Type Definition (the DTD) or other type of schema. The included sections can't define again the schema because the main document will not be valid. If you want to validate the parts separately you have to use XInclude for assembling the parts together with the master file.