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: How to preserve white space of a title line


>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


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