UnionExpr

Combine node sequences.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

UnionExpr

graphics/UnionExpr.png

Expr Expr

Description

A UnionExpr combines two node sequences by returning a sequence in document order with all the nodes that occur in either of both sequences. Duplicate nodes from the result sequences based on node identity are eliminated.

You can use one of the operands union and |: the effect is the same.

Examples

  • The following query returns the sequence (<A/>, <B/>)

    <A/> union <B/>
  • The following query returns the sequence (<B/>, <B/>), since the element constructors create two element nodes with the same name, but different identity:

    <B/> union <B/>