|
Subject: Re: [xsl] long text overloflowing columns tables From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 10 May 2010 19:43:58 -0400 |
i have a a table with fixed column and sometime the text overload on some adjancent column,
any one having a xsl template that insert a break space, periodicly? , i mean i got a lot of tables and every time i have to accomodate with a special column , i have found some static template in the mailling list, but doesn't do the job for my use case (in fact i was using breacking space from java and sending the data formated to my xsl template http://pastebin.com/mUe4gPAW ) , but now ... i got to do the work in the xsl side !
beside implementing my own routing!? is there any "automated/easy" way ? (i'm using apache FOP by the way)
and thanks
<xsl:template match="table-thingy//text()" name="chop-it-up">
<xsl:param name="text" select="."/>
<xsl:choose>
<xsl:when test="string-length($text) <= $length">
<!--short enough-->
<xsl:value-of select="$text"/>
</xsl:when>
<xsl:otherwise>
<!--too long-->
<xsl:value-of select="substring( $text, 1, $length )"/>
<!--add a zero-width breaking space-->
<xsl:text>​</xsl:text>
<xsl:call-template name="chop-it-up">
<xsl:with-param name="text" select="substring($text,$length+1)"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>-- XSLT/XQuery training: after http://XMLPrague.cz 2011-03-28/04-01 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] long text overloflowing colum, Red Light | Thread | [xsl] For-each-group groups element, Peter Desjardins |
| [xsl] long text overloflowing colum, Red Light | Date | [xsl] For-each-group groups element, Peter Desjardins |
| Month |