To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
Date: Fri, 15 Nov 2013 12:58:00 -0500
I've been trying to figure out why I so deeply loathe the programmers
who regard markup as something to hide behind their tools, a mere
lubricant to the conversations they would have had anyway.
It's not just XML - this is a constant problem in the HTML world as
well. Sometimes it leads to perverse programming styles within web
applications, and sometimes it leads to bizarre decision making by the
people creating browsers and standards.
I think my problem - and it is _my_ problem - is that I spent too much
time looking at and enjoying markup before the rest of the world got
around to piling logic on top of it.
In the early days of HTML, and even CSS, it became clear pretty quickly
that there were sane and insane ways to use markup. Even when I was
first writing about Dynamic HTML, starting from a clean document made
everything so much easier. (That's a key reason why XHTML got traction
among at least part of the Web community, too.)
When I first got to XML, the markup was still primary and the processing
an afterthought. Get the markup right, for many different values of
right, of course, and the processing will be manageable.
At some point, maybe around the time of the Microsoft "he doesn't know
what XML is" ad, that story flipped. XML was incredibly useful, but as
the servant of programmers. XML structures suddenly had to look like
programming structures, because nothing else could be trusted. They
could look a little different, because after all programmers from
different environments had different expectations, but Schemas and WSDL
and similar structured approaches dominated.
(RDF also had a painful role in that story, inflicting URIs on XML
namespaces and leading to many thousands of unanswerable questions and
corner cases. By the time the RDF folks had realized that XML's text
trees never really were a good fit for their abstract graphs, though,
the damage was done.)
The data hygiene and mental hygiene of programming are not appropriate
for markup. Programming and markup have connections, much like
carpentry and plumbing, but their best practices are very different.
I suspect that the current brokenness of XML comes from markup values
having been buried under a pile of programming values, with XML Schema
the most visible landmark of that. Programmers see schemas and expect
XML to conform to their expectations, but reality has never quite conformed.
In any event, I'm well-aware that I'm losing this battle, on both the
HTML and XML fronts. Whether it's single-page apps or schema-driven
query systems, programmers gotta program. Much of the rest of my work
is about helping them do that.
Still, I dream of a strange world where more folks actually recognized
the value of markup, of annotating text with structured labels that act
as guideposts. It's useful stuff.
(And I should note that my initial encounter with markup was via HyTime,
which I pretty instantly bounced off. The models didn't connect clearly
enough to the text...)