[DOC-SIG] Comparing SGML DTDs

Fred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Thu, 13 Nov 1997 10:13:34 -0500


Paul Prescod writes:
 > In short, I think that subscribing to standards is the Right Thing

  I concur.

 > If we want, we can also define an SGML subset simple enough to be parsed
 > with Python tools alone. We will just take XML and add back in the
 > shortcuts we like from SGML and fix up sgmllib.py to support them. There
 > is no reason that SGML should be harder to parse than TIM if we restrict
 > ourselves to a subset. Really the only thing that's very hard about
 > generic SGML is automatic tag omission. If we forgo that (as TIM does)
 > then SGML is not really hard to parse.

  The SGMLParser class from Grail is much better about SGML shortcuts
in "strict" mode (the non-strict mode is intended to support Web-style 
HTML, i.e., invalid, and is not interesting for us).  It supports
<emph/null/ end tags, <emph>empty</> end tags, and I think <>empty
start tags</> are tolerably o.k., but I'm less convinced I understand
the correct behavior, and haven't had any time to really validate it
against SP.
  I remember reading something that indicated the null end tags should
be discouraged.  Can you fill us in on the SGML community's current
attitude on this?  Does this only apply in the presence of SGML
editors like FM+SGML or should the avoidance also apply to manually
applied & revised markup?


  -Fred

--
Fred L. Drake, Jr.
fdrake@cnri.reston.va.us
Corporation for National Research Initiatives
1895 Preston White Drive
Reston, VA    20191-5434

_______________
DOC-SIG  - SIG for the Python Documentation Project

send messages to: doc-sig@python.org
administrivia to: doc-sig-request@python.org
_______________