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

sorting and selecting the last value

Subject: sorting and selecting the last value
From: Ming <myu@xxxxxxxx>
Date: Thu, 08 Aug 2002 14:36:49 -0600
value of ming
Hi,

I'm trying the access the last value of a sorted list but for some how,
the system produces the error:   Can not convert #RTREEFRAG to a
NodeList.

Here is my codes:

    <xsl:variable name='field_value'>
        <xsl:for-each select="$full_path[contains($dbs_searched,
@db)]/*">
                <xsl:sort select="."/>
                <xsl:for-each
select="self::node()[not(.=following::node())]">
                        <xsl:copy-of select="."/>
                </xsl:for-each>
        </xsl:for-each>
    </xsl:variable>

<xsl:variable name="lastval" select="$field_value[last()]" />

And the error poinrts to the last line: <xsl:variable name="lastval"
select="$field_value[last()]" />

But if I do <xsl:variable name='field_value'
select='$full_path[contains($dbs_searched, @db)]'/>  everything works
just fine.

Do you have some idea on what could cause the problem?

Thanks for your help.

Ming


 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.