MetaCartSign in to MyCiteSeer

Include Citations | Advanced Search | Help

Include Citations | Advanced Search | Help

  XML Types for C#

Download:
Download as a PDF
by Erik Meijer Clr, Wolfram Schulte Msr
http://research.microsoft.com/~emeijer/Papers/XSBG.pdf
Add To MetaCart

Abstract:

This paper proposes a language extension that adds native support for XML to the type system of C#. In our approach XML documents or document fragments become first class citizens that benefit from the full range of features available in a modern programming language like C#. XML elements can be constructed, loaded, passed, transformed, updated, and written in a true type-safe manner. To our knowledge, no other approach to XML provides for type safety and syntactic integration of this sort. Existing approaches are either completely untyped (some form of string processing) or rely on schema-to-class translation patterns that have many limitations. Our approach is a true semantic integration via the type system. One of the consequences of type integration is that many runtime checks may be moved to compile time. This has many benefits for performance and program correctness. The type system extension is based on XML Schemas and incorporates operational aspects from XPATH, XSLT and XQuery. The implementation uses the existing capabilities of the System.XML namespace in Microsoft’s Common Language Infrastructure to provide its functionality. In this document, we use the term C#-xml to mean the combination of C # and the proposed extensions. We present these extensions through a series of worked examples. Although we restrict our attention to XML and C # in this paper, our approach can be applied to integrate any standard object-oriented programming language (C#, Visual Basic, Java, etc.) with any data-structuring language (XML, SQL, etc.). 1

Citations

250 Foundations of Programming Languages – Mitchell - 1996
118 Regular expression types for XML – Hosoya, Vouillon, et al. - 2000
13 XML Path Language (XPath) Version 1.0. World Wide Web Consortium Recommendation – Clark, DeRose - 1999
4 At: http://www.w3.org/TR/1999/REC-xslt-19991116 – Clark - 1999
3 Online at http://www.w3.org/TR/REC-xml – Bray, Paoli, et al. - 1998
2 Available at http://www.w3.org/TR/xmlschema-1 – Thompson, Beech, et al. - 2001
1 Wadler World-Wide Web Consortium XML Schema: Formal Description – Brown, Fuchs, et al. - 2001
1 XMLambda: A functional language for constructing and manipulating XML documents – Draft - 1999
1 Iterators for C#. Internal memo 2000, Microsoft confidential – Proebsting
1 Ashok Malhotra,,Michael Rys, Jérôme Siméon Philip Wadler, Working draft available at http://www.w3.org/TR/2001/WD-query-semantics-20010607 – Fankhauser, Fernández
1 Consortium XQuery 1.0 and XPath 2.0 Data Model, Working Draft – Web - 2001
1 Wiltamuth C# Language Specification Submitted ECMA Standard. Available at http://www.msdn.microsoft.com/net/ecma – Hilsberg, Scott
1 Available at: http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113 – Hors, Hégaret, et al. - 2000
1 Tobin The XML Information Set, W3C Recommendation 24 October 2001. Available at http://www.w3.org/TR/2001/REC-xml-infoset-20011024 – Cowan, Richard