[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] html:br
Subject: Re: [xsl] html:br From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 31 Mar 2003 23:32:23 +0100 |
> So there is no way to create an "entity" (or similar) of a line break > character then? well yes that's what you did, but using the &lb; is the same as hitting return on your keyboard: it inserts a newline char. You probably don't want that, you probably want to insert an xsl:text node containing such a thing, so you could if you want define lb to be <!ENTITY lb "<xsl:text> </xsl:text>"> but really, I wouldn't. XSLT's white space stripping rules are rather simple once you get used to them and after a while you just know that <xsl:if test="..."> <wibble/> does not introduce space before <wibble/> but <xsl:if test="..."> wobble does introduce a newline and two spaces before wobble as they are part of a non-white text node, however if you hide things in entities <xsl:if test="..."> &lb; Now you can't say if that newline and two spaces before the &lb; will be stripped or not unless you go back and check exactly how you defined &lb;. and really you are not saving much typing: <xsl:text> </xsl:text> ain't so bad, you get used to typing <xsl:template match=" 100 times every stylesheet, you can get used to using xsl:text as well:-) David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] html:br, Karl J. Stubsjoen | Thread | Re: [xsl] html:br, Wendell Piez |
RE: [xsl] XPath & generate-id, Bhandari, Ashish | Date | Re: [xsl] namespace problem with DO, Michael Pediaditakis |
Month |