A Graph-Based Approach to Transform XML Documents

  • Gabriele Taentzer
  • Giovanni Toffetti Carughi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3922)


As XML diffusion keeps increasing, it is today common practice for most developers to deal with XML parsing and transformation. XML is used as format to e.g. render data, query documents, deal with Web services, generate code from a model or perform model transformation. Nowadays XSLT is the most common language for XML transformation. But, although meant to be simple, coding in XSLT can become quite a challenge, if the coding approach does not only depend on the structure of the source document, but the order of template application is also dictated by target document structure. This is the case especially when dealing with transformations between visual models. We propose to use a graph-based approach to simplify the transformation definition process where graphs representing documents are transformed in a rule-based manner, as in XSLT. The differences to XSLT are mainly that rules can be developed visually, are more abstract (since the order of execution does not depend on the target document), IDREFs are dealt with much more naturally, and due to typed transformations, the output document is guaranteed to be valid with respect to the target schema. Moreover, graph-based transformation definitions can be automatically reversed in most cases. This is especially useful in model transformation (e.g. in OMG’s MDA approach).


Graph Transformation Type Graph Graph Grammar Target Document XPATH Expression 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
  2. 2.
    Baresi, L., Quintarelli, E.: Graph transformation to infer schemata from XML documents. In: Proceedings of the 2005 ACM symposium on Applied computing, pp. 642–646. ACM Press, New York (2005)CrossRefGoogle Scholar
  3. 3.
    Bezivin, J., Bruneliere, H., Jouault, F., Kurtev, I.: Model Engineering Support for Tool Interoperability. In: Proceedings of 4th Workshop in Software Model Engineering at 8th Int. Conf. on Model Driven Engineering Languages and Systems (2005)Google Scholar
  4. 4.
    Braga, D., Campi, A., Ceri, S.: XQBE (XQuery by Example): a visual interface to the standard XML query language. ACM Transaction On Database Systems TODS (June 2005)Google Scholar
  5. 5.
    Ceri, S., Comai, S., Damiani, E., Fraternali, P., Paraboschi, S., Tanca, L.: XML-GL: A Graphical Language for Querying and Reshaping XML Documents. In: Proc. of the Int. World Wide Web Conference, Canada (1999)Google Scholar
  6. 6.
    Bardohl, R., Ehrig, H., de Lara, J., Taentzer, G.: Integrating Meta Modelling Aspects with Graph Transformation for Efficient Visual Language Definition and Model Manipulation. In: Wermelinger, M., Margaria-Steffen, T. (eds.) FASE 2004. LNCS, vol. 2984, pp. 214–228. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Ehrig, H., Prange, U., Taentzer, G.: Fundamental Theory for Typed Attributed Graph Transformation. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 161–177. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  8. 8.
    Erwig, M.: Xing: A Visual XML Query Language. Journal of Visual Languages and Computing 14(1), 5–45 (2003)CrossRefGoogle Scholar
  9. 9.
    Novatchev, D.: The Functional Programming Language XSLT - A proof through examples (November 2001), http://www.topxml.com/xsl/articles/fp/
  10. 10.
    Pietriga, E., Vion-Dury, J., Quint, V.: VXT: a visual approach to XML transformations. In: Proceedings of the 2001 ACM Symposium on Document engineering, pp. 1–10. ACM Press, New York (2001)Google Scholar
  11. 11.
  12. 12.
    Query/View/Transformation. QVT-Merge Group, version 2.0 (2005-03-02) (2005), http://www.omg.org/cgi-bin/apps/doc?ad/05-03-02.pdf
  13. 13.
  14. 14.
  15. 15.
  16. 16.
  17. 17.
  18. 18.
  19. 19.
    Walker, D., Petitpierre, D., Armstrong, S.: XMLTrans: a Java-based XML transformation language for structured data. In: Proceedings of the 18th conference on Computational linguistics, vol. 2, pp. 1136–1140 (2000)Google Scholar
  20. 20.
    Zhang, K., Zhang, D.: XML Transformations Through Graph Grammars. In: IEEE International Conference on Multimedia and Expo. (2001)Google Scholar
  21. 21.
    Zhang, K., Zhang, D., Deng, Y.: A Visual Approach to XML Document Design and Transformation. In: IEEE Symposium on Human Centric Computing Languages and Environments (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Gabriele Taentzer
    • 1
  • Giovanni Toffetti Carughi
    • 2
  1. 1.Technische Universität BerlinGermany
  2. 2.Politecnico di MilanoItaly

Personalised recommendations