|
An XSLT processor can't do this, because it doesn't know what source document's DOCTYPE declaration was. Remember, an XML parser parses the source document, validates it against a DTD if necessary, resolves entity references, etc. before handing the result to the XSLT processor, and the XSLT processor has no way of knowing what was handed to the XML parser. To copy the DOCTYPE declaration from one file to another, you'd have to use some tool that could look at the source document as straight text and not as an XML document to be parsed, such as perl or python.
Bob
|