xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koes, Derrick" <Derrick.K...@smith-nephew.com>
Subject RE: carriage return
Date Thu, 12 Sep 2002 18:36:27 GMT
Attributes for <fo:block> did the trick.

white-space-collapse="false"

white-space-treatment="preserve"

linefeed-preserve="preserve"

 

-----Original Message-----
From: Koes, Derrick [mailto:Derrick.Koes@smith-nephew.com] 
Sent: Wednesday, September 11, 2002 6:52 PM
To: fop-user@xml.apache.org
Subject: carriage return

 

 

I have some XML with a carriage return that I would like carried over to the
rendered PDF document.

I cannot seem to do this.

Any suggestions?

 

XML snippet:

 

<Description>desc&#13;&#10;more</Description>

 

XSL snippet:

 

<xsl:variable name="description" select="./Description"/>

      <xsl:if test="$description">

        <xsl:choose>

          <xsl:when test="string-length($description) &lt; 100">

            <fo:table inline-progression-dimension.optimum="5pt"
text-align="left" table-layout="fixed">

              <fo:table-column/>

              <fo:table-column/>

              <fo:table-body>

                <fo:table-row keep-together="always"
keep-with-next="always">

                  <fo:table-cell>

                    <fo:block

                        space-after.optimum="10pt"

                        language="en"

                        country="US"

                        hyphenate="true"

                        hyphenation-push-character-count="2"

                        hyphenation-remain-character-count="2">

                      <xsl:value-of select="./Title"/>

                      <xsl:text>:</xsl:text>

                    </fo:block>

                  </fo:table-cell>

                  <fo:table-cell>

                    <fo:block

                        space-after.optimum="10pt"

                        language="en"

                        country="US"

                        hyphenate="true"

                        hyphenation-push-character-count="2"

                        hyphenation-remain-character-count="2">

                      <xsl:value-of select="$description"/>

                    </fo:block>

                  </fo:table-cell>

                </fo:table-row>

              </fo:table-body>

            </fo:table>

          </xsl:when>

          <xsl:otherwise>

            <fo:table inline-progression-dimension.optimum="5pt"
text-align="left" table-layout="fixed">

              <fo:table-column/>

              <fo:table-body>

                <fo:table-row keep-together="always">

                  <fo:table-cell>

                    <fo:block

                        language="en"

                        country="US"

                        hyphenate="true"

                        hyphenation-push-character-count="2"

                        hyphenation-remain-character-count="2">

                      <xsl:value-of select="./Title"/>

                      <xsl:text>:</xsl:text>

                    </fo:block>

                  </fo:table-cell>

                </fo:table-row>

                <fo:table-row>

                  <fo:table-cell >

                    <fo:block

                        space-after.optimum="10pt"

                        language="en"

                        country="US"

                        hyphenate="true"

                        hyphenation-push-character-count="2"

                        hyphenation-remain-character-count="2">

                      <xsl:value-of select="$description"/>

                    </fo:block>

                  </fo:table-cell>

                </fo:table-row>

              </fo:table-body>

            </fo:table>

          </xsl:otherwise>

        </xsl:choose>


Mime
View raw message