This Article 
 Bibliographic References 
 Add to: 
Static Analysis of XML Transformations in Java
March 2004 (vol. 30 no. 3)
pp. 181-192

Abstract—XML documents generated dynamically by programs are typically represented as text strings or DOM trees. This is a low-level approach for several reasons: 1) Traversing and modifying such structures can be tedious and error prone, 2) although schema languages, e.g., DTD, allow classes of XML documents to be defined, there are generally no automatic mechanisms for statically checking that a program transforms from one class to another as intended. We introduce Xact, a high-level approach for Java using XML templates as a first-class data type with operations for manipulating XML values based on XPath. In addition to an efficient runtime representation, the data type permits static type checking using DTD schemas as types. By specifying schemas for the input and output of a program, our analysis algorithm will statically verify that valid input data is always transformed into valid output data and that the operations are used consistently.

[1] T. Bray, J. Paoli, C.M. Sperberg-McQueen, and E. Maler, Extensible Markup Language (XML), 1.0 second ed. W3C Recommendation,, Oct. 2000.
[2] H.S. Thompson, D. Beech, M. Maloney, and N. Mendelsohn, XML Schema Part 1: Structures W3C Recommendation,, May 2001.
[3] A. Møller, Document Structure Description 2.0 BRICS, Dept. of Computer Science, Univ. of Aarhus, Notes Series NS-02-7,http://www.brics.dkDSD/, Dec. 2002.
[4] S. Pemberton et al., XHTML 1.0: The Extensible Hypertext Markup Language W3C Recommendation,, Jan. 2000.
[5], Amazon Web Services com/exec/panama/ associates/join/developerresources.html , 2002.
[6] V. Apparao et al., Document Object Model (DOM) Level 1 Specification W3C Recommendation,, Oct. 1998
[7] J. Hunter and B. McLaughlin, JDOM http:/, 2001.
[8] A.S. Christensen, A. Møller, and M.I. Schwartzbach, Extending Java for High-Level Web Service Construction ACM Trans. Programming Languages and Systems, vol. 25, no. 6, pp. 814-875, Nov. 2003.
[9] A.S. Christensen and A. Møller, JWIG User Manual. BRICS, Dept. of Computer Science, Univ. of Aarhus, Notes Series NS-02-6,, June 2002.
[10] J. Clark and S. DeRose, XML Path Language W3C Recommendation,, Nov. 1999.
[11] A.S. Christensen, A. Møller, and M.I. Schwartzbach, Static Analysis for Dynamic XML Technical Report RS-02-24, Basic Research in Computer Science (BRICS), May 2002.
[12] C. Kirkegaard, A.S. Christensen, and A. Møller, A Runtime System for XML Transformations in Java Technical Report RS-03-29, Basic Research in Computer Science (BRICS), Oct. 2003.
[13] J. Bloch, Effective Java Programming Language Guide. Addison-Wesley, June 2001.
[14] A. Berlea and H. Seidl, Transforming XML Documents Using FXT Computing and Information Technology, special issue on domain-specific languages, vol. 10, no. 1, pp. 19-35, 2002.
[15] F. Nielson, H.R. Nielson, and C. Hankin, Principles of Program Analysis. Springer-Verlag, Oct. 1999.
[16] J.B. Kam and J.D. Ullman, Monotone Data Flow Analysis Frameworks Acta Informatica, vol. 7, pp. 305-317, 1977.
[17] A.S. Christensen, A. Møller, and M.I. Schwartzbach, Precise Analysis of String Expressions Proc. 10th Int'l Static Analysis Symp. (SAS '03), June 2003.
[18] A. Møller and M.I. Schwartzbach, The XML Revolution Technologies for the Future Web Basic Research in Computer Science (BRICS), Dept. of Computer Science, Univ. of Aarhus, Notes Series NS-01-8,, Dec. 2001.
[19] D. Chamberlin et al., XML Query Use Cases W3C Working Draft,, Nov. 2002.
[20] V. Benzaken, G. Castagna, and A. Frisch, CDuce: A White Paper Proc. Programming Language Technologies for XML Workshop (PLAN-X), Oct. 2002.
[21] R. Vallee-Rai, L. Hendren, V. Sundaresan, P. Lam, E. Gagnon, and P. Co, Soot A Java Optimization Framework Proc. IBM Centre for Advanced Studies Conf. (CASCON '99), Nov. 1999
[22] V. Sundaresan, L.J. Hendren, C. Razafimahefa, R. Vallee-Rai, P. Lam, E. Gagnon, and C. Godin, Practical Virtual Method Call Resolution for Java Proc. ACM SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '00), Oct. 2000.
[23] A. Ludwig et al., Recoder http:/, Mar. 2002.
[24] D. Suciu, The XML Typechecking Problem ACM SIGMOD Record, vol. 31, Mar. 2002.
[25] Sun Microsystems, Java Servlet Specification version 2.3,, 2001.
[26] S. Boag et al., Transformation API for XML http://xml.apache. org/xalan-jtrax.html, 2003.
[27] Sun Microsystems, Java API for XML Processing, 2001.
[28] D. Brownell, SAX2. O'Reilly and Associates, Jan. 2002.
[29] M. Wallace and C. Runciman, Haskell and XML: Generic Combinators or Type-Based Translation? Proc. Fifth ACM SIGPLAN Int'l Conf. Functional Programming (ICFP '99), Sept. 1999
[30] P. Thiemann, WASH/CGI: Server-Side Web Scripting with Sessions and Typed, Compositional Forms Proc. Fourth Int'l Symp. Practical Aspects of Declarative Languages (PADL '02), Jan. 2002.
[31] H. Hosoya and B.C. Pierce, XDuce: A Statically Typed XML Processing Language ACM Trans. Internet Technology, vol. 3, no. 2, 2003.
[32] Exolab Group, Castor http:/, 2002.
[33] Sun Microsystems, JAXB, 2002.
[34] M. Fitzgerald, Relaxer Tutorial , 2003.
[35] F. Simeoni, P. Manghi, D. Lievens, R.H. Connor, and S. Neely, An Approach to High-Level Language Bindings to XML Information&Software Technology, vol. 44, no. 4, pp. 217-228, 2002.
[36] R. Connor, D. Lievens, F. Simeoni, S. Neely, and G. Russell, Projector A Partially Typed Language for Querying XML Programming Language Technologies for XML Workshop (PLAN-X), Oct. 2002.
[37] E. Meijer and W. Schulte, Unifying Tables, Objects and Documents Proc. Declarative Programming in the Context of OO Languages (DP-COOL '03), 2003.
[38] R. Bourret, XML Data Binding Resources http://www. , Feb. 2003.
[39] J. Clark, XSL Transformations (XSLT) Specification W3C Recommendation,, Nov. 1999.
[40] M. Kay, XSL Transformations (XSLT) Version 2.0 W3C Working Draft,, May 2003.
[41] S. Boag et al., XQuery 1.0: An XML Query Language W3C Working Draft,, Nov. 2002.
[42] D. Draper et al., XQuery 1.0 and XPath 2.0 Formal Semantics W3C Working Draft,, Nov. 2002.
[43] V. Gapayev and B.C. Pierce, Regular Object Types Proc. 17th European Conf. Object-Oriented Programming (ECOOP '03), July 2003.
[44] J.-Y. Vion-Dury, V. Lux, and E. Pietriga, Experimenting with the Circus Language for XML Modeling and Transformation Proc. ACM Symp. Document Eng. (DocEng '02), Nov. 2002.
[45] E. Meijer and M. Shields, XM : A Functional Language for Constructing and Manipulating XML Documents, 1999.
[46] O. Kiselyov and S. Krishnamurthi, SXSLT: Manipulation Language for XML Proc. Fifth Int'l Symp. Practical Aspects of Declarative Languages (PADL '03), Jan. 2003.
[47] T. Milo, D. Suciu, and V. Vianu, Typechecking for XML Transformers J. Computer and System Sciences, vol. 66, Feb. 2002.
[48] W. Martens and F. Neven, Typechecking Top-Down Uniform Unranked Tree Transducers Proc. Ninth Int'l Conf. Database Theory, Jan. 2003.
[49] A. Tozawa, Towards Static Type Checking for XSLT Proc. ACM Symp. Document Eng. (DocEng '01), Nov. 2001.
[50] T. Perst and H. Seidl, A Type-Safe Macro System for XML Proc. Extreme Markup Languages, Aug. 2002.
[51] Y. Papakonstantinou and V. Vianu, DTD Inference for Views of XML Data Proc. 19th ACM SIGACT-SIGMOD-SIGART Symp. Principles of Database Systems (PODS '00), May 2000.
[52] M. Kempa and V. Linnemann, Type Checking in XOBE Proc. Datenbanksysteme für Business, Technologie und Web (BTW '03), Feb. 2003.
[53] C. Brabrand, M.I. Schwartzbach, and M. Vanggaard, The Metafront System: Extensible Parsing and Transformation Proc. Third ACM SIGPLAN Workshop Language Descriptions, Tools and Applications (LDTA '03), Apr. 2003.
[54] S. Muench and M. Scardina, XSLT Requirements Version 2.0 W3C Working Draft,, Feb. 2001.

Index Terms:
Language constructs and features, markup languages, requirements/specifications.
Christian Kirkegaard, Anders M?ller, Michael I. Schwartzbach, "Static Analysis of XML Transformations in Java," IEEE Transactions on Software Engineering, vol. 30, no. 3, pp. 181-192, March 2004, doi:10.1109/TSE.2004.1271173
Usage of this product signifies your acceptance of the Terms of Use.