Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] Newline and Whitespace Problem

Expand Messages
  • Tsuyoshi Shirotori
    Dear Umer Rashid, Thank you for using XSL Formatter. XSL Formatter can control a line break by linefeed-treatment. e.g.
    Message 1 of 2 , Mar 7 8:38 PM
    • 0 Attachment
      Dear Umer Rashid,

      Thank you for using XSL Formatter.

      XSL Formatter can control a line break by linefeed-treatment.

      e.g.
      <fo:block linefeed-treatment="preserve" wrap-option="wrap" >
      Hello I am here.
      </fo:block>

      Therefore, if can be correctly outputted to XSL-FO by XSL style
      sheet, the result which you desire will be able to be obtained.

      Thank you.

      Regards,
      //////////////////////////////////////////
      Antenna House, Inc.
      Ina Branch
      8077-1 Minamiminowa Vil. Kamiina Co.
      Nagano Pref. Japan (zip 399-4511)
      //////////////////////////////////////////


      On Thu, 03 Mar 2005 14:10:35 -0000
      "Umer Rashid" <umer_rashid@...> wrote:

      >
      >
      >
      > Hello,
      >
      > I am using XSLFormatter Version 3.2 and I am getting a problem in
      > displaying newline. I call a template to display a string in PDF
      > file.
      >
      > <xsl:call-template name="texttorows">
      > <xsl:with-param name ="StringToTransform" select ="Hello
      > I am here." />
      > </xsl:call-template>
      >
      >
      > What I should gt on generated PDF is:
      >
      > --------------------
      > Hello
      > I am here.
      > --------------------
      >
      > However, what I get is this:
      >
      > ------------------
      > Hello I
      > am here.
      > ------------------
      >
      > Can anyone tell me what can be the problem?
      >
      > Here is the template I am calling:
      >
      > -------------------------------------------------------------
      > <xsl:template name ="texttorows" >
      > <!-- import $StringToTransform-->
      > <xsl:param name ="StringToTransform" select ="''" />
      > <xsl:choose>
      > <xsl:when test ="contains($StringToTransform,' ')" >
      > <xsl:value-of select ="substring-before
      > ($StringToTransform,' ')" />
      > <xsl:text>
      > </xsl:text>
      > <!-- repeat for the remainder of the original string-->
      > <xsl:call-template name ="texttorows" >
      > <xsl:with-param name ="StringToTransform" >
      > <xsl:value-of select ="substring-after
      > ($StringToTransform,' ')" />
      > </xsl:with-param>
      > </xsl:call-template>
      > </xsl:when>
      > <!-- string does not contain newline, so just output it-->
      > <xsl:otherwise>
      > <xsl:value-of select ="$StringToTransform" />
      > </xsl:otherwise>
      > </xsl:choose>
      > </xsl:template>
      >
      > ---------------------------------------------
      >
      > Regards,
      > umer
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.