Re: check for twice defined attributes ?

At 10:50 21.08.2000 +0200, Alexander Biron wrote:
>Hi Frank,
>
>one item on tidy's todo list (follow link from tidy page) is
>- sort attributes in canonical order
>It makes sense to takle your problem in combination with this
>task. BTW: what should be the default when the attribute values are
>contradictory (e.g. <foo align="right" align="center">) Take the first -
>get rid of both or quit with error?

Take the LAST, as that is what a browser would do, I think.
Not sure though.
Yet, I believe it would make sense: if you set a variable to a certain 
value, and lateron assign another value to the variablem, the variable is 
always gonna contain the LAST assigned value, and not the FIRST assigned value.

It would also make sense, to include DTD conformity into this approach and 
drop (or convert to stylesheets where possible) all nonstandard attributes.

This may be turned off by a configuration option, but should be turned on 
by default.



>On Sun, 20 Aug 2000, Frank Steuer wrote:
>
> > JTidy, 4. August
> >
> > Example:
> >
> > <table border="0" cellpadding="0" cellspacing="0" bgcolor="ffffff"
> > align="center" height="100%" width="100%" align="center" valign="middle">
> >
> > I now saw very often webpages out there where attributes are defined twice
> > (by mistake). These double existing attributes are copied by jtidy in the
> > result document.
> >
> > The xerces parser I use with xalan e.g. does not accept these twice
> > defined attributes and exits the conversion process XML->*ml using XSL.
> >
> > Is this going to be covered by one of the next versions of tidy or should
> > I write an additional filter to eleminate one of these attributes ?
> >
> > frank
> > ---------------------------------------------------
> > Frank Steuer
> > steuer@ece.orst.edu
> > for public PGP-key: finger -l steuer@ece.orst.edu
> > ---------------------------------------------------
> >
> >
>
>--
>Cheers alex          Alexander Biron
>
>work:   http://www.ifh.de/~biron/       private:
>         Tel (+49)33762-77-233           Tel(+49)30-4948857
>         mailto:biron@ifh.de             mailto:biron@frohnau-flamingos.de

--
Sebastian Lange
http://www.sl-chat.de/
Maybe the first chat site that validates as HTML
4.0 even though user input may contain HTML codes.

Courtesy to Dave Raggett's HTML Tidy:
http://www.w3.org/People/Raggett/tidy/

Tidy your documents ONLINE:
http://www.sl-chat.de/Tidy/

Received on Monday, 21 August 2000 05:31:47 UTC