This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: msxml3.0 SP1 can't compare??
- To: k dot weitzer at web dot de
- Subject: [xsl] Re: msxml3.0 SP1 can't compare??
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Mon, 28 May 2001 03:07:57 -0700 (PDT)
- Cc: xsl-list at lists dot mulberrytech dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
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