Standards like XML schema and XPath play a central role in distributed XML data processing. XPath query optimization can benefit from a tester that checks whether the intersection of data fragments described by two XPath expressions is empty for all valid database states. In this paper, we contribute a fast but incomplete intersection test for XPath expressions that reflects type constraints like sub-types and extensions defined in XML schema. The key idea is to transform the XML schema types into a hierarchy of constraints, and to translate these constraints into an automaton representing all the XML document paths that are valid according to this XML schema. Finally, the intersection test can be reduced to a search in these automata.
展开▼