How can I use XML namespaces to combine documents that use different DTDs?
Before we answer this question, we need to clear up a common misconception about XML namespaces. It is often believed that XML namespaces provide some sort of magic that allows you to automatically combine XML documents that use different DTDs. This is not true. Although XML namespaces provide some of the tools you need to combine XML documents, you still need to do most of the work yourself, as you will see in the answer to this question. To combine documents that use different DTDs, you first need to construct a new DTD from the existing DTDs, changing content models if necessary. You can then combine the documents so that they fit the new DTD. The procedure for doing this is depressingly simple and, unfortunately, not automated, nor is it ever likely to be automated.