Im looking for a xpath function that compares two sequences and checks if the any of the values in sequence one is contained in sequence two.
Example:
S开发者_开发百科eq1: 5, 1, 8, 0 and seq2: 9, 4, 3 should be false
Seq1: 5, 7, 8 and seq2: 0, 2, 5 should give true
XPath 2.0 has sequences and comparison of sequences with =
that does just what you ask for so doing $seq1 = $seq2
is all you need in XPath 2.0.
XPath 1.0 does not have sequences so you will need to explain in more detail how your input looks if you are asking about XPath 1.0.
http://sources.redhat.com/ml/xsl-list/2000-08/msg00355.html
eg count($set1[count(.|$set2)=count($set2)])>0
精彩评论