SPFE Documentation | Collections > SPFE Function Reference > conditions-met
Function: conditions-met
conditions-met(conditions as item()*, condition-tokens as item()*) as xs:boolean
- Description
-
The conditions-met function is used to determine if a conditional element meets the conditions applied to the build.
- Return value
-
Return type: xs:boolean
The return value is a boolean with true indicating that the conditions were met and fasle that the conditions were not met.
- Source file
-
$SPFEOT_HOME/1.0/scripts/common/utility-functions.xsl
Parameters
- conditions
-
Type: item()*
The list of conditions applied to the element.
- condition-tokens
-
Type: item()*
The list of condition tokens applied to the build.
Definition
<xsl:function name="sf:conditions-met" as="xs:boolean"> <xsl:param name="conditions"/> <xsl:param name="condition-tokens"/> <xsl:variable name="tokens-list" select="tokenize($condition-tokens, '\s+')"/> <xsl:variable name="conditions-list" select="tokenize($conditions, '\s+')"/> <xsl:choose > <xsl:when test="not($conditions)"> <xsl:value-of select="true()"/> </xsl:when> <xsl:otherwise > <xsl:value-of select="sf:satisfies-condition($conditions-list, $tokens-list)"/> </xsl:otherwise> </xsl:choose> </xsl:function>