xml
introduction
the extensible markup language (xml) is a general-purpose specification for creating custom markup languages. it is classified as an extensible language, because it allows the user to define the mark-up elements. xml’s purpose is to aid information systems in sharing structured data, especially via the internet, to encode documents, and to serialize data; in the last context, it compares with text-based serialization languages such as json and yaml.
xml began as a simplified subset of the standard generalized markup language (sgml), meant to be readable by people via semantic constraints; application languages can be implemented in xml. these include xhtml, rss, mathml, graphml, scalable vector graphics, musicxml, and others. moreover, xml is sometimes used as the specification language for such application languages.
xml is recommended by the world wide web consortium (w3c). it is a fee-free open standard. the recommendation specifies lexical grammar and parsing requirements.
history
the versatility of sgml for dynamic information display was understood by early digital media publishers in the late 1980s prior to the rise of the internet. by the mid-1990s some practitioners of sgml had gained experience with the then-new world wide web, and believed that sgml offered solutions to some of the problems the web was likely to face as it grew. dan connolly added sgml to the list of w3c’s activities when he joined the staff in 1995; work began in mid-1996 when sun microsystems engineer jon bosak developed a charter and recruited collaborators. bosak was well connected in the small community of people who had experience both in sgml and the web.
xml was compiled by a working group of eleven members, supported by an (approximately) 150-member interest group. technical debate took place on the interest group mailing list and issues were resolved by consensus or, when that failed, majority vote of the working group. a record of design decisions and their rationales was compiled by michael sperberg-mcqueen on december 4, 1997. james clark served as technical lead of the working group, notably contributing the empty-element “” syntax and the name “xml”. other names that had been put forward for consideration included “magma” (minimal architecture for generalized markup applications), “slim” (structured language for internet markup) and “mgml” (minimal generalized markup language). the co-editors of the specification were originally tim bray and michael sperberg-mcqueen. halfway through the project bray accepted a consulting engagement with netscape, provoking vociferous protests from microsoft. bray was temporarily asked to resign the editorship. this led to intense dispute in the working group, eventually solved by the appointment of microsoft’s jean paoli as a third co-editor.
the xml working group never met face-to-face; the design was accomplished using a combination of email and weekly teleconferences. the major design decisions were reached in twenty weeks of intense work between july and november 1996, when the first working draft of an xml specification was published. further design work continued through 1997, and xml 1.0 became a w3c recommendation on february 10, 1998.
xml 1.0 achieved the working group’s goals of internet usability, general-purpose usability, sgml compatibility, facilitation of easy development of processing software, minimization of optional features, legibility, formality, conciseness, and ease of authoring. like its antecedent sgml, xml allows for some redundant syntactic constructs and includes repetition of element identifiers. in these respects, terseness was not considered essential in its structure.
sources
xml is a profile of an iso standard sgml, and most of xml comes from sgml unchanged. from sgml comes the separation of logical and physical structures (elements and entities), the availability of grammar-based validation (dtds), the separation of data and metadata (elements and attributes), mixed content, the separation of processing from representation (processing instructions), and the default angle-bracket syntax. removed were the sgml declaration (xml has a fixed delimiter set and adopts unicode as the document character set).
other sources of technology for xml were the text encoding initiative (tei), which defined a profile of sgml for use as a ‘transfer syntax’; html, in which elements were synchronous with their resource, the separation of document character set from resource encoding, the xml:lang attribute, and the http notion that metadata accompanied the resource rather than being needed at the declaration of a link; and the extended reference concrete syntax (ercs), from which xml 1.0′s naming rules were taken, and which had introduced hexadecimal numeric character references and the concept of references to make available all unicode characters.
ideas that developed during discussion which were novel in xml, were the algorithm for encoding detection and the encoding header, the processing instruction target, the xml:space attribute, and the new close delimiter for empty-element tags.
versions
there are two current versions of xml. the first, xml 1.0, was initially defined in 1998. it has undergone minor revisions since then, without being given a new version number, and is currently in its fifth edition, as published on november 26, 2008. it is widely implemented and still recommended for general use. the second, xml 1.1, was initially published on february 4, 2004, the same day as xml 1.0 third edition, and is currently in its second edition, as published on august 16, 2006. it contains features — some contentious — that are intended to make xml easier to use in certain cases – mainly enabling the use of line-ending characters used on ebcdic platforms, and the use of scripts and characters absent from unicode 2.0. xml 1.1 is not very widely implemented and is recommended for use only by those who need its unique features.
prior to the fifth edition of xml 1.0, it and xml 1.1 differed in the requirements of characters used for element and attribute names: the first four editions of xml 1.0 only allowed characters which are defined in unicode 2.0, which includes most world scripts, but excludes those which were added in later unicode versions. among the excluded scripts are mongolian, cambodian, amharic, burmese, and others.
almost any unicode character can be used in the character data and attribute values of an xml 1.1 document, even if the character is not defined, aside from having a code point, in the current version of unicode. the approach in xml 1.1 is that only certain characters are forbidden, and everything else is allowed, whereas in older editions of xml 1.0, only certain characters were explicitly allowed, and thus prior to its fifth edition xml 1.0 could not accommodate the addition of characters in future versions of unicode.
in character data and attribute values, xml 1.1 allows the use of more control characters than xml 1.0, but, for “robustness”, most of the control characters introduced in xml 1.1 must be expressed as numeric character references. among the supported control characters in xml 1.1 are two line break codes that must be treated as whitespace. whitespace characters are the only control codes that can be written directly.
there are also discussions on an xml 2.0, although it seems unlikely if such will ever come about. xml-sw (sw for skunk works), written by one of the original developers of xml, contains some proposals for what an xml 2.0 might look like: elimination of dtds from syntax, integration of namespaces, xml base and xml information set (infoset) into the base standard.
the world wide web consortium also has an xml binary characterization working group doing preliminary research into use cases and properties for a binary encoding of the xml infoset. the working group is not chartered to produce any official standards. since xml is by definition text-based, itu-t and iso are using the name fast infoset for their own binary infoset to avoid confusion (see itu-t rec. x.891 | iso/iec 24824-1).
patent claims
in october 2005 the small company scientigo publicly asserted that two of its patents, u.s. patent 5,842,213 and u.s. patent 6,393,426 , apply to the use of xml. the patents cover the “modeling, storage and transfer [of data] in a particular non-hierarchical, non-integrated neutral form”, according to their applications, which were filed in 1997 and 1999. scientigo ceo doyal bryant expressed a desire to “monetize” the patents but stated that the company was “not interested in having us against the world.” he said that scientigo was discussing the patents with several large corporations.
xml users and independent experts responded to scientigo’s claims with widespread skepticism and criticism. some derided the company as a patent troll. tim bray described any claims that the patents covered xml as “ridiculous on the face of it”.




