<!--
Nick's web site: XSLT helper functions.
- Copyright © 2019-2021 Nick Bowler
+ Copyright © 2019-2022 Nick Bowler
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
</func:result>
</func:function>
+<!--
+ f:contains-token(list, token)
+ Returns true iff the space-separated list contains the given token
+-->
+<func:function name='f:contains-token'>
+ <xsl:param name='haystack' />
+ <xsl:param name='needle' />
+
+ <func:result select='contains(
+ concat(" ", normalize-space($haystack), " "),
+ concat(" ", normalize-space($needle), " ")
+ )' />
+</func:function>
+
</xsl:stylesheet>