Related Work
Fuzzy logic plays also a key role in information retrieval and the need for providing fuzzy/flexible mechanisms to XML querying has recently motivated the investigation of extensions of the XPath language.
We can distinguish those in which the main goal is the introduction of fuzzy information in data (similarity, proximity, vagueness, etc) [BDW06,BDHH06,GA06,YML09,OP08,OP10] and the proposals in which the main goal is the handling of crisp information by fuzzy concepts [CDG+09,DMP07,FFP09,FFF10,LAAE06,DMP08]. Our work focuses on the second line of research.
The most relevant works are [CDG+09,DMP07] in which authors introduce in XPath flexible matching by means of fuzzy constraints called close and similar for node content, together with below and near for path structure. In addition, they have studied the deep-similar notion for tree matching, and fuzzy boolean operators not, and and or. In order to provide ranked answers they adopt a fuzzy set based approach in which each answer has an associated numeric value (the membership degree). The numeric value represents the rsv of the associated item.
In spite of that XML and XPath are extensively used in many applications, the debugging of XPath has not been explored enough in the literature. Some authors have explored this topic in [ACGS12], where the functional logic language TOY has been used for debugging XPath expressions. There the debugger is able to assist the programmer when a tag is wrong, providing alternative tags, and to trace executions. The current work can be considered as an extension of the quoted work. Here, the debugging gives to programmers a change degree for each tag alternative, and annotates XPath expressions in the points in which the error was found.
In [FFP09], the authors propose to give a satisfaction degree to XPath expressions based on associating weights to XPath steps. Relaxing XPath expressions when the path does not match the XML schema is the main goal of this work. They have studied how to compute the best k answers. In this line, in [FFF10,FF+11] XPath relaxation is studied given some rules for query rewriting: axis relaxation, step deletion and step cloning, among others. The proposed deep-similar notion of [CDG+09,DMP07] can be also considered a relaxation technique of XML tree equality.
Our proposal is based on the previous works in the sense that XPath expressions are relaxed in order to match XML documents. Matching also includes similar words. We have incorporated a chance degree to alternative XPath expressions in order to measure how close is the proposed XPath expression to the initial one.