This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Comparison operator


> >
> > <xsl:if test="./mytag[. &gt; '0']">
>
> The problem is not the operator but the fact that '0' is a string. If
> you want to compare them as numbers, remove the quotes from the zero.

Either the processor is non-conformant, or this advice is wrong.

XSLT 1.0 always converts the arguments of the "<" operator to numbers before
doing the comparison. Therefore writing 0 rather than '0' should make no
difference.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]