Java Questions
Java Questions

Reputation: 7953

how to test whether the value is zero in xslt 1.0

i have the following condition in my xslt 1.0

<xsl:when test="string-length(//Record/CIMtrek_CI_OPEX_200910_FrDiv/text()) != 0" ></xsl:when

but this condition is executed even if the value of CIMtrek_CI_OPEX_200910_FrDiv is 0,

i dont want this condition to be executed when the value of CIMtrek_CI_OPEX_200910_FrDiv is 0

how to do this in xslt 1.0

Please help me to get this done.

Best Regards

Upvotes: 2

Views: 977

Answers (1)

Dimitre Novatchev
Dimitre Novatchev

Reputation: 243449

Use:

test="translate(//Record/CIMtrek_CI_OPEX_200910_FrDiv, '0', '')"

Upvotes: 2

Related Questions