functx:value-intersect

The intersection of two sequences of values

Description

The functx:value-intersect function returns the intersection of the values in two sequences (values that appear in both sequences) in an implementation-defined order. It removes duplicates. This function is useful because the built-in intersect operator only works on nodes, not atomic values.

Parameters

Description

arg1:string()

the first sequence

arg2:string()

the second sequence

Examples

XPath

Results

functx:value-intersect((1,2),(2,3))

2

functx:value-intersect((1,2,3),(2,3,4))

(2, 3)

functx:value-intersect((1,2,2,3),(2,3))

(2, 3)

functx:value-intersect((1,2,2,3),())

()

See Also