This basically includes two checks :
1. Element not present / existing.
2. Element existing and not empty.
Solution 1:
<xsl:if test="not(ns1:VisitElement/ns1:visitSequence) or
string-length(ns1:VisitElement/ns1:visitSequence)=0">
<xsl:value-of select="string('HELLO')"/>
</xsl:if>
Explanation : In the above example visitSequence is checked for no existence (or) if it exists if its length is zero. In this case we are replacing the value with string called "
HELLO"
Another way for doing the same is as below :
Solution 2:
<xsl:if test="not(ns1:VisitElement/ns1:visitSequence) or
ns1:VisitElement/ns1:visitSequence[.!='']">
<xsl:value-of select="string('HELLO')"/>
</xsl:if>
The expression [.!=''] means that the current node (represented by dot) is not equal(!=) to an empty string('').
Oracle apps and Fusion Self Paced Training Videos by Industry Experts. Please visit https://oracleappsfusion.teachable.com
ReplyDelete