Re: whitespaces inside empty tags

Subject: Re: whitespaces inside empty tags
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 27 Jun 2000 12:23:45 +0100 (BST)
> I want to put spaces inside empty tags, just before the "/", like : <br />.

In XSLT you are writing the conceptual tree model of the output
document, you have no (or at least very little) control over the
linearisation, so whether space appears inside tags or whether " or ' is
used for attribute values etc.

If you use the html output method of course then the element will be
output without the /, however if you do want to use xhtml and the xml
output method then I find that
<br class="html-compat"/>
works fine (any class value will do, just forces a space after the br.

If you search the archives of this list you'll find my html2xhtml
stylesheet that conversts an html producing XSL sheet to an xhtml
producing one, adding this class trick and some other bits and pieces
(making sure p's are non empty, duplicating anchors with both id and
name attributes, changing the doctype, etc)


 XSL-List info and archive:

Current Thread