Issue
Need to return a substring between two strings
Resolution
xslt function
code
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:gm='http://www.griffmonster.org/xslt2/functions'
version="2.0" exclude-result-prefixes="gm">
<xsl:function name="gm:substring-between">
<xsl:param name="string"/>
<xsl:param name="start-string"/>
<xsl:param name="end-string"/>
<xsl:sequence select="substring-before(substring-after($string, $start-string),$end-string)"/>
</xsl:function>
</xsl:stylesheet>
No comments:
Post a Comment