This year we turned the corner on XML. We are now free to consider better technologies for data interchange. The XML Nightmare is over.
But why did this happen in the first place? Where did the idea come from that it was necessary to encode data in a document format?
To answer that, we must go back to the dawn of document formats. One of the earliest and most influential was RUNOFF, a procedural typesetting language from 1964. This was followed by Charles Goldfarb's fiddlings with Generalized Markup Language at IBM which attempted to go in a more declarative direction. Declarative markup was first done right in Brian Reid's Scribe in 1980.
Scribe was an elegant and robust markup language. Markup started with an at sign:
@Heading(Cranberry Bread)
The text within the paren could be anything that wasn't a paren. If that was too restrictive, you could use any of these pairs instead of parens:
[ ] { } < > " " ' '
And if that was too restrictive, you could use the long form.
@Begin(Quotation) And pretty much anything (and I
mean @i"anything") could go inside. @End(Quotation)
It is significantly easier to write in Scribe than in SGML, so it is a shame that Sir Tim chose SGML instead of Scribe as the syntax for HTML.
Scribe had support for bibliographies. Bibliographic entries looked like these:
@techreport(PUB, key="Tesler", author="Tesler, Larry",
title="PUB: The Document Compiler",
institution="Stanford University Artificial Intelligence Project",
year=1972, number="ON-72", month=sep)
@book(Volume3, key="Knuth", author="Knuth, Donald E.",
title="Sorting and Searching", publisher="Addison-Wesley",
year=1973, series="The Art of Computer Programming", volume=3,
address="Reading, Mass.")
Those entries look a lot like JSON. Reid stored the data from the entries in a database. I think this is where data first moved into document space. Had we retained the Scribe syntax, I think it might have gone well. But instead we adopted the SGML syntax, an error that was repeated and exaggerated in XML.