XSLT filter results
I have an attribute: <names>Dan,John,Matin,Lewis</names>
Can you create a filter [names='Dan']
and get XSLT to filter based on a list of values ββin <names>
??
+1
CLiown
source
to share
2 answers
To avoid overlapping nodes containing "Danny":
<xsl:apply-templates select="names[
contains( concat(',' text(), ','), ',Dan,' )
]" />
+3
Tomalak
source
to share
Could you post your XML data? Basically you will need to do something like:
<xsl:template match="names[contains(.,'Dan')]">
// do something
</xsl:template>
0
James goodwin
source
to share