|
Subject: Re: [xsl] Formatting table information From: Kamal Bhatt <kbhatt@xxxxxxxxx> Date: Tue, 06 Dec 2005 09:48:06 +1100 |
<xsl:template name="longest-str"> <xsl:param name="set"/> <xsl:param name="curr-max-size" select="0"/> <xsl:param name="index" select="1"/>
<xsl:template name="append-pad">
<xsl:param name="pad-char"><xsl:text>&space;</xsl:text></xsl:param>
<xsl:param name="pad-var"/>
<xsl:param name="length"/>
<xsl:choose>
<xsl:when test="string-length($pad-var) < $length">
<xsl:call-template name="append-pad">
<xsl:with-param name="pad-char" select="$pad-char"/>
<xsl:with-param name="pad-var"
select="concat($pad-var, $pad-char)"/>
<xsl:with-param name="length" select="$length"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring($pad-var, 1, $length)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>In a previous post I mentioned that that I have created a template to
format lines to a fixed width and a function to format a table. When I
said table, I meant something with only two columns. Now, I need to
format a table with three columns.
Hi Kamal,
I am not sure that I understand all your requirements, but for getting 3 columns, the solution is the same as for 2 columns, you will just have to use modulo 3 instead of modulo 2. I do not know whether this is enough to get you in the right direction.
Regards, Ragulf Pickaxe :-)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Formatting table informat, Ragulf Pickaxe | Thread | [xsl] simpler matching of qnames in, Paul Downey |
| Re: [xsl] Formatting table informat, Kamal Bhatt | Date | Re: [xsl] XSL does not transform co, David Carlisle |
| Month |