[xml] HTML id and name attributes
- From: Michael Day <mikeday yeslogic com>
- To: xml gnome org
- Subject: [xml] HTML id and name attributes
- Date: Mon, 7 Nov 2005 15:19:17 +1100 (EST)
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.
Print XML with Prince!
] [Thread Prev