[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: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 18 Aug 2000 16:12:46 +0100
Re: to extract the longest string (fwd)
Rajagopal,

>I tested the following code in SAXON and I could not get the
>expected longest string, which is "cxxyycc".

What did you get instead?  Which processor are you using?

The template that I posted was a cut down one, just assigning the longest
string to a variable.  If you want to do something with that string (like
display it) then you have to add code to do that, e.g.:

<xsl:template match="table">
  <xsl:variable name="longest">
    <xsl:apply-templates select="row[1]" mode="get-longest" />
  </xsl:variable>
  <xsl:message>Longest: <xsl:value-of select="$longest" /></xsl:message>
</xsl:template>

When I do this, SAXON 5.4.1 gives me the message:

Longest: 'cxxyycc'

As does Xalan-C 0.40.0.

Cheers,

Jeni

Jeni Tennison
http://www.jenitennison.com/



 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-2011 All Rights Reserved.