Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330076

Summary: DOCTYPE is always added to source file when a document type is manually selected
Product: z_Archived Reporter: HowyP <howard>
Component: MylynAssignee: Florian Thienel <florian>
Status: CLOSED FIXED QA Contact: David Williams <david_williams>
Severity: normal    
Priority: P3 CC: florian
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description HowyP CLA 2010-11-12 06:52:58 EST
Build Identifier: M20100211-1343

I know that VEX doesn't support non-DTD documents at the moment. However, I was using is quite happily to edit XML Schema based docs (in my case, Docbook 5), with the exception that VEX always asked for the document type. (I would select Docbook 4.5, and most things worked fine.

However, in the latest version of VEX (M3) the DOCTYPE is always inserted into such files, which breaks XSD validation of it. I'm guessing this might be related to the change to Xerces?

The only workaround I have at the moment is to manually edit the source of each of these files after saving it to remove the doctype, which is annoying.

Reproducible: Always

Steps to Reproduce:
1. Open file which is not one of VEX's know document types, and does not have a doctype declaration (ie. is defined using XML Schema)
2. Select a type manually from the list, but don't click 'Always use this document type for the selected document'
3. Click 'OK'.
4. When the document is next saved in VEX, a DOCTYPE declaration will be added
Comment 1 Florian Thienel CLA 2010-11-13 08:14:02 EST
I'll see if I can provide a temporary fix for this. E.g. omitting the doctype declaration if you do not check "Always use this doctype...". The preferred solution would be the support of Schema anyway (bug 250838).
Comment 2 Florian Thienel CLA 2010-11-13 08:43:48 EST
It was a bug introduced when I added the base URI to the DOM. The fix should be available with the next integration build. 

(Please refer to http://wiki.eclipse.org/Vex#Download for information about how to install the integration build.)
Comment 3 Florian Thienel CLA 2010-12-07 09:13:08 EST
implemented
Comment 4 Florian Thienel CLA 2011-11-09 17:37:52 EST
Moved to Mylyn Docs Vex.