SPFE Documentation | Collections > SPFE Function Reference > has-content

Function: has-content

has-content(content as item()*) as xs:boolean

Description

Tests to see if an XML element has any text content.

Return value

Return type: xs:boolean

True if the element has content. False otherwise.

Source file

$SPFEOT_HOME/1.0/scripts/common/utility-functions.xsl

Parameters

content

Type: item()*

The element to be tested.

Definition

            <xsl:function name="sf:has-content" as="xs:boolean">
		               <xsl:param name="content"/>
		               <xsl:value-of select="string-join(($content/text()[normalize-space(.)] | $content/*),'') ne ''"/>
	           </xsl:function>