W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2003

Change what --drop-proprietary-attributes does?

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 08 Apr 2003 06:38:59 +0200
To: html-tidy@w3.org
Message-ID: <3ecb4c62.259608897@smtp.bjoern.hoehrmann.de>

Hi Tidy users,

  In the past, the --drop-proprietary-attributes caused Tidy to remove
attributes explicitly marked as proprietary in Tidys attribute data
base. This provides rather insufficient results, since Tidy was only
able to make general claims like "height" is always standard,
"topmargin" always proprietary. Now we are going to implement a more
sophisticated table that contains version informations for all
attributes on all elements in 

  * HTML 2.0
  * HTML 3.2
  * HTML 4.0 Strict
  * HTML 4.0 Transitional
  * HTML 4.0 Frameset
  * HTML 4.01 Strict
  * HTML 4.01 Transitional
  * HTML 4.01 Frameset
  * XHTML 1.0 Strict
  * XHTML 1.0 Transitional
  * XHTML 1.0 Frameset
  * XHTML 1.1
  * XHTML Basic 1.0

This covers all versions of HTML and XHTML (but not some profiles like
XHTML+Math due to lack of MathML support in Tidy). This allows Tidy to
differentiate between a "height" attribute on <img> and one on <table>,
the latter was not supported in any version of (X)HTML. I think the
--drop-proprietary-attributes configuration option should be changed in
how it determines what attributes are proprietary, i.e.

  if (the element is defined in any version of XHTML/HTML)
    if (the element/attribute combination is not defined in any version)
      drop the attribute
      keep it
    keep it


  <body topmargin='10'> => <body>            (always proprietary)
  <table height='50%'>  => <table>           (proprietary on <table>)
  <strong cool='maybe'> => <strong>          (never been defined)
  <img height='50' ...> => <img height='50'> (defined in various specs)
  <a urn='...'>         => <a urn='...'>     (defined in HTML 2.0)
  <foo bar='baz'>       => <foo bar='baz'>   (non-HTML element)

This is basically what --drop-proprietary-attributes is supposed to do
anyway, but the option will be way more active and may thus cause
trouble to some users (even though this is unlikely, since if you use
proprietary markup, you won't advise Tidy to drop it) if they weren't
aware they are doing non-standard stuff.

The alternative would be to add a new value to the configuration option,
e.g. `--drop-proprietary-attributes: all` but I don't think this

What do you think? Change as proposed or keep the old buggy behaivour?

related bug report, <http://tidy.sf.net/bug/708322>.
Received on Tuesday, 8 April 2003 00:39:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:49 UTC