Context-Preserving XQuery Fusion

  • Hiroyuki Kato
  • Soichiro Hidaka
  • Zhenjiang Hu
  • Keisuke Nakano
  • Yasunori Ishihara
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6461)


XQuery is a DBPL for querying XML databases. The semantics of XQuery is context sensitive and requires preservation of document order. In this paper, we propose, as far as we are aware, the first XQuery fusion that can deal with both the document order and the context of XQuery expressions. More specifically, we carefully design a context representation of XQuery expressions based on the Dewey order encoding, develop a context-preserving XQuery fusion for ordered trees by static emulation of the XML store, and prove that our fusion is correct. Our XQuery fusion has been implemented, and all the examples in this paper have passed the system.


Fusion Rule Sequence Expression Element Construction Path Expression Element Constructor 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Amano, S., Libkin, L., Murlak, F.: XML Schema Mappings. In: PODS, pp. 33–42 (2009)Google Scholar
  2. 2.
    Chin, W.: Safe Fusion of Functional Expressions. In: Proc. Conference on Lisp and Functional Programming, San Francisco, California, pp. 11–20 (June 1992)Google Scholar
  3. 3.
    Daniels, S., Graefe, G., Keller, T., Maier, D., Schmidt, D., Vance, B.: Query optimization in revelation, an overview. Data Eng. 14(2), 58–62 (1991)Google Scholar
  4. 4.
    Deutsch, A., Papakonstantinou, Y., Xu, Y.: The NEXT Framework for Logical XQuery Opimization. In: Proc. of VLDB, pp. 168–179 (2004)Google Scholar
  5. 5.
    Fegaras, L., Maier, D.: Optimizing object queries using an effective calculus. ACM Trans. Database Syst. 25(4), 457–516 (2000)CrossRefMATHGoogle Scholar
  6. 6.
    Fernamdez, M., Hidders, J., Michiels, P., Simeon, J., Vercammen, R.: Optimizing sorting and duplicate elimination in XQuery path expressions. In: Andersen, K.V., Debenham, J., Wagner, R. (eds.) DEXA 2005. LNCS, vol. 3588, pp. 554–563. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    Gill, A., Launchbury, J., Jones, S.L.P.: A short cut to deforestation. In: FPCA 1993: Proceedings of the conference on Functional programming languages and computer architecture, pp. 223–232. ACM Press, New York (1993)CrossRefGoogle Scholar
  8. 8.
    Gottlob, G., Koch, C., Pichler, R.: Efficient Algorithms for Processing XPath Queries. ACM TODS (June 2005)Google Scholar
  9. 9.
    Grust, T., Mayr, M., Rittinger, J.: Let SQL drive the XQuery workhorse (XQuery join graph isolation). In: EDBT, pp. 147–158 (2010)Google Scholar
  10. 10.
    Grust, T., Sakr, S., Teubner, J.: XQuery on SQL Hosts. In: VLDB, pp. 252–263 (2004)Google Scholar
  11. 11.
    Gueni, B., Abdessalem, T., Cautis, B., Waller, E.: Pruning Nested XQuery Queries. In: CIKM 1992, pp. 541–550 (2008)Google Scholar
  12. 12.
    Hidders, J., Paredaens, J., Vercammen, R., Demeyer, S.: A Light but Formal Introduction to XQuery. In: Bellahsène, Z., Milo, T., Rys, M., Suciu, D., Unland, R. (eds.) XSym 2004. LNCS, vol. 3186, pp. 5–20. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Kato, H., Hidaka, S., Hu, Z., Nakano, K., Ishihara, Y.: Context-Preserving XQuery Fusion. Technical Report GRACE-TR-2010-07, GRACE Center, National Institute of Informatics (September 2010)Google Scholar
  14. 14.
    Koch, C.: On the role of composition in XQuery. In: Proceedings of Eighth International Workshop on the Web and Databases, WebDB 2005 (2005)Google Scholar
  15. 15.
    Lu, J., Ling, T.W., Chan, C.-Y., Chen, T.: From Region Encoding To Extended Dewey: On Efficient Processing of XML Twig pattern Matching. In: Proc. of VLDB (2005)Google Scholar
  16. 16.
    Ohori, A.: Representing object identity in a pure functional language. In: Kanellakis, P.C., Abiteboul, S. (eds.) ICDT 1990. LNCS, vol. 470, pp. 41–55. Springer, Heidelberg (1990)Google Scholar
  17. 17.
    Ohori, A., Sasano, I.: Lightweight fusion by fixed point promotion. SIGPLAN Not. 42(1), 143–154 (2007)CrossRefMATHGoogle Scholar
  18. 18.
    Page, W.L., Hidders, J., Michiels, P., Paredaens, J., Vercammen, R.: On the expressive power of node construction in XQuery. In: Proceedings of Eighth International Workshop on the Web and Databases, WebDB 2005 (2005)Google Scholar
  19. 19.
    Parys, P.: XPath evaluation in linear time with polynomial combined complexity. In: Paredaens, J., Su, J. (eds.) PODS, pp. 55–64. ACM, New York (2009)CrossRefGoogle Scholar
  20. 20.
    Tatarinov, I., Halevy, A.: Efficient Query Reformulation in Peer Data Management Systems. In: Proceedings of the ACM International Conference on Management of Data, pp. 539–550 (2004)Google Scholar
  21. 21.
    Tatarinov, I., Viglas, S.D., Beyer, K., Shanmugasundaram, J., Shekita, E., Zhang, C.: Storing and Querying Ordered XML Using a Relational Database System. In: Proc. of SIGMOD (2002)Google Scholar
  22. 22.
    Wadler, P.: Deforestation: Transforming programs to eliminate trees. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, pp. 344–358. Springer, Heidelberg (1988)CrossRefGoogle Scholar
  23. 23.
    World Wide Web Consortium. XQuery1.0 : An XML Query Language, W3C Recommendation (January 2007)Google Scholar
  24. 24.
    World Wide Web Consortium. XQuery1.0 and XPath2.0 Formal Semantics, W3C Recommendation (January 2007)Google Scholar
  25. 25.
    Xu, L., Ling, T.W., Wu, H., Bao, Z.: DDE: From Dewey to a Fully Dynamic XML Labeling Scheme. In: SIGMOD Conference, pp. 719–730 (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Hiroyuki Kato
    • 1
  • Soichiro Hidaka
    • 1
  • Zhenjiang Hu
    • 1
  • Keisuke Nakano
    • 2
  • Yasunori Ishihara
    • 3
  1. 1.National Institute of InformaticsJapan
  2. 2.The University of Electro-CommunicationsJapan
  3. 3.Osaka UniversityJapan

Personalised recommendations