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

Bug 319157

Summary: Incorrect error message: "Invalid location of tag (div)." when DIV in OBJECT
Product: [WebTools] WTP Source Editing Reporter: jzaruba <jaroslav.zaruba>
Component: wst.htmlAssignee: Rakesh <rakes123>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: minor    
Priority: P3 CC: nsand.dev, rakes123, thatnitind
Version: unspecifiedFlags: nsand.dev: review+
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
patch
none
patch nsand.dev: iplog+

Description jzaruba CLA 2010-07-07 12:22:36 EDT
Build Identifier: 

If my understanding is right DIV is perfectly valid within OBJECT, yet Eclipse complains "Invalid location of tag (div)"

http://www.w3.org/TR/REC-html40/struct/objects.html#edef-OBJECT

Reproducible: Always
Comment 1 Rakesh CLA 2010-07-14 10:45:55 EDT
Created attachment 174295 [details]
patch

Although , it is not mentioned(or i missed?) in this link that div can be inside Object, i took this link as reference 
http://www.comptechdoc.org/independent/web/html/terms/html-div-tag.html.
Created patch, assuming div can be inside Object .
Comment 2 jzaruba CLA 2010-07-14 10:51:46 EDT
(In reply to comment #1)
> Created an attachment (id=174295) [details]
> patch
> 
> Although , it is not mentioned(or i missed?) in this link that div can be
> inside Object, i took this link as reference 
> http://www.comptechdoc.org/independent/web/html/terms/html-div-tag.html.
> Created patch, assuming div can be inside Object .

This is what makes me believe DIV is allowed in OBJECT:
http://www.w3.org/TR/REC-html40/struct/objects.html#edef-OBJECT

OBJECT:
<!ELEMENT OBJECT - - (PARAM | %flow;)* 
 -- generic embedded object -->

where %flow; is:
<!ENTITY % flow "%block; | %inline;">

where %block; is:
<!ENTITY % block
 "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
 BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
Comment 3 jzaruba CLA 2010-07-14 10:54:11 EDT
So, if my understanding is right there's whole lot of elements allowed within OBJECT.
Comment 4 Nick Sandonato CLA 2010-07-14 10:59:19 EDT
(In reply to comment #3)
> So, if my understanding is right there's whole lot of elements allowed within
> OBJECT.

I agree with jzaruba's assessment. There a lot of elements that are missing from our content model for OBJECT, which mostly seems to be elements under the %block entity. I'd prefer if we could account for all of them instead of just DIV. Thanks jzaruba and Rakesh.
Comment 5 Rakesh CLA 2010-07-14 11:09:35 EDT
Created attachment 174300 [details]
patch

taking care of all block elements now.
Comment 6 Nick Sandonato CLA 2010-07-14 11:18:39 EDT
Second patch looks great, Rakesh. Thanks.
Comment 7 Nick Sandonato CLA 2010-08-23 17:23:51 EDT
Code checked in.