This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: whitespaces inside empty tags



> 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)

David


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]