Sign In/My Account | View Cart  
advertisement

Article:
 Controlling the DOCTYPE and XML Declaration
Subject: how to extract the DOCTYPE via xslt in xml to xml transform ?
Date: 2005-05-13 14:21:05
From: Bob DuCharme
Response to: how to extract the DOCTYPE via xslt in xml to xml transform ?

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


No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Sponsored By: