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

Re: to extract the longest string (fwd)

Subject: Re: to extract the longest string (fwd)
From: "C.V. Radhakrishnan" <cvr@xxxxxxxxxxxxxxx>
Date: Fri, 18 Aug 2000 11:30:06 +0530 (IST)
c v radhakrishnan
> <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


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.