I have the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
[
<!ATTLIST a extra-attr CDATA #IMPLIED>
]>
<html>
<head>
<title>Title</title>
</head>
<body>
<a extra-attr>hola</a>
</body>
</html>
What I need is:
<a extra-attr="value"></a>
should be valid<a extra-attr></a>
valid as wellAs said here:
A bareword attribute is a violation of the XML spec. The XHTML spec says that the best way around such cases where HTML has a bareword attribute (selected, checked, multiple, etc.) is to use selected="selected", checked="checked", and so on. An SGML HTML parser (web browser) will ignore the value it's given, and an XML XHTML parser (good web browser) will acknowledge the value, and ignore it. A file with selected="selected" is valid XHTML, according to the W3C's validation program.