XML: the lingua franca of Web 2.0

lingua franca: a language for communication between communities (Wikipedia)

In the beginning was HTML. And the words were tagged And the words were beautifully simple:

<body>
<h1>This is your headline</h1>
And this is your text.<br>
<b>And this is your text in bold.</b>

See the words:

This is your headline

And this is your text
And this is your text in bold.


And then came the browser wars and bloated HTML fell upon us and the bloat was bad for everyone, but especially bad for web developers:


<style>
<!--
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
h1
{mso-style-link:"Heading 1 Char";
mso-style-next:Normal;
margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:16.0pt;
font-family:Arial;
mso-font-kerning:16.0pt;}
code
{font-family:"Courier New";
mso-ascii-font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";
mso-hansi-font-family:"Courier New";
mso-bidi-font-family:"Courier New";}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-locked:yes;
mso-style-link:"Heading 1";
mso-ansi-font-size:16.0pt;
mso-bidi-font-size:16.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
mso-font-kerning:16.0pt;
mso-ansi-language:EN-US;
mso-fareast-language:EN-US;
mso-bidi-language:AR-SA;
font-weight:bold;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>
<body lang=EN-US style=:"tab-interval:.5in">
<div class=Section1>
<h1>This is your headline</h1>
<p class=MsoNormal>This is your text.</p>
<p class=MsoNormal><b>And this is your text in bold.</b></p>
</div>

See the bloat:

This is your headline

And this is your text
And this is your text in bold.


And then came XML, the eXtensible Markup Language, to save us from the Babel and babble of proprietary tags and browser-specific coding:

  • XHTML can be thought of as the intersection of HTML and XML.
  • XML 1.0 became a W3C Recommendation on February 10, 1998.
  • By leaving the names, allowable hierarchy, and meanings of the elements and attributes open and definable by a customizable schema or DTD, XML provides a syntactic foundation for the creation of purpose-specific…languages.

Here are three links to get you started:

http://www.xml.org/

  • A community-based site for XML standards which goes beyond specifications to include practical applications and free educational resources.

http://sial.org/talks/practical-xml/practical-xml.xml

  • As the name suggests, a practical explanation of XML with easy to understand explanations of more advanced technologies such as XSLT.

http://www.dclab.com/xml_file_format_blind.asp

  • An article on how XML provides access to visually-impaired students.

XML is behind AJAX (which stands for Asynchronous JavaScript And the XMLHttpRequest object), the acronym coined to describe Google Maps. XML is behind the publication of podcasts on iTunes. And RSS, a dialect of XML, is a familiar application. For example, using a styled RSS file like this:


<html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 01//EN" "http://www.worg/TR/html4/strict.dtd">
<head>
<title>RSS Feed</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="rss.css" title="rssstyle">
</head>
<body>
<script language="JavaScript" src="http://itde.vccs.edu/rss2js/feed2js.php?src=http://technology.blurst.com/feed/&chan=y&num=3&desc=100&date=y&targ=y type="text/javascript"></script>
<noscript>
You must have JavaScript enabled to access this RSS feed
</noscript>
</body>
</html>

enables you to add an XML-driven RSS feed to your Web pages, even to your Blackboard posts; all you have to do is publish an HTML page linked to a CSS file.

  1. Go to our webspace (http://webspace.utexas.edu) and login with your EID.
  2. Create a new folder and name it “www”.
  3. Right-click the www folder, select Manage, and then select Permissions.
  4. For the Public group, select the Viewer (Read-Only) radio button, and then click the Apply button.
  5. Select the option to “Apply the changed permissions to this folder as well as its sub-folders and files” and click OK
  6. Upload all of the files for your Web site into the www folder.
  7. The URLs are shown below (replace my EID with yours).

RSS Plain: https://webspace.utexas.edu/~mwa5589/RSSPlain.html

RSS Styled: https://webspace.utexas.edu/~mwa5589/RSSStyled.html

If you want to insert this into Blackboard as an HTML page, you must first turn off Blackboard’s WYSIWYG editor so you can add the JavaScript function that processes the feed: PERSONAL INFORMATION > SET VISUAL TEXT BOX EDITOR OPTIONS > Unavailable.

Pretty RSS

Citation

Burke, Sean. Making RSS Pretty. Retrieved 2/6/2009 from http://interglacial.com/~sburke/stuff/pretty_rss.html.

Summary

The article describes how to marry an RSS feed (which is an XML document) to a CSS file to style the RSS feed for a browser; browsers typically render an RSS feed as an XML tree but by using the xml-stylesheet tag, the tree has “leaves” (sorry to stretch that analogy). While the single line works only with an RSS feed, the author suggests an easy modification to handle RDF and Atom documents. Further, by using XSL (eXtensible Style Language), the author offers a method for marrying CSS to any XML for rendering in an HTML browser.

Response

I discovered this article while trying to figure out how to format a text-only RSS file with CSS in order to bring an external feed into a Blackboard page for a faculty member who wanted to deliver dynamic content. The technique described in the article was actually a dead-end because it works only when you add the xml-stylesheet tag to the original RSS feed (and I was trying to format someone else’s feed). I ended up using the less elegant (but more familiar) link rel=”stylesheet” type=”text/css” tag; however, the article confirmed my belief that I could style an RSS feed, and in that sense, it led to the solution.

SVG Prediction

Citation

Cagle, Kurt. Understanding XML: The Future of SVG and the Web (2005). Retrieved 8/19/2005 from http://www.understandingxml.com/archives/2005/08/the_future_of_s.html although this site throws a 404 error on 2/6/2009. A portion is still available at http://brokekid.net/2005/08/18/understanding-xml-the-future-of-svg-and-the-web/.

Summary

While the major prediction of the article–that SVG will be the graphics standard by 2008–has not been realized, the author’s focus on the importance of XML has certainly been realized. In particular, the following predictions have come true (to greater or lesser extents):

  • Syndication replaces the Web page: while RSS has gathered greater market share than Atom, the idea has materialized in feeds and social bookmarking; the advocacy of REST over SOAP is also starting to play out as Google switches technologies.
  • AJAX fades, need doesn’t: AJAX has not faded as fast as it should have, but the identification of the core AJAX technology–the XMLHttpRequest object–as the new paradigm is on target.
  • Ubiquitous personal content: while we’re still not “there” in terms of the portable identity envisioned by the author, the appeal of mashups and personalization drives most of what we call the read/write Web.

Response

Predicting the future is always dangerous: if you’re not right and for the right reasons, you risk having your basic points ignored. However, evangelists must make predictions because they point us to potential futures. Even when they are wrong (as they must be inevitably), they lead us (in the best cases) incrementally. What I especially appreciated about this article is that the predictions were made in advance of the Web 2.0 label.