At 7:03 AM -0500 1/26/00, Stephen Pair wrote:
>> Ooo, ooo, I was thinking about doing that. Do it, do it!
>>
>> But what are you parsing? DTDs? DTDs, themselves, specify grammars. What
>> would be cool is to have a T-Gen that understood DTDs :)
>>
>> Of course, that's only if you want validation.
>
>Hey, Hey! That would be great! I'm translating the XML EBNF into the TGen
>format (a pretty easy mapping). From there, I'll specify additional TGen
>stuff to create a more workable AST. The XML spec doesn't describe XML
>using a DTD.
Right. But XML is the meta-langauge. Does the EBNF describe DTD or
"well-formed" XML syntax? (I'm searching I'm searching I'm searching...)
Whoops! Yes it does. Whoa. Cool!
>It would be great for Scamper (and Squeak in general) to have it understand
>DTDs...I believe all of the HTML versions are described as DTDs. Do you
>know where the DTD spec is located?
Spec: http://www.w3.org/TR/REC-html40/
DTD: http://www.w3.org/TR/REC-html40/sgml/dtd.html
But I'd start with XHTML:
Spec: http://www.w3.org/TR/xhtml1
DTDs: http://www.w3.org/TR/xhtml1/#dtds
There are two main problems with regular HTML:
1) It's SGML, so validation is nastier. Though you can special case it.
2) What's "acceptable" HTML is way broader than what's valid.
Of course, if you just want a validator, then 2 is moot. But for a web
browser, one may wish to be a touch more lax.
Finally, [ok, this has been sitting her for 4 days; lex's post prompted me
to finish it ;)] ...
I forget. :) Oh well.
Cheers,
ZBijan.