Re: element ID
"Michael A. Peters" <[email protected]>
| Newsgroups | gmane.comp.web.html-tidy.user |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > Hi, > > Firstly, I like to say HTML tidy is the best tool to use to validate > the HTML tags. I have been using for years and never have any > problems, not until now. Anyway, I have written Perl script to run > tidy validates php pages on the fly and it reported 'Warning: <input> > anchor "pt_action" already defined'. The warning message means no two > elements can have the same ID value in a single document. However, > these are dynamic php pages it needs same ID to perform the task. My > question is there any parameter that we could put into the config > file to ignore/exclude just for this warning. > > Any help is very much appreciated. > > Cheers, Ken Toch > > I don't know about parameter but tidy is correct, an id must be unique. I don't know how tidy would respond, but what you can do is create a custom attribute to use for your php hook rather than using the id attribute. While using a custom attribute means the document won't validate as W3C html (it can as xhtml if you properly define the attribute), it at least avoids mis-use of the id attribute.