This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: to extract the longest string (fwd)
- To: xsl-list at mulberrytech dot com
- Subject: Re: to extract the longest string (fwd)
- From: "C.V. Radhakrishnan" <cvr at md2 dot vsnl dot net dot in>
- Date: Fri, 18 Aug 2000 11:30:06 +0530 (IST)
- Reply-To: xsl-list at mulberrytech dot com
> <row>
> <col align="l" />
> <col align="c" />
> <col align="c" />
> <col align="r" />
> </row>
>
> would you be after the string "lccr" or "cc" for that row?
>
> I'm going to assume for now that the answer is that you are after the
> longest string, and that this string will *always* be that generated from
> the row with the largest number of columns. This makes things a lot
> easier. But I'm also going to assume that you want the string for a
> purpose other than to uncover how many columns there are within a row - if
> you're aim is to do that, you don't need to fiddle with align attributes to
> do it.
What you assumed is perfectly correct.
Now, out of sheer academic curiosity I ask you the following
Suppose the align attribute contains strings with more than one characters
How do you find out the longest string?
<row>
<col align="aaa">
<col align="b">
<col align="ccc">
<row>
<row>
<col align="a">
<col align="b">
<col align="c">
<row>
Here first <row> gives the string "aaabccc"
second <row> gives "abc";
Thanks
Rajagopal
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list