Abstract:XQuery is the recommended standard for XML Query. XQuery processing strategies can be classified into two categories: core syntax based strategy (node-oriented) and algebra based strategy (set-oriented). Neither of them can handle XQuery well. The syntax based strategy is inefficient and hard to optimize, while the current algebra based strategies can not satisfy the flexible programming characteristics of XQuery. After summarizing the current stage and unsolved problems of former algebra based works, an effective XQuery algebra system, OrientXA, is proposed in this paper, ideas from both strategies are embodied in it. OrientXA introduces the notion of Construct Pattern Tree for the first time. The Construct operator in it materializes the flexible characteristics of XQuery. Corresponding to its expressive operators, it is able to express all the queries in W3C use cases and XMark benchmark.