Patent ID: 7467157

Claim:
A method for automatically generating semantically valid XPath expressions in a computer system, comprising: populating an instance of a sequence-type model by organizing eXtensible Markup Language (XML) data into a hierarchical structure consistent with the sequence-type model; priming the instance of the sequence-type model to remove ambiguities and redundancies, while retaining semantic validity of the instance of the sequence-type model; scanning the instance of the sequence-type model to identify one or more location paths that match a search pattern, wherein an initial scan originates at a root of the hierarchical structure and subsequent scans originate from a termination point of a prior scan to incrementally search for location steps by searching along XPath axes; determining whether a sequence type at each location step matches the search pattern to form scan results; cumulating and categorizing the scan results to yield a set of location paths that are semantically valid XPath expressions, wherein the XPath expressions provide tests of functionality of an XPath evaluation engine, including one that is embedded in an XQuery and index evaluation engine, ensuring a shared sequence-type model between generators for XPath and XML data, and concurrent stress testing of the evaluation engines; and outputting the scan results as semantically valid XPath expression output.