You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Koes, Derrick" <De...@smith-nephew.com> on 2002/09/12 00:52:24 UTC

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>