[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Greater than and Less than Booleans.


Subject: RE: [xsl] Greater than and Less than Booleans.
From: "Tucker, George" <GTucker@xxxxxxxxxxxxx>
Date: Tue, 7 Oct 2003 15:38:09 -0400

GOT IT!

This removes the dashes and allows the dates to be compared.

<xsl:if test="translate(D1DUE,'-','') &lt; translate(REVODUE,'-','')">

Thanks Michael

-----Original Message-----
From: Tucker, George [mailto:GTucker@xxxxxxxxxxxxx]
Sent: Tuesday, October 07, 2003 10:28 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE: [xsl] Greater than and Less than Booleans.


Thanks Ben, Brook, & Michael,

I removed the dashes from the numbered date/strings and the &gt; worked; I
guess I will have to figure out another way to display my dates in order to
use these Booleans.

Again Thanks.

-----Original Message-----
From: Benjamin Farrow [mailto:lovinjess@xxxxxxxxxxx]
Sent: Monday, October 06, 2003 3:08 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] xsl Greater than and Less than.


Brook,
  There doesn't appear to be anything explicit about this in XSLT 1.0, but 
in XPath 1.0 it has the following paragraph under 3.4 Booleans:

"When neither object to be compared is a node-set and the operator is <=, <,

 >= or >, then the objects are compared by converting both objects to 
numbers and comparing the numbers according to IEEE 754. The < comparison 
will be true if and only if the first number is less than the second number.

The <= comparison will be true if and only if the first number is less than 
or equal to the second number. The > comparison will be true if and only if 
the first number is greater than the second number. The >= comparison will 
be true if and only if the first number is greater than or equal to the 
second number."

This seems to be exactly as Micheal Kay described it.  Hope that helps...
Benjamin


>From: Brook Ellingwood <brook@xxxxxxxxxxx>
>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>Subject: Re: [xsl] xsl Greater than and Less than.
>Date: Mon, 06 Oct 2003 10:29:52 -0700
>
>If I can interject here, exactly how strings are compared in XSL 1.0 has
>been an area of some confusion for me. Doug Tidwell's O'Reilly book states:
>
>"If both objects are strings: Then they are equal if their Unicode
>characters are identical. For less-than and greater-than comparisons, the
>character codes are compared."
>
>I've been told by people at Microsoft that this interpretation of the spec
>is wrong but that early versions of MSXML (not sure which ones) used this
>same mistaken interpretation, but MSXML4 doesn't. At the time, I tried to
>figure it out what the spec was saying for myself, but didn't get very far
>-- I was a bit out of my element at that point. It sounds like this agrees
>with what Michael is saying.
>
>-- Brook
>
>
> > From: "Michael Kay" <mhk@xxxxxxxxx>
> > Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Date: Mon, 6 Oct 2003 16:46:31 +0100
> > To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> > Subject: RE: [xsl] xsl Greater than and Less than.
> >
> > If I decode your message correctly, you are using whatever processor
> > Microsoft Windows gives you. That's an XSLT 1.0 processor. With a 1.0
> > processor, when you compare two strings using < or > they are converted
> > to numbers, which in this case gives you NaN, and NaN<NaN is always
> > false.
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>

_________________________________________________________________
Get McAfee virus scanning and cleaning of incoming attachments.  Get Hotmail

Extra Storage!   http://join.msn.com/?PAGE=features/es


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords