xsl-list
[Top] [All Lists]

RE: xml to xsl: fo -> pdf format: break line!!!!

2003-05-23 06:22:06

Hi - you could try something along the lines of...


<xsl:template name="lf-to-block">
  <xsl:param name="text"/>
  <xsl:choose>
     <xsl:when test="contains($text, '&#10;')">
        <fo:block>
          <xsl:value-of select="substring-before($text, '&#10;')"/>
      </fo:block>
        <xsl:call-template name="lf-to-block">
          <xsl:with-param name="text"
select="substring-after($text,'&#10;')"/>
        </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
        <fo:block>
          <xsl:value-of select="$text"/>
      </fo:block>
     </xsl:otherwise>
  </xsl:choose>
</xsl:template>


All the best,
Richard

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of 
Marco Pedrini
Sent: 23 May 2003 10:55
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] xml to xsl: fo -> pdf format: break line!!!!


Hi, could anyone help me?
I have some problem with the transformation of xml, through fo (formatting
object) to generate a pdf from it.

If I have information stored in a DB ORACLE, inserted from a data field
where the user could write free text (including break line, with the ENTER
tab).

HOW could I represent in pdf the same formatted text? Actually the code I
have is:

<fo:block font-size="8pt" font-family="sans-serif" line-height="10pt"
space-after.optimum="4pt" padding-top="4pt">      <xsl:value-of select= "//
DATA/ROWTAG/CS01_DESC_OPERAT"/>
</fo:block>

and all that is retrived fromn DB, via XML, mantain tha case format, but
lose the end of the line,  marked on DB with a double pipe.

thanx a lot
Pedro

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>