Suppose that we have a DTD D and XML documents valid against D, and consider writing an XPath query to the documents. Unfortunately, a user often does not understand the entire structure of D exactly, especially in the case where D is very large and/or complex or D has been updated but the user misses it. In such cases, the user tends to write an incorrect XPath query q. However, it is difficult for the user to correct q by hand due to his/her lack of exact knowledge about the entire structure of D. In this paper, we propose an algorithm that finds, for an XPath query q, a DTD D, and a positive integer K, "top-K" XPath queries "most similar" to q among the XPath queries conforming to D so that a user select an appropriate query among the K queries. We also present some experimental studies.
展开▼