ITworld.com
  Search  
Menu Changing the way you view IT
Displaying XML in Web Browsers: Theory vs. Practice
Sign up for XML IN PRACTICE
More Newsletters
 
 

XML IN PRACTICE --- 11/29/2001



Back in the SGML days, we had things called "viewers" to render markup documents on the screen or on paper. Of course now, we all have Web browsers instead.
Advertisement
On this topic




An SGML viewer was (I say "was" rather than "is" for reasons that will soon be apparent) a bit like a Web Browser in that it interpreted markup, applied styling, and displayed the results on the screen. Some of the fancier tools such as SoftQuad Panorama and CiTEC Multidoc Pro allowed you to do all sorts of nice things with table layout, collapsible tables of contents, footnotes, hypertext...the full wazoo.

Of course that was then and this is now. "Now" is a time and a place when SGML viewers have been replaced with XML viewing capabilities in Web Browsers. Neither Panorama nor Multidoc Pro are available any more.

I built a system three years ago that used Multidoc Pro and recently had to revisit it. I needed to get Multidoc Pro but could not find it anywhere on the Web. I ended up pulling it off a CD-ROM stuck in the back of the Japanese version of my (now aged) book, "XML by Example"!

This viewer technology would seem to have been airbrushed out of history; however, the brains powering Panorama and Multidoc Pro is a component called Synex ViewPort, which is still available as a developer toolkit (http://www.synex.se).

Theoretically, we no longer need viewers because browsers understand XML and, in particular, Cascading Style Sheets and XSLT, either of which can be used to create XML "viewers". As with so many things in XML, it ain't quite that simple. Firstly, XSLT is really only a runner for simple server-side styling; browser support is patchy at best; and, as an XML standards, it has suffered from extensions that make keeping applications browser independent difficult. Secondly, there is CSS2. Although many browsers claim to support it, there are major CSS2 support and interoperability problems.

Over the last couple of weeks, I have downloaded more browsers than I can remember in search of a decent CSS2 implementation. The nearest I have come is Opera 5. After a lot of trial and error, I have an XML browsing app working along similar lines to the Multidoc Pro apps I used to build before XML. It has been an educational experience.

The most annoying thing about Opera is that it silently ignores errors in your CSS2 stylesheet. There does not seem to be any way to force it to report errors, a real pain in the neck during application development. For example, I spent ages trying to figure out the one particular style that was not working in the browser only to find that I overstepped the maximum number of styles in my stylesheet and Opera silently ignored a bunch of them!

The other very annoying thing is not a fault with Opera 5, but a fault with XML. When XML was on the drawing board, the idea was to standardize the markup language and then move quickly on to standardizing a linking mechanism (XLink) and a styling mechanism (XSL). Unfortunately, XLink has yet to get beyond working draft at the W3C. Consequently, getting hypertext links to work in Opera requires the use of Opera specific extensions to CSS2.

On the bright side, you can do a lot with CSS2 and, as support for it amongst tools grows, it will become easier and easier to browse XML. We will soon be in a position to do what SGML viewers could do 4 years ago.

Plus Ca Change, Plus C'est La Meme Chose.

 



Sponsored links
Top 5 Reasons to Combine App Performance and Security
Locate Hidden Software on business PCs with this free tool
KODAK i1400 Series Scanners stand up to the challenge
Bring harmony to your mix of UNIX-Linux-Windows computing environments
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   IDG Connect   IDG World Expo   Industry Standard   Infoworld   ITworld   JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.