The AS:isnull function returns a specified value if the expression is NULL. If the expression is NOT NULL, this function returns the expression.
NAMESPACE
xmlns:AS="http://schema.advantages.cz/AsapFunctions"
SYNTAX
Xml isnull( string expression, string value) |
PARAMETERS
Name | Description |
---|---|
expression | The expression to test whether is NULL |
value | The value to return if expression is NULL |
EXAMPLE
Source | Result |
---|---|
AS:isnull('twenty', '20') | twenty |
AS:isnull('', '20') | 20 |
AS:isnull(NULL, '20') | 20 |
Stylesheet
1 2 3 4 5 6 7 8 9 10 | <? xml version = "1.0" encoding = "UTF-8" ?> < xsl:template match = "/" > < ROOT > < xsl:value-of select = "AS:isnull('twenty', '20')" /> </ ROOT > </ xsl:template > </ xsl:stylesheet > |