How to change the DOCTYPE of a document opened in the Author mode?
ro.sync.ecss.extensions.api.AuthorDocumentController.getDoctype()allows you to get the DOCTYPE of the current XML file opened in the Author page.
ro.sync.ecss.extensions.api.AuthorDocumentController.setDoctype(AuthorDocumentType)Here is an example of how this solution would work:
AuthorDocumentType dt = new AuthorDocumentType("article", "testSystemID", "testPublicID", "<!DOCTYPE article PUBLIC \"testPublicID\" \"testSystemID\">"); docController.setDoctype(dt);
ro.sync.ecss.extensions.api.AuthorDocumentType.getContent()modify it to your needs, and create another AuthorDocumentType object with the new content and with the same public, system IDs.
For example you could use this API is you want to add unparsed entities in the XML DOCTYPE.