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

Re: Selection based on date comparison

Subject: Re: Selection based on date comparison
From: Goetz Bock <bock@xxxxxxxxxxx>
Date: Fri, 30 Nov 2001 19:43:48 +0100
Re:  Selection based on date comparison
> <accountelement>
>    <Ledger_Element>
>       <Ledger_Entry Distribution_Flag="D" Trade_Date="11/08/2001"/>
>       <Ledger_Entry Distribution_Flag="D" Trade_Date="05/30/2000"/>
>       <Ledger_Entry Distribution_Flag="D" Trade_Date="09/30/2001"/>
>       <Ledger_Entry Distribution_Flag="" Trade_Date="06/11/2001"/>
>       <Ledger_Entry Distribution_Flag="D" Trade_Date="04/15/1999"/>
>       <filtervalues timeframe="06/03/2001"/>
>    </Ledger_Element>
> </accountelement>
> 
> I'm trying to select all <Ledger_Entry>'s whose @Trade_Date is greater than 
> the date in <filtervalues/@timeframe> AND whose @Distribution_Flag is not 
> equal to ""
<xsl:variable name="filter" select="filtervalues/@timeframe" />
<xsl:... select="Ledger_Entry/[@Distribution_Flag != "" and @Trade_date >
    $filter] />

But the date format you choose is unsuited for compraision. Use
something like 20010603.
If you cant, you will have to use substring().

    Goetz.

 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.