sgmllib nit

Fredrik Lundh fredrik at effbot.org
Sat Dec 9 10:54:12 EST 2000


Robin Becker wrote:
> The current version of sgmllib doesn't allow the detection of attributes
> without values.

as stated in the documentation, the current version of sgmllib
only handles enough SGML to be able to parse HTML.

in HTML, attributes without values (minimized form) are treated
as boolean attributes.  boolean attributes can have one of three
formats:

    attribute="attribute" (full form: true)
    attribute (minimized form: true)
    (not present: false)

if you need to tell the difference between "true" and "true", you're
clearly not working with HTML (or anything compatible with HTML).

</F>





More information about the Python-list mailing list