|
Subject: RE: [xsl] Balancing Columns From: "Andrew Welch" <andrew@xxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 24 Jan 2002 15:33:00 -0000 |
Could this be another example of my string splitting templates... now known
as the welchian method with patents pending (with of course, approval by
default)
Many, many thanks :)
//put this template in between your <td> and </td>
//remember to change $yourTextString (!)
//and string size to what you want
<xsl:call-template name="text_wrapper">
<xsl:with-param name="Text" select="$yourTextString"/>
</xsl:call-template>
//this will display the first 30 chars of $Text then pass the rest to
wrapper_helper
//if no string is left it will stop
<xsl:template name="text_wrapper">
<xsl:param name="Text"/>
<xsl:choose>
<xsl:when test="string-length($Text)">
<xsl:value-of select="substring($Text,1,30)"/><br/>
<xsl:call-template name="wrapper_helper">
<xsl:with-param name="Text" select="substring($Text,31)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
no more string!
</xsl:otherwise>
</xsl:choose>
</xsl:template>
//this will also display 30 chars of the string, and pass the rest back to
text_wrapper
<xsl:template name="wrapper_helper">
<xsl:param name="Text"/>
<xsl:value-of select="substring($Text,1,30)"/><br/>
<xsl:call-template name="text_wrapper">
<xsl:with-param name="Text" select="substring($Text,31)"/>
</xsl:call-template>
</xsl:template>
-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of W. Eliot
Kimber
Sent: Thursday, January 24, 2002 3:00 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Balancing Columns
"G. Ken Holman" wrote:
>
> At 2002-01-23 11:42 -0600, W. Eliot Kimber wrote:
> >Is there a way to get balanced columns in a multi-column page layout?
>
> Columns in a page are always balanced, in that the simple page geometry
> only provides for a column count and a column gap ... thus, the column
> widths are always equal.
I think you've misunderstood what I mean by "balanced columns". I don't
mean columns of equal width, but columns in which the composed text is
of equal depth across the columns, e.g.:
xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxx xxxxxxxxxx
Not:
xxxxxxxxxxx xxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
Cheers,
Eliot
ISOGEN International, LLC
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Balancing Columns, W. Eliot Kimber | Thread | Re: [xsl] Balancing Columns, naha |
| Re: [xsl] Balancing Columns, MURAKAMI Shinyu | Date | Re: [xsl] Addition/Subtraction of n, Wendell Piez |
| Month |