This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to preserve white space of a title line
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] How to preserve white space of a title line
- From: tcn at melvaig dot co dot uk (Trevor Nash)
- Date: Mon, 09 Apr 2001 10:07:25 GMT
- Organization: Melvaig Software Engineering Limited
- References: <000b01c0c0a6$caa810d0$f501800a@hqlab.unisvr>
- Reply-To: xsl-list at lists dot mulberrytech dot com
>Need help to use preseve-space element as following case;
>
>1 use param to define a title line, such as
><xsl:param name="titleLine" select="Annual report for xxxx"/>
>There are two or more white spaces between each word.
>
>2 Try to use <xsl:preserve-space> commads but can not figure out how to
>use it,
> since the attritute of presrve is for element.
>
It is hard to say what your problem is, but it will not be solved with
xsl:preserve-space. This specifies what to do with white-space-only
nodes in the *source* document, such as in the following non-empty
element:
<text> </text>
Even then, it only has an effect if you are also using a
<xsl:strip-space> which matches the same element.
We need to know how you are using this parameter, and what output mode
you are using (html, xml, text?). I can only think of two ways these
spaces could get lost:
1) you are using the function normalize-space() on this value
2) you are generating HTML, and are forgetting that browsers
generally display multiple spaces the same as a single space
Other guesses anyone?
HTH
Trevor Nash
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list