XML is rapidly becoming one of the most adopted standard for information representation and interchange over the Internet. With the proliferation of mobile devices of communication such as palmtop computers in recent years, there has been growing numbers of web applications that generate tremendous amount of XML data transmitted via the Internet. We therefore need to investigate an effective means to handle such ever-growing XML data in various merging activities such as aggregation, accumulation or updating, in addition to storing and querying XML data. Previously, we recognized that FDs are an important and effective means to achieve consistent XML data merging, which we restricted data consistency for leaf nodes in an XML data tree. In this paper we further extend FDs to be satisfied in an XML document by comparing subtrees in a specified context of an XML tree. Given an XML tree T and a set of FDs F defined over a set of given path expressions, called targeted functional path ...