RE: [xsl] Control over html output

Subject: RE: [xsl] Control over html output
From: "Andy Joslin" <andy@xxxxxxxxxxxxxxx>
Date: Tue, 22 May 2001 13:33:27 -0000
Dear All

Thanks very much for all the comments and feedback so far...I've certainly
got a few things to test out when I'm back in the office tomorrow.

There does however still seem to be a degree of ambiguity over how exactly a
processor should output html and it would be nice to see the recommendations
of Mike Brown implemented so that the situation is clearer.


Firstly, I agree with Mike Kay when he writes:

>So if it makes a difference to what you see on the browser screen,
something
>is wrong.

It may well be a bug in Xalan (I haven't used any other processors yet, so I
can't test my code against them), as it seems a very odd place to put in an
arbitrary line break...


Ideally, I'd like the situation as described by Alex Black whereby what I
put in equals what comes out:

> what I would like to see is an option for "preserve" i.e. I can make my
own
> whitespace in the xslt, and have that preserved as much as possible as
> output is sent.

I was very interested to see David Carlisle's recommendation of leaving out
the indent option altogether (I'd still like to try this on Xalan) but
according to Mike Kay this will just default to output indent="yes", so
that's a pity...

Jenni, I appreciate you point re: buggy browsers....

>I can't see anything there that would imply that the sample that Andy gave,
which involved adding a line break before a closing td element, should make
a difference to the rendering. So in this case I'd tend towards blaming
>a dodgy browser (which ones caused problems, btw, Andy?) rather than the
XSLT processor.

The two browsers that I've experienced this problem with are Netscape 4 and,
perhaps more worryingly, Mozilla (latest build), and so I presume Netscape 6
as well. Suffice to say that IE happily renders any old code that you care
to throw at it :)

I guess my point was that I'd like to preserve what I believe to be "good
practice" coding in the (x)html snippets in the stylesheets and benefit from
the results in the output. Netscape has always been a problem when it comes
to adding whitespace in table cells if you're not careful. Having said that,
I can't see how adding an arbitrary line break within an html table cell is
particularly good practice for the xslt processor even if IE ignores it.


regards

Andy




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread