Satisfiability-Test, Rewriting and Refinement of Users’ XPath Queries According to XML Schema Definitions

  • Jinghua Groppe
  • Sven Groppe
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4152)

Abstract

Writing correct and precise XPath queries needs much effort from users: the user must be familiar with the complex structure of the queried XML documents and has to compose queries, which must be syntactically and semantically correct and precise. Incorrect queries select no data and thus lead to highly inefficient processing of queries. Unprecise queries might select more data than what the user really wants and thus might lead to unnecessarily high processing and transportation costs. Therefore, we propose a schema-based approach to the satisfiability test and to the refinement of users’ XPath queries. Our schema-based approach checks whether or not an XPath query conforms to the constraints given in the schema, rewrites and refines the XPath query according to the information of the schema. If an XPath query does not conform to the constraints given in the schema, its results will be every time an empty node set, which is a hint for semantic errors in the XPath query. Our rewriting approach for XPath queries replaces wildcards with specific node tests, replaces recursive axes with non-recursive axes, eliminates reverse axes, and redundant location steps. Thus, our rewriting approach generates a query, which contains more information, and can be more easily refined by the user in comparison to the original query. Our performance analysis shows the optimization potential of avoiding the evaluation of unsatisfiable XPath queries and of processing rewritten and refined XPath queries.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Amer-Uahis, S., Cho, S., Laksmanan, L.K.S., Srivastava, D.: Minimization of tree pattern queries. In: SIGMOD 2001 (2001)Google Scholar
  2. 2.
    Benedikt, M., Fan, W., Geerts, F.: XPath Satisfiability in the presence of DTDs. In: PODS 2005 (2005)Google Scholar
  3. 3.
    Brown, A., Fuchs, M., Robie, J., Wadler, P.: MSL: A model for W3C XML Schema. In: Proceedings International WWW Conference, Hong-Kong (2001)Google Scholar
  4. 4.
    Chan, C.Y., Fan, W., Zeng, Y.: Taming XPath Queries by Minimizing Wildcard Steps. In: VLDB 2004 (2004)Google Scholar
  5. 5.
    Fan, W., Chan, C., Garofalakis, M.: Secure XML querying with security views. In: SIGMOD 2004 (2004)Google Scholar
  6. 6.
    Fan, W., Yu, J.X., Lu, H., Lu, J., Zeng, Y.: Query Translation from XPath to SQL in the Presence of Recursive DTDs. In: VLDB 2005 (2005)Google Scholar
  7. 7.
    Franceschet, M.: XPathMark – An XPath benchmark for XMark. Research report PP-2005-04, University of Amsterdam, the Netherlands (2005)Google Scholar
  8. 8.
    Groppe, S.: XML Query Reformulation for XPath, XSLT and XQuery. Sierke-Verlag, Göttingen, Germany (2005) ISBN 3-933893-24-0Google Scholar
  9. 9.
    Groppe, J., Groppe, S.: A Prototype of a Schema-Based XPath Satisfiability Tester. In: Bressan, S., Küng, J., Wagner, R. (eds.) DEXA 2006. LNCS, vol. 4080, pp. 93–103. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Groppe, J., Groppe, S.: Filtering Unsatisfiabile XPath Queries. In: ICEIS 2006 (2006)Google Scholar
  11. 11.
    Groppe, S., Böttcher, S., Groppe, J.: XPath Query Simplification with regard to the Elimination of Intersect and Except Operators. In: XSDM 2006 (2006)Google Scholar
  12. 12.
    Hidders, J.: Satisfiability of xPath expressions. In: Lausen, G., Suciu, D. (eds.) DBPL 2003. LNCS, vol. 2921, pp. 21–36. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Kwong, A., Gertz, M.: Schema-based optimization of XPath expressions. Techn. Report University of California (2002)Google Scholar
  14. 14.
    Lakshmanan, L., Ramesh, G., Wang, H., Zhao, Z.: On Testing Satisfiability of Tree Pattern Queries. In: VLDB 2004 (2004)Google Scholar
  15. 15.
    Martens, W., Neven, F.: Fronties of tractability for typechecking simple XML transformations. In: VLDB 2004 (2004)Google Scholar
  16. 16.
    Olteanu, D., Meuss, H., Furche, T., Bry, F.: XPath: Looking Forward. XML-Based Data Management (XMLDM), EDBT Workshops (2002)Google Scholar
  17. 17.
    Ramanan, P.: Efficient algorithms for minimizing tree pattern queries. In: SIGMOD 2002 (2002)Google Scholar
  18. 18.
    Schmidt, D.A.: The structure of Typed programming languages. MIT Press, Cambridge (1994)MATHGoogle Scholar
  19. 19.
    Wadler, P.: Two semantics for XPath. Tech. Report (2000)Google Scholar
  20. 20.
    Wood, P.T.: Minimising Simple XPath Expressions. In: WebDB 2001 (2001)Google Scholar
  21. 21.
    W3C: XML Schema Part 1: Structures Second Edition. W3C Recommendation (2004), www.w3.org/TR/xmlschema-1
  22. 22.
    W3C: XPath Version 1.0, W3C Recommendation (1999), www.w3.org/TR/xpath/
  23. 23.
    W3C: XPath Version 2.0, W3C Working Draft (2003), www.w3.org/TR/xpath20/

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Jinghua Groppe
    • 1
  • Sven Groppe
    • 1
  1. 1.University of InnsbruckInnsbruckAustria

Personalised recommendations