SPFE Documentation | Collections > SPFE Function Reference > string
Function: string
string(strings as element()*, id as item()*) as item()*
- Description
-
The string function is used to resolve strings.
- Return value
-
Return type: item()*
The string that corresponds to the string ID.
- Source file
-
$SPFEOT_HOME/1.0/scripts/common/utility-functions.xsl
Parameters
- strings
-
Type: element()*
A sequence of string elements.
- id
-
Type: item()*
The ID of the string to return.
Definition
<xsl:function name="sf:string"> <xsl:param name="strings" as="element()*"/> <xsl:param name="id"/> <xsl:if test="not($strings/*:string[@id=$id])"> <xsl:call-template name="sf:error"> <xsl:with-param name="message">String lookup failed for string ID <xsl:value-of select="$id"/>. No matching string found.</xsl:with-param> </xsl:call-template> </xsl:if> <xsl:sequence select="$strings/*:string[@id=$id]/node()"/> </xsl:function>