KML lacks two important elements. It has neither 1) a simple and universal element equivalent to Dublin Core description (such as {http://purl.org/dc/elements/1.1/}description), nor 2) an excellent element for encapsulating or linking to rich content accompanying placemarks. Instead of the first, we have kml:Snippet. Snippet! It's somewhere in between a title and a description and that's no place to be. Instead of the second, we have kml:description, which supports an under-specified subset of HTML and other media including video.
The kml:description element is not about metadata anymore, it's about adding rich content -- charts, photos, video -- to popup windows of a geographic browsers. Under-specification of the content of kml:description is a problem. Which HTML elements are valid? Why shouldn't all be valid? The choice only between escaping HTML and using CDATA blobs is another problem. XHTML in a description wouldn't break the KML document; why shouldn't we be able to use XHTML without CDATA? Lack of support for dynamic content is yet another problem. Why can't we specify rich content by a URL, to be fetched only as needed and refreshed only if modified? Limitations of KML's description element and its ties to the original implementation hold us back. We need something better.
The Atom community wrestled with the same issues and came up with the atom:content element. An atom:content element may contain text, HTML, XHTML, XML, encoded binary media, or provide a URL to another document or media resource. When prompted, Atom processors (such as a news reader) display this content to a user. All HTML or XHTML elements are valid. CDATA blobs are unnecessary and not allowed. Atom's content element comes with clear processing instructions: HTML must be escaped, and should be valid within a <div>. The immediate child element of XHTML content must be a <div>. While guided by implementations, none of this depends on unspecified behavior of a particular Atom processor.
The "src" attribute of the atom:content element provides developers with more options. It allows you to decouple semi-static data from dynamic data. The locations and identifiers of physical instruments deployed in the field (river gauges, ASOS, you name it) can be decoupled from their nearly real-time observations and measurements. Serve a representation of the deployed instruments as a static document updated only as are the physical objects. From each instrument entry, link to a specialized web resource that produces tables or graphs on demand.
Atom processors can also take advantage of the "src" attribute to improve performance perceived by a user. Fetch the feed, show users titles and summaries first, get rich content as the user asks for it -- or get the rich content in the background, or during lulls in user activity. Processors should also be able to exercise conditional GET to avoid reloading unchanged rich content.
The atom:content element appears to support all of the requirements of, and overcome all of the faults of, kml:description. It fully embraces and accommodates rich content and provides new design options via links to dynamic or massive content. KML is already open to Atom elements (version 2.2 already includes atom:author, atom:link, and atom:name) and so atom:content is a more natural replacement for kml:description than RSS 1.0's content element or RSS 2.0's enclosure element. I'm not in a position to offer any advice to Google, but -- considering its investment in Atom, to act on the commonalities between KML and Atom seems useful and even profitable.
I've heard from KML folks that nothing pushes the spec forward more than working code. I'm not interested in writing a new geographic browser, but I can start serving KML enhanced with atom:content (which meets needs of a user that just cropped up on Monday), support it in my own KML processing packages, and perhaps even exercise my withering C++ skills on a libkml patch. After that? Let's swap in atom:summary for kml:Snippet. Snippet!
Comments
Re: Long, lonely tail
Author: Allan Doyle
We love your idiosyncratic blog...Re: Long, lonely tail
Author: Sean
Allan, thank you, but I was referring to under-appreciated C-listers. I get more than my fair share of readers.