[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Switching Between Two Column Mode and One Column M

Subject: RE: Switching Between Two Column Mode and One Column Mode - Peek Ahead?
From: "kent" <kent@xxxxxxxxxxxxxxxxx>
Date: Mon, 23 May 2005 16:15:08 +0100
two column xsl
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) &gt; 400">
			format description  as single column
	<xsl:if>

	<xsl:else>
		<xsl:if test="string-length(NEXTdescription) &lt; 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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.