I've got an XML in this vein:
<style name='Danger'/>
<style name='Danger_2'/>
<style name='Danger_3'/>
<style name='Warning'/>
<style name='Warning_2'/>
<style name='Warning_3'/>
<style name='Body'/>
I'm trying to process all styles whose name contains "Danger" or "Warning". Naive approach that doesn't work:
<xsl:template match="style[contains(@name, 'Danger|Warning')]">
I'm aware you can do this in XSLT 2.0 with exact matches:
"style[@name=('Danger','Warning')]"
Is there a solution for 'contains' matches?
This related question has an interesting solution: 'Use a pipe (or other appropriate character) delimited string', but despite the use of 'contains' that only works for exact matches (so it'll match 'Danger' but not 'Danger_1').