> I am trying to install Xalan-C on a Linux RedHat platform and get weird behaviour > of the supplied binaries. testXSLT does not translate the string compare functionality > correctly, i.e. > > <xsl:if test="$a >= $b"> > do something... > </xsl:if> > > seems to return ALWAYS true, no matter which strings are contained in $a or $b.
You might be misunderstanding how XPath works. XPath _never_ does string comparisons with the following operators: < <= > >= These operators _always_ convert their arguments to numbers before comparing. If either of the arguments is a nodeset, then the rules get even more complicated. If the string values are not numbers as defined lexically by XPath, then they are converted to NaN. Once that happens, none of the relational operators, including = and !=, will work as you might expect them to -- NaN compared to anything else, even NaN will always be false. You should get a good book on XSLT, or read the XPath recommendation very carefully to make sure you understand how these operators work. The _never_ do string collation. In fact, there is no way in XPath 1.0 to collate strings. If you still feel that Xalan is in error, then create a _minimal_ sample xml file and stylesheet which reproduces the bug, and post a bug in Bugzilla. > Trying to rebuild Xalan, my compiler always _hangs_ on the file > XMLSupport/FormatterToHTML.cpp. > > I am using gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81). The "hanging" in FormatterToHTML.cpp is due to gcc's broken optimizer. You might try disabling optimization for that file, or increase the amount of memory you allocate to your process. Dave
