HOME COMMUNITY BLOG
Skip to end of metadata
Go to start of metadata

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

valueThe value to return if expression is NULL

EXAMPLE

 

SourceResult
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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="AS date">
    <xsl:template match="/">
        <ROOT>
            <xsl:value-of select="AS:isnull('twenty', '20')"/>
        </ROOT>
    </xsl:template>
</xsl:stylesheet>

 

 

 

 

  • No labels