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

Bug 366429

Summary: XML Design Editor allows editing text of node which is specified as empty by DTD
Product: [WebTools] WTP Source Editing Reporter: Alex Marin <alex>
Component: wst.xmlAssignee: Salvador Zalapa <zalapa>
Status: NEW --- QA Contact: Nick Sandonato <nsand.dev>
Severity: enhancement    
Priority: P3 CC: alex, nsand.dev
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
A project for easy reproduction of the issue none

Description Alex Marin CLA 2011-12-12 11:06:41 EST
Build Identifier: M20110909-1335

I have an element described by the following DTD:

<!ELEMENT foo EMPTY>

Suppose in an xml file (using this DTD) I have the tag:

<foo/>

The XML Design Editor will allow me to add some text into this node.

If I validate the document at this point, the following (correct) error is reported:

The content of element type "foo" must match "EMPTY".

I'd expect it NOT to be editable due to the DTD specification of the element.

Reproducible: Always

Steps to Reproduce:
I've attached a testcase for the sake of simplicity:

1. Open NewFile.xml in the xml Design Editor
2. Edit the content of foo element
Comment 1 Alex Marin CLA 2011-12-12 11:09:04 EST
Created attachment 208266 [details]
A project for easy reproduction of the issue