Re: observing HTML rules when converting to XML

Hi Bjoern,

On Wed, 5 Feb 2003, Bjoern Hoehrmann wrote:
> * Piotr Banski wrote:
> >Converting an HTML file to XML, I noticed that Tidy relocates bits of
> >markup trying to be HTML compliant. In the case at hand, it removes <meta>
> >elements from within <td> elements and puts the former at the top of the
> >output file. The comment is: "Warning: <meta> isn't allowed in <td>
> >elements".
> >
> >But it's XML I'm converting to, so why should it care about what HTML
> >allows or not? Is this a bug, or a feature ( ;-) ), please?
> 
> It's a feature. Tidy tries to fix your invalid markup, that's what Tidy
> is written for.

My point was that the markup in question is not invalid XML. or rather,
that Tidy has no way of knowing that. Given that Tidy offers the option of
translating HTML into XML, which I'm sure is the reason many people use
this tool nowadays, "fixing invalid markup" does not mean, or should not
mean IMO, the same as "making markup compliant with *some* version of
HTML". Naturally, if what you're saying is the Dev Team's point of view
then I have no other way but to accept it. However, not relocating markup
in HTML->XML translation still seems a plausible config option to me.

Thanks for your time,

   Piotr

Received on Wednesday, 5 February 2003 05:09:58 UTC