magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1999 > 12 > Beyond HTML

Death of a DTD

As cool as XML is, the W3C hasn't exactly been perfect when it comes to defining supporting standards. Case in point? The document type definition, or DTD. As you likely know, a DTD is a collection of rules that define the type of content your elements may contain, the number of times a subelement may occur, and whether they are required or optional. DTDs also let you specify default values for attributes. And it would be impossible to perform entity replacement without the DTD.

When I look at the DTD, however, I think, Gee, the W3C really rushed that one out the door! You see, one of the requirements in defining XML was that it be SGML compliant. So when it came to specifying the XML DTD, the XML Working Group apparently decided that it had to use the same syntax as the SGML DTD. The problem with this syntax is that it's different from XML and relatively arcane. Even worse, the syntax varies (slightly) depending on whether it's an internal DTD contained within the XML document, or an external DTD maintained in a separate file. That means learning yet another syntax, and remembering nuances that depend on the physical location of the definitions. In creating its new markup language, the XML Working Group initially missed the opportunity to redesign the DTD.

"Ah!" you say, "what about the requirement that XML remain SGML compliant?" Well, that's the beauty of XML (and SGML, for that matter). The first word in XML is "extensible." And there's no reason you can't rewrite the DTD directly in XML.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2