Suppose I have two XML documents based on different DTDs and I want to merge them into one document for further processing. How can I do that without destroying the well-formedness and validness?
Merging without destroying well-formedness is not particularly hard. Just putting one inside the other would do it. Preserving validity is imponderable without knowing the details of the two DTDs, and if there is any overlap where they are both valid. Can you give us anuy more detail about these two DTDs