The big difference between schemas and DTDs is that schemas are described in
XML instance syntax and DTDs are not. Sure, there are a few functional
differences between schemas and DTDs, such as datatypes, but I don't see
them as the big win. The advantage of schemas in, my mind, is that you can
parse and browse them easily since they are in XML instance syntax. DTDs are
much less verbose and quicker/easier to write. It all depends what you want.
The additonal beauty of schemas is that you can easily write an XSLT
transform to generate a DTD.
I do agree that DTDs are very intuitive and immediately easy to grasp, once
you learn a very small set of operators.
I'm using XDR (XML DATA Reduced) to write my schemas. You can grab a copy of
the spec from MSDN or W3C. Its pretty easy to write, but I sure miss the
concise DTD syntax.
Hope that helps,
From: Helen Farrell [mailto:[log in to unmask]]
Sent: Thursday, September 07, 2000 8:09 AM
To: [log in to unmask]
Subject: Schemas vs. DTD's
What can Schemas do, that DTD's cannot?
Coming from a non-programming background I found DTD's (design and
interpretation) intuitive and easy to understand.
Now, with all the discussions on Schemas, I find myself unable the grasp the
concepts as easily. It seems when comparing the definition of an element,
that Schemas seem to take five times as long as DTD's.
What is the benefit of using Schemas?
I thought the whole point of XML was to set standards, but to retain
simplicity where possible. I don't feel that Schemas are readily understood
by the majority of people.