GNOME Bugzilla – Bug 130220
Check for missing elements and attributes in html.lang syntax file
Last modified: 2006-07-26 09:25:27 UTC
While editing a html page through gedit, I saw the IMG element was not being highlighted. That tag was indeed missing from the list of entities in /usr/share/gtksourceview-1.0/language-specs/html.lang. So I decided to do a quick study of other missing items, according to the HTML 4.01 STRICT DTD (there is also a transitional, but i didn't check that). This was my result. missing ELEMENTS: DEL H1 H2 H3 H4 H5 H6 IMG INS missing ATTRIBUTES (some are rather obsure or just reserved for future use): checked datafld dataformatas datapagesize datasrc declare defer disabled event multiple nohref ondblclick readonly selected
Here it is a patch to add them. Note that h1 etc were already working and that I didn't include data* since they were not mentioned in http://www.w3.org/TR/html401/index/attributes.html I also added a couple more that I noticed in that doc, but I've not gone through the full list to see if other are missing.
Created attachment 22767 [details] [review] add missing keywords
Bart: are the data* attributes commonly used? Why did you say h1, etc are not working? Paolo: please, commit the patch with a ChangeLog entry. I'm going to change the summory of the bug report to "Check for missing elements and attributes in html.lang syntax file" instead of closing it. This is for remembering to check for missing elements and attributes against the HTML standard. Adding "easy-fix" keyword. Paolo: please, remove the "PATCH" keyword when you will have committed the patch.
committed above patch, removed PATCH keyword.
The reason I reported h* elements as not working is because of the way I was searching for missing elements and attributes : I just did a grep for all html defined elements and attributes to see if they where listed in the html.lang file. Thus, h1, h2, ... and h6 were not found because they are present in a "abbreviated" form. I should have double checked... sorry. The data* attributes are reserved for future use (see http://www.w3.org/TR/html4/sgml/dtd.html). I leave it at your discretion whether these belong there or not.
No activity on this bug. Closing