Conditional mapping - checking for Null value
Does anyone know how to check for a null value in an xsl:if test="" construct. I need to map a value into a concatenation function, but only if a value is passed. So far I have the following but it doesn't work:
<xsl:if test="/client:icmsFetchSearchCriteria21/client:searchCriteriaId">
<xsdLocal1:CustomObject1Id>
<xsl:value-of select="concat("='",/client:icmsFetchSearchCriteria21/client:searchCriteriaId,"'")"/>
</xsdLocal1:CustomObject1Id>
</xsl:if>
What happens is that when the searchCriteriaId is not passed a value, the mapping ends up as =''.