SPFE Documentation | Collections > SPFE Function Reference > fixup-url

Function: fixup-url

fixup-url(url as item()*) as item()*

Description

Return value

Return type: item()*

Source file

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

Parameters

url

Type: item()*

Definition

            <xsl:function name="sf:fixup-url">
		               <xsl:param name="url"/>
		               <xsl:choose >
			                   <xsl:when test="matches($url, '^\w+://')">
				                       <xsl:value-of select="$url"/>
			                   </xsl:when>
			                   <xsl:otherwise >
				                       <xsl:value-of select="concat('http://',$url)"/>
			                   </xsl:otherwise>
		               </xsl:choose>
	           </xsl:function>