Hi,
We have recently upgraded our application from java 1.4 to java 1.5.
There is an XSL file for HTML conversion which is acting differently in
the java upgraded version.
On a dry run we found the value of variable ($value) is null. The
matrix below explains different test scenarios in which we ran the test
changing java version and replacing not($value) with $value=''.
Java Version Syntax Used
Test Result
------------------------------------------------------------------------
------------------------------------------
1.4 <xsl:when test="not($value) and
position() = 1">YES</xsl:when> True
1.4 <xsl:when test="$value = '' and
position() = 1">YES</xsl:when> False
1.5 <xsl:when test="not($value) and
position() = 1">YES</xsl:when> False
1.5 <xsl:when test="$value = '' and
position() = 1">YES</xsl:when> True
The first test case is what the xsl originally looked like. The same
test fails in java 1.5 environment. Interestingly changing the not()
function with operator = (see test# 4), the xsl works fine.
We have a couple of questions for this behavior:
* Is the change in behavior due to upgrading the java environment
or we are missing something else?
* Is there a difference in how a null and an empty string('') are
interpreted in java 1.4 and java 1.5?
* Are the semantics of the statements we are using for not() and
the = operator equivalent?
* Does XSL distinguish between null value and an empty string
('')?
Thanks in advance for all your help.
Regards
Rohit
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--