RE: [xslt] LibXSLT adding annoying whitespace



Daniel Veillard wrote:
>   So one possible heuristic, would be to not add formatting spaces
> in content when there is a table parent. Would this fix the problem
> raised initially ? Michael is this the problem you encountered ?

Originally I didn't have the table in there, but just had a couple images
with a <br/> in between.  And, I don't think your reccomendation would work
because I currently don't have any formatting spaces in the XSL template.
Right now, for debugging purposes, my stylesheet is processing an XML file
with an empty root element.

Thomas Broyer wrote:
> However, try using indent="no" in your xsl:output element (not tested...)

I've tried this as well, with the exact same results.

Daniel Veillard wrote:
> What I can't understand is why you user agent renders:
> [snip]

Well, I don't know the HTML specification by heart, but both Netscape and IE
render the page exactly the same.  Even if both browsers (IE in Windows, and
Netscape in Linux) wer not to spec, that wouldn't matter because the whole
reason to serialize HTML is for display by browsers in the first place.

In addition to this, I think its worth noting that I've tested this exact
XML/XSL combination under Sablotron (Linux), Saxon (Windows), LibXSLT
(Linux), and even IE's internal XSL interpreter.  All except LibXSLT renders
correctly; they show all the HTML on one solid line with no line breaks or
whitespace.

> If you can tell me more about why this is different I may try to get
> this fixed, but I really don't see why ! <br> has to be formated on a
separate
> block under the img and the anchor/img block has to be formated on another
> one under the <br>, so I really don't see why and how the 2 extra lines
> can impact the rendering in any way.

I agree with Raphaël Hertzog's comment about whitespace between elements.
It is very significant for page rendering purposes, especially when your
HTML designers love making grids of images that have to line up perfectly.
*sigh*

--
Michael A Nachbaur
Software Developer of Online IT
Recreational Equipment, Inc.
http://www.rei.com
http://www.rei-outlet.com
http://rei.co.jp/




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