In php we do sth like:
$values =explode(',',"A,B,C,D");
if(in_array($value,$values)){
// Do sthing
}
How can we do similar thing in XSLT . I need to select All nodes from xml file which has attributes @x in $commaSepartedString ,which is provided as parameter from command line
<xsl:for-each select="table[@name in $commaSeparatedString]">
</xsl:for-each>
Edits
optionally I want to include all nodes by setting default value to parameter e.g
<xsl:param name="commaSeparatedString" select="'*'"/>
so a regx like thing seems more suitable
thanks
With XSLT 2.0 use: