Wrap table column content

Discussion in 'XML' started by Guru, Sep 30, 2004.

  1. Guru

    Guru Guest

    Hi,

    I am using FOP for creating pdf.
    I am having a table which has 14 columns.
    And each column contents may contain any
    number of chars.

    My problem is :
    When the text is having no spaces in between like
    "thisisalongwordandcouldnotbewrapped", it is overlapping
    another column. How to wrap the text with in the cell.??

    I used wrap-option="wrap" overflow="auto", but no luck.
    Is there any solutions for this?

    Guru.
     
    Guru, Sep 30, 2004
    #1
    1. Advertising

  2. Guru

    Guru Guest

    Finally i solved the problem
    by inserting zero width white spaces at regular intervals.
    Thanks to FOP mailing list..!


    <xsl:call-template name="text_wrapper"> <xsl:with-param
    name="Text" select="$myString"/>
    </xsl:call-template>


    ===Templates used to do the task.
    <xsl:template name="text_wrapper">
    <xsl:param name="Text"/>
    <xsl:choose>
    <xsl:when test="string-length($Text)">
    <xsl:value-of select="substring($Text,1,25)"/>

    <xsl:call-template name="wrapper_helper">
    <xsl:with-param name="Text" select="substring($Text,26)"/>
    </xsl:call-template>
    </xsl:when>
    </xsl:choose>
    </xsl:template>
    <xsl:template name="wrapper_helper">
    <xsl:param name="Text"/>
    <xsl:value-of select="substring($Text,1,25)"/>

    <xsl:call-template name="text_wrapper">
    <xsl:with-param name="Text" select="substring($Text,26)"/>
    </xsl:call-template>
    </xsl:template>


    (Guru) wrote in message news:<>...
    > Hi,
    >
    > I am using FOP for creating pdf.
    > I am having a table which has 14 columns.
    > And each column contents may contain any
    > number of chars.
    >
    > My problem is :
    > When the text is having no spaces in between like
    > "thisisalongwordandcouldnotbewrapped", it is overlapping
    > another column. How to wrap the text with in the cell.??
    >
    > I used wrap-option="wrap" overflow="auto", but no luck.
    > Is there any solutions for this?
    >
    > Guru.
     
    Guru, Oct 2, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. savvy
    Replies:
    1
    Views:
    487
    savvy
    Jan 18, 2006
  2. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    717
    Chronic Philharmonic
    May 10, 2008
  3. CKKwan
    Replies:
    1
    Views:
    1,569
    dorayme
    Sep 3, 2008
  4. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    254
    Art Werschulz
    Sep 22, 2003
  5. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 24, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    257
    Anno Siegel
    Sep 25, 2003
Loading...

Share This Page