[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Control over html output


Subject: Re: [xsl] Control over html output
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 20 May 2001 14:58:34 +0100

> In this case the linebreak causes undesirable whitespace to appear in the
> resulting document in certain browsers.

If your processors indent system causes white space to appear then it is
a bug either in your XSL engine, or the broswer. It shouldn't happen.

>  At the moment I'm having to rely on
> the rather crude solution of setting the html output indent to "no" to avoid
> this, but this seems a rather inelegant solution..

If you want full control over output white space, I'd say this is the
best option. (but you might not need that control if you can get the bug
fixed) 

> On a similar note, is there any way to specify strict xhtml output?

>  e.g. <br/> in the stylesheet
> still gets output as <br> in spite of the doctype...
you need to specify something other than the html output method.

XHTML is XML so you can use the XML output method. If you want to adhere
to the compatibility guidelines it's a bit trickier. The MathML
distribution contains some XSL that takes a stylesheet using the html
output method and produces one for XHTML (adding attributes to br etc to
make sure they are not output as <br/> and making sure non empty
elements are never "accidentally" empty and so output as for example
<p/>. I think some XSL engines have a non standard xhtml output type to
make it even easier.


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp

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



Current Thread
Keywords