From: Sean Russell Date: 2001-12-16T01:11:17+09:00 Subject: [ruby-talk:28627] Re: DTD Parsers in Ruby? David Alan Black wrote: >> A niche feature, eh? How about attribute value types? And real >> XML-based syntax, rather than a hacked variation of SGML? > > I thought that's what real XML syntax was :-) Ahem, yes, well... Technically, aren't all XML documents also well-formed SGML documents? This can't be said of DTDs. So I'd say that XML isn't a hack, but a dailect. DTDs are a hack... you can't parse a DTD with code that parses SGML. > Special processing, yes, but not inordinately complex, I think, in > relation to the payoff (validation). (Easy for me to say, since I've > written about 10 lines of a processor.) Also, at least in the case of > SGML, it's not really "additional", since every SGML document conforms > to a DTD (i.e., that's what the whole thing is about). I wasn't saying that validation is bad; I was making the case that there are better ways to support validation, such as XMLSchema, which uses the same syntax as the documents which it describes, and therefore doesn't require any special parsing code. Ob-Ruby: this is even more of an issue in Ruby, where the parsers are small. Requiring an extra parser to support DTDs can easily add 50% to your codebase. -- --- SER