XSLT: Test if string is contained in a sequence -
i have 2 sequences of strings. wanna wether sequence reduced items, in sequence 2; or compare 2 sequences , information, if @ least 1 item of sequence 1 in sequence 2. simple compare ( $seq1 = $seq2 ) works me sequence of numbers, or doing wrong?
glad help! :)
the =
operator should suffice, see example http://xsltransform.net/gwmuij6 does
<xsl:variable name="seq1" select="'foo', 'bar', 'foobar'"/> <xsl:variable name="seq2" select="'a', 'foo', 'b'"/> <xsl:variable name="seq3" select="'a', 'b', 'c'"/> <xsl:value-of select="$seq1 = $seq2, $seq1 = $seq3"/>
and outputs true false
.
if want value based intersection see http://www.xsltfunctions.com/xsl/functx_value-intersect.html.
Comments
Post a Comment