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

Re: msxml3.0 SP1 can't compare??

Subject: Re: msxml3.0 SP1 can't compare??
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 28 May 2001 03:07:57 -0700 (PDT)
msxml3 nan
There is no ">" operator for strings in XPath (and XSLT), therefore the result you
get (the string is first converted to number (NaN) and the result of any comparison
of NaN is false)

The following will work:

<xsl:apply-templates select="//ELEM[translate(@attr, '-', '') 
                                    > 
                                    translate('2001-03-04', '-', '')
                                    ]" />

Cheers,
Dimitre Novatchev.


Klaus Weitzer wrote:

Hi list members!

Given this XML (no DTD or Schema defined):

<ROOT>
<ELEM attr="2001-02-04" />
<ELEM attr="2001-03-04" />
<ELEM attr="2001-04-04" />
</ROOT>

and this XSL sniplet:

<xsl:apply-templates select="//ELEM[@attr > '2001-03-04']" />

<xsl:template match="ELEM" ...
   print some results
</xsl:template>

i get no results.
there is no difference between the angle-bracket and the char-entity lt.

If i do an equal comparison then i get the expected result for '2001-03-04',
even the unequal compare is ok. --> i'm confused.

When i try this in the ORACLE - xsql - servlet parser it works as expected.

thanks in advance
Klaus



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.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-2013 All Rights Reserved.