Yep, there is. I had the same problem, here is my solution:

  <xsl:template match="code">
    <fo:block font-size="10pt"
      white-space-collapse="false"
      font-family="Courier"
      line-height="18pt"
      space-after.optimum="3pt"
      color="black"
      text-align="left">
      Code: <fo:block></fo:block>
      <xsl:value-of select="."/>
    </fo:block>
  </xsl:template>



----- Original Message -----
From: "Michal Kwiatek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 12, 2002 2:31 PM
Subject: Help! Code presentation


> Hi there!
>
> I need to include several pages of xml source code in my pdf document. I
> want to use code indented by XML Spy. That is to say, my text contains
> end-of-line and space characters which fop should preserve. I enclosed the
> source code in  <![CDATA ]]> markup. Although spaces are preserved,
> end-of-lines dissapear. Is there a way to make fop preserve them? Or any
> other way to present intended source code using fop?
>
> Thanks in advance,
> Michal Kwiatek

Reply via email to