- From: Mattias Karlsson <mattias.karlsson@labyrinten.se>
- Date: Tue, 8 Apr 2003 08:03:56 +0200
- To: html-tidy@w3.org
- Cc: "'Bjoern Hoehrmann'" <derhoermi@gmx.net>
Hi, Sounds good to me to do that change, but I have one question: What about if an internal subset DTD extension is included? Example: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ <!ATTLIST span bodyref CDATA #IMPLIED> ] > As far as I know, Tidy will drop the 'bodyref' from any found 'span' tags with the class='bodyref'. I need to use the "drop-proprietary-attributes" feature, but I also need Tidy to handle the extra DTD subset as well. Is this going to be handled in the future? Or have I missed any available options? Best regards, Mattias > -----Original Message----- > From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net] > Sent: den 8 april 2003 06:39 > To: html-tidy@w3.org > Subject: Change what --drop-proprietary-attributes does? > > > > 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 > else > keep it > else > keep it > > i.e. > > <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 > necessary. > > What do you think? Change as proposed or keep the old buggy > behaivour? > > regards. > -- > related bug report, <http://tidy.sf.net/bug/708322>. >
Received on Tuesday, 8 April 2003 01:55:35 UTC