About this site

Prev

Next

1994

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

About

   

Calling All DTDs!

Wednesday, April 29, 1998 by Dave Winer.

Good morning!

April is drawing to a close, and what's next, May, of course.

A warning to those who don't like the touchy-feely part of DaveNet. There's little doubt that some of the feely pieces are coming soooon.

Early May is when I was born, so many years ago. I practice self-indulgence at the big holidays, Thanksgiving, Christmas, New Year's. But the biggest holiday of all is the one that I share with approx 1/365th of the population. Be warned. I'm probably going to share some of my truths, in a friendly way of course, sometime next week.

In the meantime, let's look at the surface, thru the lens of the software industry that provides a structure for so much learning about humans.

Linux has love! Permalink to Linux has love!

So much of my experience with Linux is thru the postings and emails from the Linux zealots, who remind me much of the Mac zealots who protested loudly as I and others wrote about the retreat of the Mac OS as a platform of importance under the leadership of Sculley, Spindler and Amelio. If these people really had the interests of their OS at heart, my argument goes, they'd beat me with a feather instead of throwing rocks at me. Rocks hurt but feathers are fun.

But to be fair, some of the voices, usually quieter ones, speak with respect and patience and statesmanlike behavior. I make an effort to pay more attention to these voices. For example, about a year ago, a gentle man, whose name I don't remember, sent me an email offering to come to my office and install a Linux machine, free of charge. I declined, we were in the end-game of our Windows port, heads-down, there was no time for me to learn another OS while I was already learning a new OS. But I remember the elegance of this person's pitch. It made a big impression.

About open source, I want to add that I like the idea. It's how I learned how to program, back in the 70s as a grad student at UW-Madison. I had the source to the original Unix. I was delighted with the airy open-ness of the code, how straightforward it was. It taught me how real software is built in ways that professors can't. I was the total beneficiary of open source as a young person.

I owe so much to Dennis Richie, the lead developer of Unix, for having the good sense to see that his code could be used to teach a new generation of programmers, including me, how to build clean well-engineered, straightforward stuff. When I release code I think of Richie, a man who I spoke with several times when I was younger, and feel like I'm doing my part to keep the big wheel turning.

Platform advocacy Permalink to Platform advocacy

But I ramble. I want to point you to the most elegant platform advocacy document I've ever seen, the Linux Advocacy Mini-HOWTO:

http://sunsite.unc.edu/mdw/HOWTO/mini/Advocacy.html

Please clear out a few minutes and read the whole thing, top to bottom. Don't skip a word. You may find, as I did, that you get a whole different idea of what Linux is about.

I wish the Mac had such a document. I wish Windows had one too, although the Windows culture, as I experience it, pretty much adopts these ideas without explicit statement. To me, it says that advocating a platform does not entitle you to use that advocacy for your own purposes. It shows that Linux is rooted in respect for other points of view.

It's an incredible example of what I mean by keeping your eye on the prize. Know what you want and get it. The core of the Linux world wants the rest of the world to respect Linux. That's the best goal. It's totally attainable.

Here's my answer. Just by asking for respect, you get it. It's automatic!

WebDAV Permalink to WebDAV

A milestone piece appeared on the InfoWorld website a few hours ago, written by Jeff Walsh who is bringing accurate and balanced reporting to the new standards for XML and net content management.

http://www.infoworld.com/cgi-bin/displayStory.pl?980428.wiwebdav.htm

I'm quoted in the piece, thanks Jeff, but that's not why it's noteworthy.

WebDAV, which I've written about before, is important because it opens the door to managed content, and gets the toolmakers to work together instead of trying to be everything to everyone, which no one can be.

I think NetObjects, Macromedia and Adobe should be enthusiastic supporters of WebDAV because it means growth for them.

Well-run sites are the result of collaboration between writers, designers, graphic artists, and system managers. WebDAV is the first step towards standard protocols that enable collaboration over the net.

People who develop and manage web content should voice their support for WebDAV to the tools vendors, with respect of course, because it will empower them to plug in new tools without overwhelming team members with details they aren't interested in.

Writers write. Designers design. Graphics people sweat the pixels and systems people keep the whole thing flowing. That's the nirvana that WebDAV makes possible. We're enthusiastic supporters, we're implementing both sides of DAV. We hope everyone else gets on the bandwagon.

Let's have fun folks! It's a big world out there, we're all part of it.

DTDs Permalink to DTDs

Thanks to Lisa Rein, a friend with very strong opinions, I'm exploring XML at a deeper level, venturing into territory that used to scare me, but no longer does.

A DTD is a Document Type Definition. Without a DTD, XML information is just tagged text, with no rules about what can contain what.

It's hardly a new concept, but it is new to web content, where part of the charm of HTML is its lack of rigor, its anything-goes attitude. HTML has gotten us somewhere good, a publishing medium that's accessible to millions. It allows us to get our message thru even if we don't own a printing press or have a large editorial team or use expensive workflow and typesetting software. All those people and money and software can make things boring. Get the overhead out of the way and something interesting can happen. Anyway...

Back to DTDs. Here's an example of some simple XML text:

<?xml version="1.0"?>

<computer>

Now here's a DTD for that text:

<!ELEMENT computer (brand, model, ram, os, user+)>

<!ELEMENT brand (#PCDATA)>

<!ELEMENT model (#PCDATA)>

<!ELEMENT ram (#PCDATA)>

<!ELEMENT os (#PCDATA)>

<!ELEMENT user (#PCDATA)>

Armed with this DTD, a piece of software can look at a bit of XML text and tell you yay or nay. Does it describe a computer? If so, it's OK to typeset it or store it in a database. If not, the author has to go back and fix mistakes until it passes the validation test.

Why? Permalink to Why?

Now I don't claim to be an expert on this stuff, so please be patient with me. I'm learning. People who are new to DaveNet might not know that sometimes I throw up a straw-man, an assertion, a carefully labeled assumption in the hope that it will be refuted if it is incorrect. I like to learn quickly, so if you know more, please just send me an email, and keep it respectful. Thanks!

I'm assuming that the people who invented DTDs wanted the tagged text to flow into a database, and such software often has rigid rules about what each record can contain. There are only so many fields, and if you get information that contains more or less than what you require, that can spell trouble; wasted time, wasted money, inaccurate information, burnt braincells.

So if the DTD says it's OK, go ahead and do whatever processing you were going to do, safe in the knowledge that it's all there and at least at a structural level correct. Other rules may apply, semantic rules, that the DTD can't help with, so other kinds of error checking is needed in some situations.

If all this is true, I understand why we disconnected on DTDs, because our database, the one that Frontier is built around, doesn't have rigid rules about what can appear where. There really isn't a need for DTDs in our world, but they will be showing up, along with the XML-based information we hope to store and manage and send out, perhaps to software that is more rigid than ours, so we're going to have to embrace DTDs, at some level.

Calling all DTDs! Permalink to Calling all DTDs!

I like to learn by example. I've never been that good at reading specs. They usually make sense to me only *after* I understand the basic principles. I roll around in examples until a lightbulb goes on. Then and only then does the spec make sense.

So I put together a web application that's designed to capture, store and serve DTDs to help me and others understand how they work. If you're building XML-based applications and describing the data in DTD format, please share what you have, let's build a library of DTDs:

http://betty.userland.com/dtd/default.wsf

If you or someone you know is working here, please share what you've built.

That's how we'll have fun and move forward together.

Have a grrrreat day!

Dave Winer



© Copyright 1994-2004 Dave Winer. Last update: 2/5/07; 10:50:05 AM Pacific. "There's no time like now."