Subject: RE: [xsl] Switching Between Two Column Mode and One Column Mode - Peek Ahead? From: "kent" <kent@xxxxxxxxxxxxxxxxx> Date: Mon, 23 May 2005 16:15:08 +0100 |
Like I said in the original post I have no problem testing the length of the description. That is the easy bit. I am interested in the length of each description and consequently the length of the next description. Thanks though, however my problem is the Peek Ahead bit. Here would be the algorithm: <xsl:for-each select="rss/channel/item/description"> <xsl:if test="string-length(description) > 400"> format description as single column <xsl:if> <xsl:else> <xsl:if test="string-length(NEXTdescription) < 400"> format description & NEXTdescription as two column & skip once <xsl:if> <xsl:else> format description as single column <xsl:else> <xsl:else> </xsl:for-each> Any ideas? -----Original Message----- From: Ragulf Pickaxe [mailto:ragulf.pickaxe@xxxxxxxxx] Sent: Monday, May 23, 2005 3:03 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Switching Between Two Column Mode and One Column Mode - Peek Ahead? Hi Kent, I am not quite sure what you mean. Is it the total amount of length for all description elements, that is the base of whether to use one or two coloumns? Then it would be something like: <xsl:variable name="testlength"> <xsl:for-each select="rss/channel/item/description"> <xsl:value-of select="text()"/> <!-- Presumed only text, not links, to test --> </xsl:for-each> </xsl:variable> Then you should be able to test the length of this variable (this is not tested). I hope this helps a little. Regards, Ragulf Pickaxe :-) On 5/23/05, kent <kent@xxxxxxxxxxxxxxxxx> wrote: > Thanks for your interest, I didn't want to clutter up the mail group with a > lengthy example, but here it goes (actually a short example): > > (note the escaped html, very typical in feeds. I need to fire my column rule > on the length of the item/description. I would consider these descriptions > short and therefore format as two columns)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Switching Between Two Col, Ragulf Pickaxe | Thread | Re: [xsl] Switching Between Two Col, David Carlisle |
RE: [xsl] How do I output script im, Bovy, Stephen J | Date | RE: RE: RE: [xsl] creating frames w, cknell |
Month |