I want to take the values if the variable I define are not equal to a particular strings. In here I want to take the values of variables ‘name’ , ‘address’ , and ‘city’ seperated by “-” if they are not equal to ‘Tom’, ‘Street’, and ‘CityStreet’ respectively. Is that possible?
xsl:attribute name='person'>
<xsl:value-of separator="-" select=
"($name, $address,
$city)" />
</xsl:attribute>
You could use a predicate on your variables:
or this if you don’t want an empty attribute: