[xml] HTML id and name attributes




Hi,

Currently libxml treats both the "id" and "name" attributes as type ID
(this is done by xmlIsID in valid.c)

This is a problem for common HTML anchor markup using both like this:

    <a id="foo" name="foo">...</a>

This markup will produce an error message because the "foo" ID has been
defined multiple times, even though it is on the same element.

Would it be possible to only treat "id" as an ID and not "name"? This
would make it easier to parse HTML documents without spurious warnings as
well as being more compatible with XHTML, in which "name" is only defined
as an NMTOKEN attribute.

Best regards,

Michael

-- 
Print XML with Prince!
http://www.princexml.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]