I want to be able to translate and XML item to remove spaces & any special character and transform upper case characters to lower case and I'm getting a little stuck to say the least!
Ideally I'd like a way to catch all of the special characters to rip them out, rather than specifying them individually. I've read some answers on whitelisting but not sure how I can achieve it here. The other thing to point out is that I can only use XSLT 1.0.
Thanks in advance! :)
Here is what I have so far:
<xsl:template match="faq">
<article>
<xsl:call-template name="questionMatch"/>
</article>
</xsl:template>
<xsl:template name="questionMatch" match="section">
<xsl:for-each select="section">
<xsl:for-each select="qa">
<div class="toggler" id="{translate(translate(translate(question,'?!£$%^*',''), ' ', ''), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')}">
</div>
</xsl:for-each>
</xsl:for-each>
</xsl:template>