Some modal aspects of XPath
This paper provides several examples of how known results in modal logic can be applied to the XML document navigation language XPath. The applications concern complete axiomatizations and expressive power. XML is a standard for storage and exchange of data on the Internet. It is tailored towards hierarchically structured data, and its basic data structure is that of a (finite) sibling-ordered tree: a tree in which the children of each node are linearly ordered. XPath is a language used for retrieving elements from XML documents. As has been observed by several people, XPath is closely related to modal logic. In this paper, we illustrate the connection by showing how a number of (old and new) results on XPath fragments can be derived from known results in modal logic. These results concern axiomatizations and expressivity of XPath fragments, both of which are important topics in database theory. For instance, complete axiomatizations for XPath fragments can be understood as complete sets of rewrite rules. Identifying e! ective rules for rewriting expressions to simpler but equivalent ones is important for query optimization.