Skip to main content
Log in

HCH for Checking Containment of XPath Fragment

  • Regular Paper
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

XPath is ubiquitous in XML applications for navigating XML trees and selecting a set of element nodes. In XPath query processing, one of the most important issues is how to efficiently check containment relationship between two XPath expressions. To get out of the intricacy and complexity caused by numerous XPath features, we investigate this issue on a frequently used fragment of XPath expressions that consists of node tests, the child axis (/), the descendant axis (//), branches ([]) and label wildcards (*). Prior work has shown that homomorphism technology can be used for containment checking. However, homomorphism is the sufficient but not necessary condition for containment. For special classes of this fragment, the homomorphism algorithm returns false negatives. To address this problem, this paper proposes two containment techniques, conditioned homomorphism and hidden conditioned homomorphism, and then presents sound algorithms for checking containment. Experimental results confirm the practicability and efficiency of the proposed algorithms.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. James Clark, Steve DeRose. XML path language (XPath), version 1.0. W3C Recommendation, http://www.w3.org/TR/xpath.

  2. Scott Boag, Don Chamberlin et al. XQuery 1.0: An XML query language. W3C Candidate Recommendation. http://www.w3.org/TR/xquery.

  3. Steven DeRose, Eve Maler et al. XML linking language (XLink), version 1.0. W3C Recommendation, http://www.w3.org/TR/xlink.

  4. Steven DeRose, Ron Daniel Jr. et al. XML pointer language (XPointer). W3C Working draft, http://www. w3.org/TR/xptr.

  5. James Clark. XSL transformations (XSLT), version 1.0. W3C Recommendation, http://www.w3.org/TR/xslt.

  6. Gerome Miklau, Dan Suciu. Containment and equivalence for a fragment of XPath. Journal of the ACM, 2004, 51(1): 2–45.

    Article  Google Scholar 

  7. Thomas Schwentick. XPath query containment. ACM SIGMOD Record, 2004, 33(1): 101–109.

    Article  Google Scholar 

  8. Ashok K Chandra, Philip M Merlin. Optimal implementation of conjunctive queries in relational data bases. In Proc. the 9th ACM Symposium on Theory of Computing, Boulder, Colorado, USA, May 4–4, 1977, pp.77–90.

  9. Peter Buneman, Susan Davidson et al. Reasoning about keys for XML. In Proc.the 8th Int. Workshop on Database Programming Languages (DBPL), Kinloch Rannoch, Scotland, Sept. 1–3, 1999, pp.133–148.

  10. Tova Milo, Dan Suciu T. Index structures for path expressions. In Proc. the 7th Int. Conference on Database Theory (ICDT), Jerusalem, Israel, Jan. 10–12, 1999, pp.277–295.

  11. Peter T Wood. Minimizing simple xpath expressions. In Proc. the 4th Int. Workshop on the Web and Databases (WebDB), Santa Barbara, California, USA, May 24–25, 2001, pp.13–18.

  12. Sihem Amer-Yahia, SungRan Cho et al. Minimization of tree pattern queries. In Proc. the ACM SIGMOD Conf. Management of Data, Santa Barbara, California, USA, May 21–24, 2001, pp.497–508.

  13. Oded Shmueli. Equivalence of datalog queries is undecidable. The Journal of Logic Programming, 1993, 15(3): 231–242.

    Article  MATH  Google Scholar 

  14. Peter T Wood. On the equivalence of XML patterns. In Proc. the First Int. Conference on Computational Logic (CL), London, UK, July 24–28, 2000, pp.1152–1166.

  15. Frank Neven, Thomas Schwentick. XPath containment in the presence of disjunction, DTDs, and variables. In Proc. the 9th Int. Conf. Database Theory (ICDT), Siena, Italy, Jan. 8–10, 2003, pp.315–329.

  16. Daniela Florescu, Alon Levy et al. Query containment for conjunctive queries with regular expressions. In Proc. the 17th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), Seattle, Washington, USA, June 1–3, 1998, pp.139–148.

  17. Diego Calvanese, Giuseppe De Giacomo et al. View-based query answering and query containment over semistructured data. In Proc. the 8th Int. Workshop on Database Programming Languages (DBPL), Frascati, Italy, Sept. 8–10, 2001, pp.40–61.

  18. Sihem Amer-Yahia, SungRan Cho et al. Tree pattern query minimization. The VLDB Journal, 2002, 11(4): 315–331.

    Article  MATH  Google Scholar 

  19. Frank Neven. Automata theory for XML researchers. ACM SIGMOD Record, 2002, 31(3): 39–46.

    Article  Google Scholar 

  20. Peter T Wood. Containment for XPath fragments under DTD constraints. In Proc. the 9th Int. Conference on Database Theory (ICDT), Siena, Italy, Jan. 8–10, 2003, pp.300–314.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jian-Hua Feng.

Additional information

This work is in part supported by the National Natural Science Foundation of China under Grant No. 60573094, the National Grand Fundamental Research 973 Program of China under Grant No. 2006CB303103, the National High Technology Development 863 Program of China under Grant No. 2006AA01A101, and Tsinghua Basic Research Foundation under Grant No. JCqn2005022.

Electronic supplementary material

Rights and permissions

Reprints and permissions

About this article

Cite this article

Feng, JH., Liao, YG. & Zhang, Y. HCH for Checking Containment of XPath Fragment. J Comput Sci Technol 22, 736–748 (2007). https://doi.org/10.1007/s11390-007-9080-0

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11390-007-9080-0

Keywords

Navigation