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

Bug 356649

Summary: Eclipse HTML5 editor marks id attribute of script elements as undefined attribute name.
Product: [WebTools] WTP Source Editing Reporter: Pavel Lisa <pavel.lisa>
Component: wst.htmlAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: cbridgha, raghunathan.srinivasan, thatnitind
Version: 3.3Flags: nsand.dev: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
nsand.dev: pmc_approved? (naci.dai)
nsand.dev: pmc_approved? (deboer)
nsand.dev: pmc_approved? (neil.hauge)
nsand.dev: pmc_approved? (kaloyan)
cbridgha: pmc_approved+
thatnitind: review+
Target Milestone: 3.3.1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: PMC_approved
Attachments:
Description Flags
patch none

Description Pavel Lisa CLA 2011-09-02 18:18:39 EDT
Build Identifier: I20110613-1736

Eclipse marks the id attribute of script elements with a warning that an undefined attribute name is used, while id attribute in HTML5 is defined for scripts (might be uncommon, but it is so: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html ), and I believe id is defined for other HTML-ish standards as well. 

Reproducible: Always

Steps to Reproduce:
1. create a HTML5 document
2. add a script tag to head, fill the id attribute of the script
3. see that the id attribute is underlined or other way marked as warning
Comment 1 Nick Sandonato CLA 2011-09-06 15:52:06 EDT
Created attachment 202840 [details]
patch
Comment 2 Nick Sandonato CLA 2011-09-06 16:15:21 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such.

This is an inconsistency with the HTML 5 specification and causes undesired validation markers that are misleading.

* Is there a work-around? If so, why do you believe the work-around is insufficient?

No

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

Unit tests have been run and ad hoc testing executed.

* Give a brief technical overview. Who has reviewed this fix?

The content model element for SCRIPT was not including the core attributes. The SCRIPT declaration now correctly adds the core attributes to its list.

* What is the risk associated with this fix?

Very low.
Comment 3 Nick Sandonato CLA 2011-09-07 21:49:16 EDT
Code released. Thanks for the reviews.