RE: [xslt] HTML output indenting

Daniel, can you direct me to the part of the spec that IE is violating? I
can't find it (I'm looking at HTML 4.01), but the spec seems curiously vague
on the subject, so I could have overlooked something.

The closest thing I could find was the following, from section 9.1: "authors
should not rely on user agents to render white space immediately after a
start tag or immediately before an end tag." That clearly does not prohibit
browsers from rendering the white space.

I could be wrong, but I think IE is doing the right thing here, annoying as
it may be in some cases. (Mozilla and Opera behave the same way.) White
space collapses in HTML, but that doesn't mean it's insignificant. If you
put white space after a start tag and text is allowed in that element,
you're telling the browser that you want white space rendered. For the
browser to discard it would be capricious. Pretty-printing XML is known to
be dangerous, because it may introduce significant white space. I think the
same is true of HTML.

> -----Original Message-----
> From: Daniel Veillard []
> Sent: Tuesday, June 17, 2003 6:14 AM
> To:
> Subject: Re: [xslt] HTML output indenting
> On Tue, Jun 17, 2003 at 12:07:53PM +0200, Novický Marek wrote:
> > The problem is caused by extra line between tags <img> and 
> </div> which is rendered as text node by IE.
> > This makes indenting in HTML output useless as I have to 
> turn it off to obtain proper output.
> > 
> > Any suggestion?
>   Get all browser vendors to actually follow the HTML spec, or
> turn off indenting. Alternately build a giant matrix of where the
> various browser (vendors/versions) break the spec look at the
> subset of the places where indentation can be done, might be 
> equivalent to disabling indentation in practice.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]