HTML vs. XML - The RSS Blog
Randy Charles Morin blogs about Really Simple Syndication, RDF, FOAF, The Semantic Web and Social Software.
 
Copyright 2003-5 Randy Charles Morin
The RSS Blog
<< Previous Main Next >>
Thu, 28 Jul 2005 17:18:03 GMT
HTML vs. XML

A very interesting thread is circulating the Blogosphere about the disadvantages of XML on the Web. I'll let you read the thoughts to day. I won't quote these articles otherwise, because my points isn't about any one point they make, but rather about a general misunderstanding people have about XML.

Let me begin with a history lesson which I'm certain Dare, Tantek and Anne don't need, but for the rest of us.

A long time ago, Charles Goldfarb invented a markup language called SGML. SGML described how you could encode a hierarchical data structure inside of angled brackets. A little bit later, Tim Berners-Lee implemented HTML using SGML. That is, he created a hypertext-based hierarchical data structure based on the principles of SGML. The next part of story we all know very well. The Web and HTML got very popular.

At this point, people wondered if other SGML applications could also exist on the Web. The problem was that SGML parsing required knowledge of the application format (the DTD). This required a very smart parser. IE and Firefox are very smart parsers. You couldn't imagine how many mistakes the average Web developer makes and yet IE and Firefox are still capable of rendering something intelligent to the end-user. If we wanted other applications to exist on the Web, then SGML could not be the answer. What we needed was a subset of SGML that could be easily parsed. Enter XML.

Meanwhile some really intelligent people realized that HTML had another flaw. It mixed content and presentation. We could separate the content from the presentation (stylesheets). Now here's where I get confused. Along came XSLT and CSS. Both were god-awful attempts to add stylesheets to XML and HTML, but simple enough that they were widely adopted. In another thread, people started wondering how they could port HTML from SGML to XML and there ya go, we have XHTML. Now we're getting pretty close to lightweight parsing Web. But how does this all fit together? It doesn't.

You can format generic XML by tossing it thru a stylesheet and you can format XHTML by applying a bit of CSS, but there's no real convergence. So, you have two camps; one argument for styled generic XML and another for styled XHTML. What's new? Both have upsides and both have downsides. It's like Atom vs. RSS. XQuery vs. XPath.

On the other hand, XML is also great as a wire format for transferring data (RSS) between applications, but that's entirely another story and has little (but some) TODO with whether we should style generic XML or style XHTML. Should you apply a stylesheet to RSS to make your feed presentable? I guess you could and it works, so people are doing it. This is kinda how my blog software works. You see, each page has an equivalent RSS (XML) view. On the server side, I run the RSS thru an XSLT and apply a CSS.

Last, can we at least agree that HTML and SGML should be burried ASAP?

Reader Comments Subscribe

As per DH's statement, the reason the HTML parsing is faster than the XHTML parsing is time and effort. A little elbow grease into the XHTML parser and you have yourself something faster than HTML.

Randy

nippu compu dictioary

notes

c ,java,visual basic,html coming soon.......................................

nippucompu dictionary

computer dictionary,internet dictionary,babydoll kids package

Easynotes like C,C ,Visual basic,Java,Html,

From nipesh janghel

 

I find this shockingly interesting! XML has quite the history. Thanks for the post!
Furniture stores in Mesa, AZ
This is one of the good articles you can find in the net explaining everything in detail regarding the topic. I thank you for taking your time sharing your thoughts and ideas to a lot of readers out there.....
houston car title loans
supra shoes
The actual retailing value across the anklet bracelets together with the necklaces alters really,pandora braceletsas well as being depending the entire remarkable package in your sorts of elements this band and also charm will be made of.an important materials used are Silver Oxidised Silver or 14ct Rare metal.Ovoids are made of silver; pandora braceletMurano vino moncler jackets magnifying glaas pills, or maybe a mix of Silver with the help of antique watches. .pandora jewelryVarious drops include effective crystals.which ever traditional, theres a idea proper for everybody's pocketCagain,pandora charms an element that can make thesepandora beads items such a well-known produce
Type "339":
Top Articles
  1. Unblock MySpace
  2. MySpace
  3. FaceParty, the British MySpace
  4. del.icio.us and sex.com
  5. Blocking Facebook and MySpace
  1. Review of RSS Readers
  2. MySpace Layouts
  3. RSS Stock Ticker
  4. RSS Gets an Enema
  5. Google Reader rejects del.icio.us