Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » unnecessary <li> closing tag required(HTML validator is too strict for list item tag)
unnecessary <li> closing tag required [message #781113] Fri, 20 January 2012 15:18 Go to next message
Julien Robinson is currently offline Julien RobinsonFriend
Messages: 3
Registered: January 2012
Junior Member
Hi all,
I've looked through the web and these forums but not found anything about this particular (minor) issue.

I have a project with PHP and HTML. Whenever I use an HTML list with <li> items, I get warnings "invalid location of tag (li)". These appear to be provoked by the missing closing tag </li>. However, closing tags are not mandatory for <li> per the HTML 4 spec.

Question 1: how can I tell the validator about <li> and other tags that don't need to be closed ?

Example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:/ /www.w3.org/TR/html4/strict.dtd"><!-- remove the space in the link! -->
<html>
<head><title>blabla</title></head>
<body>
<ul>
<li>foo
<li>bar
</ul>
</body>
</html>

some (indirect) documentation about closing tags here: http:/ /stackoverflow.com/questions/3008593 (remove the space in the link)
(great read, BTW)


I'd better say, because otherwise I might get this answer: I do not think it's a good idea to disable warnings, such as "invalid location of tag" (I know how to do that), or to introduce exceptions for the specific files (I also know how to do that). Warnings may be useful in another context, one never knows.

Another remark: I've tried it with and without the first line "<!DOCTYPE...", the results are the same.

Yet another remark: what's strange is that if I add </li> and save, the warnings disappear; then I remove the </li>, the warnings still don't come back!! But if afterwards I rebuild the project... the warnings are back!

Question 2: could it be a matter of refreshing the project properties, or removing an XML validator that perhaps is taking precedence?

Oh, and of course, my working versions:
Version: Helios Release
Build id: 20100617-1415

with plug-in "SVN team provider" added.

Thanks for any tips!
JR

PS : spaces in links because I don't have the rights to post links
Re: unnecessary <li> closing tag required [message #782369 is a reply to message #781113] Mon, 23 January 2012 16:01 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick SandonatoFriend
Messages: 126
Registered: July 2009
Senior Member
Hi Julien,

You may want to try and newer build of WTP. This was fixed in Helios SR1 [1]. Upgrading to Indigo will also contain this fix.

[1] https://bugs.eclipse.org/308412

- Nick

[Updated on: Mon, 23 January 2012 16:06]

Report message to a moderator

Re: unnecessary <li> closing tag required [message #782705 is a reply to message #782369] Tue, 24 January 2012 09:13 Go to previous message
Julien Robinson is currently offline Julien RobinsonFriend
Messages: 3
Registered: January 2012
Junior Member

Quote:
You may want to try and newer build of WTP. This was fixed in Helios SR1 [1]. Upgrading to Indigo will also contain this fix.


Thanks a lot, I hadn't found that bug and patch (sometimes, GINYF! Smile ).

I used Helios (and not any other distribution) because I'm working with PHP (I try to stick to packaged distributions to avoid losing time with consistency of plug-ins).

A newbie question: what's Helios SR1?
I thought I had the latest version...
Previous Topic:getAppletContext() In Eclipse IDE?
Next Topic:How to create schema to wsdl
Goto Forum:
  


Current Time: Wed Apr 24 14:56:50 GMT 2024

Powered by FUDForum. Page generated in 0.03378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top