Abstract
XML is successful as a machine processable data interchange format, but it is often too verbose for human use. For this reason, many XML languages permit an alternative more legible non-XML syntax. XSLT stylesheets are often used to convert from the XML syntax to the alternative syntax; however, such transformations are not reversible since no general tool exists to automatically parse the alternative syntax back into XML.
We present XSugar, which makes it possible to manage dual syntax for XML languages. An XSugar specification is built around a context-free grammar that unifies the two syntaxes of a language. Given such a specification, the XSugar tool can translate from alternative syntax to XML and vice versa. Moreover, the tool statically checks that the transformations are reversible and that all XML documents generated from the alternative syntax are valid according to a given XML schema.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abramov, S., Glück, R.: Principles of inverse computation and the universal resolving algorithm. In: The essence of computation: complexity, analysis, transformation, pp. 269–295. Springer, Heidelberg (2002)
Ambastha, N., Hashmi, T.: Xqueeze (2005), http://xqueeze.sourceforge.net/
Boyer, J.: Canonical XML Version 1.0. W3C Recommendation (March 2001), http://www.w3.org/TR/xml-c14n
Brabrand, C., Møller, A.: Analyzing ambiguity of context-free grammars (2005) (In preparation)
Brabrand, C., Møller, A., Schwartzbach, M.I.: Static validation of dynamically generated HTML. In: Proc. ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, PASTE 2001, June 2001, pp. 221–231 (2001)
Christensen, A.S., Møller, A., Schwartzbach, M.I.: Extending Java for high-level Web service construction. ACM Transactions on Programming Languages and Systems 25(6), 814–875 (2003)
Clark, J.: RELAX NG compact syntax. OASIS (November 2002), http://relaxng.org/compact.html
Clark, J., Murata, M.: RELAX NG specification. OASIS (December 2001), http://www.oasis-open.org/committees/relax-ng/
Clear Methods, Inc. ConciseXML (2005), http://www.concisexml.org/
Fisher, K., et al.: PADS: Processing Arbitrary Data Streams (2005), http://www.padsproj.org/
Gundersen, V.B., Hendrikse, Z.W.: BibTeXML (2005), http://bibtexml.sourceforge.net/
Kirkegaard, C., Møller, A., Schwartzbach, M.I.: Static analysis of XML transformations in Java. IEEE Transactions on Software Engineering 30(3), 181–192 (2004)
McGrath, S.: XML processing with Python. Prentice-Hall, Englewood Cliffs (2000)
Møller, A.: Document Structure Description 2.0 (December 2002); BRICS, Department of Computer Science, University of Aarhus, Notes Series NS-02-7, Available from http://www.brics.dk/DSD/
Mu, S.-C., Hu, Z., Takeichi, M.: Bidirectionalising HaXML (2005)
Parker, D.: Presenting XML (2005), http://presentingxml.sourceforge.net/
Unidex Inc. XFlat (2005), http://www.unidex.com/xflat.htm
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brabrand, C., Møller, A., Schwartzbach, M.I. (2005). Dual Syntax for XML Languages. In: Bierman, G., Koch, C. (eds) Database Programming Languages. DBPL 2005. Lecture Notes in Computer Science, vol 3774. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11601524_2
Download citation
DOI: https://doi.org/10.1007/11601524_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-30951-2
Online ISBN: 978-3-540-31445-5
eBook Packages: Computer ScienceComputer Science (R0)