Tree patterns represent important fragments of XPath. In this paper, we show that some classes C of tree patterns exhibit such a property that, given a finite number of compatible tree patterns P 1 , . . . , P n ∈ C, there exists another pattern P such that P 1 , . . . , P n are all contained in P, and for any tree pattern Q ∈ C, P 1 , . . . , P n are all contained in Q if and only if P is contained in Q. We experimentally demonstrate that the pattern P is usually much smaller than P 1 , . . . , P n combined together. Using the existence of P above, we show that testing whether a tree pattern, P, is contained in another, Q ∈ C, under an acyclic schema graph G, can be reduced to testing whether P G , a transformed version of P, is contained in Q without any schema graph, provided that the distinguished node of P is not labeled *. We then show that, under G, the maximal contained rewriting (MCR) of a tree pattern Q using a view V can be found by finding the MCR of Q using V G without G, when there are no *-nodes on the distinguished path of V and no *-nodes in Q.