D. Alvarado scribbled something along the lines of:
Hello,
I am sort of new to all this XML, but I would like to enforce a
date format within one of my XML elements. Everything I've read
indicates that a DTD is not suitable for this purposes, so I should
use a schema. In as far as this seems to be the only limitation of a
DTD, are there any disadvantages to using a schema? Or should I just
use a DTD and have a little extra programming to verify valid date
formats (which seems to defeat the purpose of XML)?
Thanks for any advice anyone can provide, Dave
You can't use the W3C Validator any longer if you use Schema instead of
a DTD, but if your text editor can do that or you care to search for a
schema based validator, even that shouldn't be an issue.
Read a little about RELAX NG and W3C's XML Schema, then decide which
suits you most. I think there's other schemas as well, but those are the
only ones I can think of right now.
You should be able to find the XML Schema recommendation in the XML
section of the W3C website [1] and the RELAX NG spec should be somewhere
at OASIS [2].
[1]
http://www.w3.org
[2]
http://www.oasis-open.org
--
Alan Plum, WAD/WD, Mushroom Cloud Productions
http://www.mushroom-cloud.com/