User GuideReference ManualIntegration Scenarios
 

2.4.1. Creating XSLT Functions

See: Managing Channels - Advanced Channel Functions

Create XSL function

To create your own XSL function you need to do the following

Write the functions in XSL file like this sample

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bfn="http://xmlns.babelway.com/2007/function"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:common="http://exslt.org/common"
xmlns:math="http://exslt.org/math"
xmlns:sets="http://exslt.org/sets"
xmlns:dates-and-times="http://exslt.org/dates-and-times"
xmlns:random="http://exslt.org/random"
xmlns:saxon="http://saxon.sf.net/"
>

<xsl:function name="bfn:xml-parse" >
<xsl:param name="xmlString"/>
<xsl:sequence select="saxon:parse($xmlString)"/>
</xsl:function>

</xsl:stylesheet>

Upload the created Xsl file on the File Property Name in Advanced Properties, then add the file name to the comma separated list of included xsl files contained in the StringProperty XsltIncludeFileList